Changeset 167 in flair-src for trunk/demos/SimpleFleet


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

modifs pour template vectors

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

Legend:

Unmodified
Added
Removed
  • trunk/demos/SimpleFleet/uav/src/SimpleFleet.cpp

    r136 r167  
    111111    //get roll, pitch and w from imu
    112112    Quaternion ahrsQuaternion;
    113     Vector3D ahrsAngularSpeed;
     113    Vector3Df ahrsAngularSpeed;
    114114    GetDefaultOrientation()->GetQuaternionAndAngularRates(ahrsQuaternion, ahrsAngularSpeed);
    115115
     
    124124
    125125void SimpleFleet::AltitudeValues(float &z,float &dz) const {
    126     Vector3D uav_pos,uav_vel;
     126    Vector3Df uav_pos,uav_vel;
    127127
    128128    uavVrpn->GetPosition(uav_pos);
     
    134134
    135135const AhrsData *SimpleFleet::GetReferenceOrientation(void) {
    136     Vector2D pos_err, vel_err; // in uav coordinate system
     136    Vector2Df pos_err, vel_err; // in uav coordinate system
    137137    float yaw_ref;
    138138    Euler refAngles;
     
    150150    refAngles.roll=-u_y->Output();
    151151
    152     customReferenceOrientation->SetQuaternionAndAngularRates(refAngles.ToQuaternion(),Vector3D(0,0,0));
     152    customReferenceOrientation->SetQuaternionAndAngularRates(refAngles.ToQuaternion(),Vector3Df(0,0,0));
    153153
    154154    return customReferenceOrientation;
    155155}
    156156
    157 void SimpleFleet::PositionValues(Vector2D &pos_error,Vector2D &vel_error,float &yaw_ref) {
    158     Vector3D uav_pos,uav_vel; // in VRPN coordinate system
    159     Vector2D uav_2Dpos,uav_2Dvel; // in VRPN coordinate system
     157void SimpleFleet::PositionValues(Vector2Df &pos_error,Vector2Df &vel_error,float &yaw_ref) {
     158    Vector3Df uav_pos,uav_vel; // in VRPN coordinate system
     159    Vector2Df uav_2Dpos,uav_2Dvel; // in VRPN coordinate system
    160160
    161161    uavVrpn->GetPosition(uav_pos);
     
    171171        yaw_ref=yawHold;
    172172    } else { //Circle
    173         Vector2D circle_pos,circle_vel;
    174         Vector2D target_2Dpos;
     173        Vector2Df circle_pos,circle_vel;
     174        Vector2Df target_2Dpos;
    175175
    176176        //circle center
     
    318318        return;
    319319    }
    320     Vector3D uav_pos;
    321     Vector2D uav_2Dpos,target_2Dpos;
     320    Vector3Df uav_pos;
     321    Vector2Df uav_2Dpos,target_2Dpos;
    322322
    323323    //circle center
     
    352352                yawHold=vrpnQuaternion.ToEuler().yaw;
    353353
    354                 Vector3D vrpnPosition;
     354                Vector3Df vrpnPosition;
    355355    uavVrpn->GetPosition(vrpnPosition);
    356356    vrpnPosition.To2Dxy(posHold);
  • trunk/demos/SimpleFleet/uav/src/SimpleFleet.h

    r135 r167  
    6363        const flair::core::AhrsData *GetOrientation(void) const;
    6464        void AltitudeValues(float &z,float &dz) const;
    65         void PositionValues(flair::core::Vector2D &pos_error,flair::core::Vector2D &vel_error,float &yaw_ref);
     65        void PositionValues(flair::core::Vector2Df &pos_error,flair::core::Vector2Df &vel_error,float &yaw_ref);
    6666        const flair::core::AhrsData *GetReferenceOrientation(void);
    6767        void SignalEvent(Event_t event);
     
    7070        flair::filter::Pid *u_x, *u_y;
    7171
    72         flair::core::Vector2D posHold;
     72        flair::core::Vector2Df posHold;
    7373        float yawHold;
    7474        flair::core::Socket *message;
Note: See TracChangeset for help on using the changeset viewer.