mirror of https://github.com/ArduPilot/ardupilot
AP_Landing: Add an interface to poll if we should be setting fly_forward in AHRS
This commit is contained in:
parent
d80aecfd2d
commit
64fb09fb38
|
@ -589,3 +589,20 @@ bool AP_Landing::is_throttle_suppressed(void) const
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* returns false when the vehicle might not be flying forward while landing
|
||||
*/
|
||||
bool AP_Landing::is_flying_forward(void) const
|
||||
{
|
||||
if (!flags.in_progress) {
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case TYPE_DEEPSTALL:
|
||||
return deepstall.is_flying_forward();
|
||||
case TYPE_STANDARD_GLIDE_SLOPE:
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,6 +68,7 @@ public:
|
|||
bool is_on_approach(void) const;
|
||||
bool is_ground_steering_allowed(void) const;
|
||||
bool is_throttle_suppressed(void) const;
|
||||
bool is_flying_forward(void) const;
|
||||
void handle_flight_stage_change(const bool _in_landing_stage);
|
||||
int32_t constrain_roll(const int32_t desired_roll_cd, const int32_t level_roll_limit_cd);
|
||||
bool get_target_altitude_location(Location &location);
|
||||
|
|
|
@ -343,6 +343,11 @@ bool AP_Landing_Deepstall::is_throttle_suppressed(void) const
|
|||
return stage == DEEPSTALL_STAGE_LAND;
|
||||
}
|
||||
|
||||
bool AP_Landing_Deepstall::is_flying_forward(void) const
|
||||
{
|
||||
return stage != DEEPSTALL_STAGE_LAND;
|
||||
}
|
||||
|
||||
bool AP_Landing_Deepstall::get_target_altitude_location(Location &location)
|
||||
{
|
||||
memcpy(&location, &landing_point, sizeof(Location));
|
||||
|
|
|
@ -95,6 +95,7 @@ private:
|
|||
bool get_target_altitude_location(Location &location);
|
||||
int32_t get_target_airspeed_cm(void) const;
|
||||
bool is_throttle_suppressed(void) const;
|
||||
bool is_flying_forward(void) const;
|
||||
|
||||
const DataFlash_Class::PID_Info& get_pid_info(void) const;
|
||||
|
||||
|
|
Loading…
Reference in New Issue