47 #ifndef __TRACKER_WIIMOTEHEAD_H 48 #define __TRACKER_WIIMOTEHEAD_H 87 float led_spacing = 0.145);
127 void _update_gravity_moving_avg();
140 void _update_2_LED_pose(q_xyz_quat_type & newPose);
150 void _update_flip_state();
155 void _convert_pose_to_tracker();
160 void _reset_gravity();
163 void _reset_points();
171 bool _should_report(
double elapsedInterval)
const;
174 bool _have_gravity()
const;
193 struct timeval d_prevtime;
q_vec_type d_vGravPenultimate
const double d_update_interval
maximum time between updates, in seconds
const char * d_name
Tracker device name.
bool d_contact
Flag: Have we received the first message from the Wiimote?
vrpn_Analog_Remote * d_ana
Source of analog data, traditionally vrpn_WiiMote Must present analog channels in this order:
Generic connection class not specific to the transport mechanism.
q_vec_type d_vGravAntepenultimate
q_xyz_quat_type d_currentPose
Current pose estimate.
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
Provides a tracker device given data from a Wii Remote and LED glasses.
This structure is what is passed to a vrpn_Connection message callback.
bool d_updated
Flag: Have we received updated Wiimote data since last report?
const double d_blobDistance
distance between LEDs on glasses, in meters
bool d_gravDirty
Flag: Have we received updated gravity data since last gravity update?
q_xyz_quat_type d_gravityXform
Gravity correction transformation.
bool d_lock
Flag: Does the tracking algorithm report a lock?
FlipState d_flipState
Whether we need to flip the order of the tracked points before calculating a pose.