Changeset 167 in flair-src for trunk/demos/Gps/uav
- Timestamp:
- Apr 12, 2017, 1:59:38 PM (8 years ago)
- Location:
- trunk/demos/Gps/uav/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/demos/Gps/uav/src/DemoGps.cpp
r159 r167 79 79 80 80 AhrsData* DemoGps::GetReferenceOrientation(void) { 81 Vector2D pos_err, vel_err; // in Uav coordinate system81 Vector2Df pos_err, vel_err; // in Uav coordinate system 82 82 float yaw_ref; 83 83 Euler refAngles; … … 95 95 refAngles.roll = -uY->Output(); 96 96 97 customReferenceOrientation->SetQuaternionAndAngularRates(refAngles.ToQuaternion(), Vector3D (0, 0, 0));97 customReferenceOrientation->SetQuaternionAndAngularRates(refAngles.ToQuaternion(), Vector3Df(0, 0, 0)); 98 98 99 99 return customReferenceOrientation; 100 100 } 101 101 102 void DemoGps::PositionValues(Vector2D & pos_error, Vector2D& vel_error, float& yaw_ref) {103 Vector3D uav_pos, uav_vel;104 Vector2D uav_2Dpos, uav_2Dvel;102 void DemoGps::PositionValues(Vector2Df& pos_error, Vector2Df& vel_error, float& yaw_ref) { 103 Vector3Df uav_pos, uav_vel; 104 Vector2Df uav_2Dpos, uav_2Dvel; 105 105 106 106 // TODO GPS position and circle center … … 116 116 yaw_ref = yawHold; 117 117 } else { // Circle 118 Vector2D circle_pos, circle_vel;119 Vector2D target_2Dpos;118 Vector2Df circle_pos, circle_vel; 119 Vector2Df target_2Dpos; 120 120 121 121 circle->SetCenter(target_2Dpos); … … 190 190 return; 191 191 } 192 Vector3D uav_pos;193 Vector2D uav_2Dpos, target_2Dpos;192 Vector3Df uav_pos; 193 Vector2Df uav_2Dpos, target_2Dpos; 194 194 195 195 circle->SetCenter(target_2Dpos); -
trunk/demos/Gps/uav/src/DemoGps.h
r122 r167 51 51 void ExtraCheckPushButton(void); 52 52 void ExtraCheckJoystick(void); 53 void PositionValues(flair::core::Vector2D &pos_error,flair::core::Vector2D&vel_error,float &yaw_ref);53 void PositionValues(flair::core::Vector2Df &pos_error,flair::core::Vector2Df &vel_error,float &yaw_ref); 54 54 flair::core::AhrsData *GetReferenceOrientation(void); 55 55 void SignalEvent(Event_t event); … … 57 57 flair::filter::Pid *uX, *uY; 58 58 59 flair::core::Vector2D posHold;59 flair::core::Vector2Df posHold; 60 60 float yawHold; 61 61
Note:
See TracChangeset
for help on using the changeset viewer.