Skip to content

Commit

Permalink
APM_Control: remove public AP_PitchController::get_coordination_rate_…
Browse files Browse the repository at this point in the history
…of|cat()
  • Loading branch information
Andrew Tridgell committed Oct 4, 2013
1 parent 44eedd4 commit d27f5e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
18 changes: 6 additions & 12 deletions libraries/APM_Control/AP_PitchController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,12 @@ int32_t AP_PitchController::_get_rate_out(float desired_rate, float scaler, bool
*/
int32_t AP_PitchController::get_rate_out(float desired_rate, float scaler)
{
return _get_rate_out(desired_rate, scaler, false, 0);
float aspeed;
if (!_ahrs.airspeed_estimate(&aspeed)) {
// If no airspeed available use average of min and max
aspeed = 0.5f*(float(aparm.airspeed_min) + float(aparm.airspeed_max));
}
return _get_rate_out(desired_rate, scaler, false, aspeed);
}

/*
Expand Down Expand Up @@ -219,17 +224,6 @@ float AP_PitchController::_get_coordination_rate_offset(float &aspeed, bool &inv
return rate_offset;
}

/*
get the rate offset in degrees/second needed for pitch in body frame
to maintain height in a coordinated turn.
*/
float AP_PitchController::get_coordination_rate_offset(void) const
{
float aspeed;
bool inverted;
return _get_coordination_rate_offset(aspeed, inverted);
}

// Function returns an equivalent elevator deflection in centi-degrees in the range from -4500 to 4500
// A positive demand is up
// Inputs are:
Expand Down
1 change: 0 additions & 1 deletion libraries/APM_Control/AP_PitchController.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class AP_PitchController {

int32_t get_rate_out(float desired_rate, float scaler);
int32_t get_servo_out(int32_t angle_err, float scaler, bool disable_integrator);
float get_coordination_rate_offset(void) const;

void reset_I();

Expand Down

0 comments on commit d27f5e8

Please sign in to comment.