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

modifs pour template vectors

File:
1 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);
Note: See TracChangeset for help on using the changeset viewer.