diff --git a/libraries/AP_SpdHgtControl/AP_SpdHgtControl.h b/libraries/AP_SpdHgtControl/AP_SpdHgtControl.h index 7510b132c7..9c563a495a 100644 --- a/libraries/AP_SpdHgtControl/AP_SpdHgtControl.h +++ b/libraries/AP_SpdHgtControl/AP_SpdHgtControl.h @@ -24,11 +24,22 @@ public: // Should be called at 50Hz or faster virtual void update_50hz(float height_above_field) = 0; + /** + stages of flight so the altitude controller can choose to + prioritise height or speed + */ + enum FlightStage { + FLIGHT_NORMAL = 1, + FLIGHT_TAKEOFF = 2, + FLIGHT_LAND_APPROACH = 3, + FLIGHT_LAND_FINAL = 4 + }; + // Update of the pitch and throttle demands // Should be called at 10Hz or faster virtual void update_pitch_throttle( int32_t hgt_dem_cm, int32_t EAS_dem_cm, - bool climbOutDem, + enum FlightStage flight_stage, int32_t ptchMinCO_cd, int16_t throttle_nudge, float hgt_afe) = 0; @@ -53,6 +64,7 @@ public: enum ControllerType { CONTROLLER_TECS = 1 }; + };