Changeset 167 in flair-src for trunk/demos/Gps/uav/src


Ignore:
Timestamp:
Apr 12, 2017, 1:59:38 PM (8 years ago)
Author:
Sanahuja Guillaume
Message:

modifs pour template vectors

Location:
trunk/demos/Gps/uav/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/demos/Gps/uav/src/DemoGps.cpp

    r159 r167  
    7979
    8080AhrsData* DemoGps::GetReferenceOrientation(void) {
    81   Vector2D pos_err, vel_err; // in Uav coordinate system
     81  Vector2Df pos_err, vel_err; // in Uav coordinate system
    8282  float yaw_ref;
    8383  Euler refAngles;
     
    9595  refAngles.roll = -uY->Output();
    9696
    97   customReferenceOrientation->SetQuaternionAndAngularRates(refAngles.ToQuaternion(), Vector3D(0, 0, 0));
     97  customReferenceOrientation->SetQuaternionAndAngularRates(refAngles.ToQuaternion(), Vector3Df(0, 0, 0));
    9898
    9999  return customReferenceOrientation;
    100100}
    101101
    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;
     102void DemoGps::PositionValues(Vector2Df& pos_error, Vector2Df& vel_error, float& yaw_ref) {
     103  Vector3Df uav_pos, uav_vel;
     104  Vector2Df uav_2Dpos, uav_2Dvel;
    105105
    106106  // TODO GPS position and circle center
     
    116116    yaw_ref = yawHold;
    117117  } else { // Circle
    118     Vector2D circle_pos, circle_vel;
    119     Vector2D target_2Dpos;
     118    Vector2Df circle_pos, circle_vel;
     119    Vector2Df target_2Dpos;
    120120
    121121    circle->SetCenter(target_2Dpos);
     
    190190    return;
    191191  }
    192   Vector3D uav_pos;
    193   Vector2D uav_2Dpos, target_2Dpos;
     192  Vector3Df uav_pos;
     193  Vector2Df uav_2Dpos, target_2Dpos;
    194194
    195195  circle->SetCenter(target_2Dpos);
  • trunk/demos/Gps/uav/src/DemoGps.h

    r122 r167  
    5151        void ExtraCheckPushButton(void);
    5252        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);
    5454        flair::core::AhrsData *GetReferenceOrientation(void);
    5555        void SignalEvent(Event_t event);
     
    5757        flair::filter::Pid *uX, *uY;
    5858
    59         flair::core::Vector2D posHold;
     59        flair::core::Vector2Df posHold;
    6060        float yawHold;
    6161
Note: See TracChangeset for help on using the changeset viewer.