LCOV - code coverage report
Current view: top level - home/pbarker/rc/ardupilot/ArduPlane - pullup.h (source / functions) Hit Total Coverage
Test: lcov.info Lines: 3 3 100.0 %
Date: 2026-09-09 11:02:08 Functions: 1 1 100.0 %

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : /*
       4             :   support for pullup after NAV_ALTITUDE_WAIT for gliders
       5             :  */
       6             : 
       7             : #ifndef AP_PLANE_GLIDER_PULLUP_ENABLED
       8             : #define AP_PLANE_GLIDER_PULLUP_ENABLED CONFIG_HAL_BOARD == HAL_BOARD_SITL
       9             : #endif
      10             : 
      11             : #if AP_PLANE_GLIDER_PULLUP_ENABLED
      12             : 
      13             : class GliderPullup
      14             : {
      15             : public:
      16             :     GliderPullup(void);
      17             : 
      18           2 :     void reset(void) {
      19           2 :         stage = Stage::NONE;
      20           2 :     }
      21             :     bool in_pullup() const;
      22             :     bool verify_pullup(void);
      23             :     void stabilize_pullup(void);
      24             :     bool pullup_complete(void);
      25             :     bool pullup_start(void);
      26             : 
      27             :     enum class Stage : uint8_t {
      28             :         NONE=0,
      29             :         WAIT_AIRSPEED,
      30             :         WAIT_PITCH,
      31             :         WAIT_LEVEL,
      32             :         PUSH_NOSE_DOWN,
      33             :     };
      34             : 
      35             :     static const struct AP_Param::GroupInfo var_info[];
      36             : 
      37             : private:
      38             :     Stage stage;
      39             :     AP_Int8  enable;
      40             :     AP_Float elev_offset; // fraction of full elevator applied during WAIT_AIRSPEED and released during WAIT_PITCH
      41             :     AP_Float ng_limit;
      42             :     AP_Float airspeed_start;
      43             :     AP_Float pitch_start;
      44             :     AP_Float ng_jerk_limit;
      45             :     AP_Float pitch_dem;
      46             :     float ng_demand;
      47             : };
      48             : 
      49             : #endif // AP_PLANE_GLIDER_PULLUP_ENABLED
      50             : 

Generated by: LCOV version 1.14