|
|
@@ -130,7 +130,7 @@ vrpn_position_callback(void *userdata, const vrpn_TRACKERCB info) {
|
|
|
device->lock();
|
|
|
device->_data.set_time(VrpnClient::convert_to_secs(info.msg_time));
|
|
|
device->_data.set_pos(LPoint3f(info.pos[0], info.pos[1], info.pos[2]));
|
|
|
- device->_data.set_orient(LOrientationf(info.quat[0], info.quat[1], info.quat[2], info.quat[3]));
|
|
|
+ device->_data.set_orient(LOrientationf(info.quat[3], info.quat[0], info.quat[1], info.quat[2]));
|
|
|
device->unlock();
|
|
|
}
|
|
|
}
|
|
|
@@ -159,8 +159,8 @@ vrpn_velocity_callback(void *userdata, const vrpn_TRACKERVELCB info) {
|
|
|
device->lock();
|
|
|
device->_data.set_time(VrpnClient::convert_to_secs(info.msg_time));
|
|
|
device->_data.set_pos(LPoint3f(info.vel[0], info.vel[1], info.vel[2]));
|
|
|
- device->_data.set_orient(LOrientationf(info.vel_quat[0], info.vel_quat[1],
|
|
|
- info.vel_quat[2], info.vel_quat[3]));
|
|
|
+ device->_data.set_orient(LOrientationf(info.vel_quat[3], info.vel_quat[0],
|
|
|
+ info.vel_quat[1], info.vel_quat[2]));
|
|
|
device->_data.set_dt(info.vel_quat_dt);
|
|
|
device->unlock();
|
|
|
}
|
|
|
@@ -190,8 +190,8 @@ vrpn_acceleration_callback(void *userdata, const vrpn_TRACKERACCCB info) {
|
|
|
device->lock();
|
|
|
device->_data.set_time(VrpnClient::convert_to_secs(info.msg_time));
|
|
|
device->_data.set_pos(LPoint3f(info.acc[0], info.acc[1], info.acc[2]));
|
|
|
- device->_data.set_orient(LOrientationf(info.acc_quat[0], info.acc_quat[1],
|
|
|
- info.acc_quat[2], info.acc_quat[3]));
|
|
|
+ device->_data.set_orient(LOrientationf(info.acc_quat[3], info.acc_quat[0],
|
|
|
+ info.acc_quat[1], info.acc_quat[2]));
|
|
|
device->_data.set_dt(info.acc_quat_dt);
|
|
|
device->unlock();
|
|
|
}
|