Changeset 432 in flair-src for trunk/lib/FlairMeta/src/UavStateMachine.h


Ignore:
Timestamp:
07/12/21 11:19:21 (7 months ago)
Author:
Sanahuja Guillaume
Message:

add AltitudeSensor class
failsafe altitude sensor in changeable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairMeta/src/UavStateMachine.h

    r313 r432  
    2626
    2727namespace flair {
    28 namespace core {
    29 class FrameworkManager;
    30 class AhrsData;
    31 class io_data;
    32 }
    33 namespace gui {
    34 class PushButton;
    35 class GridLayout;
    36 class Tab;
    37 class DoubleSpinBox;
    38 }
    39 namespace filter {
    40 class ControlLaw;
    41 class NestedSat;
    42 class Pid;
    43 class PidThrust;
    44 class TrajectoryGenerator1D;
    45 }
    46 namespace sensor {
    47 class TargetController;
    48 }
    49 namespace meta {
    50 class MetaDualShock3;
    51 class Uav;
    52 }
     28  namespace core {
     29    class FrameworkManager;
     30    class AhrsData;
     31    class io_data;
     32  }
     33  namespace gui {
     34    class PushButton;
     35    class GridLayout;
     36    class Tab;
     37    class DoubleSpinBox;
     38  }
     39  namespace filter {
     40    class ControlLaw;
     41    class NestedSat;
     42    class Pid;
     43    class PidThrust;
     44    class TrajectoryGenerator1D;
     45  }
     46  namespace sensor {
     47    class TargetController;
     48    class AltitudeSensor;
     49  }
     50  namespace meta {
     51    class MetaDualShock3;
     52    class Uav;
     53  }
    5354}
    5455
     
    102103  };
    103104
    104         UavStateMachine(sensor::TargetController* controller);
    105         ~UavStateMachine();
     105  UavStateMachine(sensor::TargetController* controller);
     106  ~UavStateMachine();
    106107
    107108  const core::Quaternion &GetCurrentQuaternion(void) const;
     
    109110  const core::Vector3Df &GetCurrentAngularSpeed(void) const;
    110111
    111         void Land(void);
    112         void EmergencyLand(void);
    113         void TakeOff(void);
    114         void EmergencyStop(void);
    115         //! Used to signal an event
    116         /*!
    117             \param event the event which occured
    118         */
    119         virtual void SignalEvent(Event_t event);
     112  void Land(void);
     113  void EmergencyLand(void);
     114  void TakeOff(void);
     115  void EmergencyStop(void);
     116  //! Used to signal an event
     117  /*!
     118      \param event the event which occured
     119  */
     120  virtual void SignalEvent(Event_t event);
    120121
    121122  virtual const core::AhrsData *GetOrientation(void) const;
     
    126127  bool ExitFailSafeMode(void);
    127128  void FailSafeAltitudeValues(float &z, float &dz) const; // in uav coordinate!
     129 
     130  /*!
     131  * \brief Set the FailSafe AltitudeSensor
     132  *
     133  * by default, the failsafe AltitudeSensor is the MetaUsRangeFinder
     134  * you can change it (by a vrpn one) using this method in the case us range finder is not working well
     135  * use it carefully, trusting only vrpn can be risquee
     136  *
     137  * \param altitudeSensor altitudeSensor to use when is failsafe
     138  */
     139  void SetFailSafeAltitudeSensor(sensor::AltitudeSensor *altitudeSensor);
    128140
    129141  gui::GridLayout *GetButtonsLayout(void) const;
     
    306318  filter::PidThrust *uZ;
    307319  filter::TrajectoryGenerator1D *altitudeTrajectory;
     320  sensor::AltitudeSensor *failSafeAltitudeSensor;
    308321};
    309 };
    310 };
     322}; // end namespace meta
     323}; // end namespace flair
    311324#endif // UAVSTATEMACHINE_H
Note: See TracChangeset for help on using the changeset viewer.