Changeset 135 in flair-src for trunk/demos/CircleFollower
- Timestamp:
- Feb 13, 2017, 11:38:33 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/demos/CircleFollower/uav/src/CircleFollower.cpp
r129 r135 84 84 const AhrsData *CircleFollower::GetOrientation(void) const { 85 85 //get yaw from vrpn 86 Euler vrpnEuler;87 uavVrpn->Get Euler(vrpnEuler);86 Quaternion vrpnQuaternion; 87 uavVrpn->GetQuaternion(vrpnQuaternion); 88 88 89 89 //get roll, pitch and w from imu … … 93 93 94 94 Euler ahrsEuler=ahrsQuaternion.ToEuler(); 95 ahrsEuler.yaw=vrpn Euler.yaw;95 ahrsEuler.yaw=vrpnQuaternion.ToEuler().yaw; 96 96 Quaternion mixQuaternion=ahrsEuler.ToQuaternion(); 97 97 … … 261 261 262 262 void CircleFollower::VrpnPositionHold(void) { 263 Euler vrpn_euler; 264 Vector3D vrpn_pos; 265 266 uavVrpn->GetEuler(vrpn_euler); 267 yawHold=vrpn_euler.yaw; 268 269 uavVrpn->GetPosition(vrpn_pos); 270 vrpn_pos.To2Dxy(posHold); 263 Quaternion vrpnQuaternion; 264 uavVrpn->GetQuaternion(vrpnQuaternion); 265 yawHold=vrpnQuaternion.ToEuler().yaw; 266 267 Vector3D vrpnPosition; 268 uavVrpn->GetPosition(vrpnPosition); 269 vrpnPosition.To2Dxy(posHold); 271 270 272 271 uX->Reset();
Note:
See TracChangeset
for help on using the changeset viewer.