LRT14  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
RobotLocation.h
1 #ifndef ROBOT_LOCATION_H_
2 #define ROBOT_LOCATION_H_
3 
4 #include "WPILib.h"
5 #include "DriveEncoders.h"
6 #include "../Logging/Loggable.h"
7 #include "semLib.h"
8 #include "../Communication/LiveNetworkSendable.h"
9 
14 {
15 public:
16  static void Initialize();
17  static RobotLocation* Instance();
18  static void Finalize();
19 
23  void Update();
24 
29  double GetX();
30 
35  double GetY();
36 
41  double GetTheta();
42 
46  void Zero();
47 
51  void Log();
52 
56  void Send();
57 
61  static void Periodic(void *param);
62 
63 private:
64  RobotLocation();
65 
66  static RobotLocation* m_instance;
67 
68  DriveEncoders* m_encoders;
69 
70  Notifier m_notifier;
71 
72  SEM_ID sem;
73 
74  double x, y;
75  double x_last, y_last;
76  double theta_zero;
77  double d, theta;
78  double d_last, theta_last;
79 
80  DISALLOW_COPY_AND_ASSIGN(RobotLocation);
81 };
82 
83 #endif