Plane: convert airspeed_error_cmd to airspeed_error (in meters)

This commit is contained in:
Tom Pittenger 2016-05-10 12:44:16 -07:00
parent 0281b948df
commit 8a58f5a5eb
3 changed files with 4 additions and 4 deletions

View File

@ -371,7 +371,7 @@ void Plane::send_nav_controller_output(mavlink_channel_t chan)
nav_controller->target_bearing_cd() * 0.01f,
auto_state.wp_distance,
altitude_error_cm * 0.01f,
airspeed_error_cm,
airspeed_error * 100,
nav_controller->crosstrack_error());
}

View File

@ -359,8 +359,8 @@ private:
// Also used for flap deployment criteria. Centimeters per second.
int32_t target_airspeed_cm;
// The difference between current and desired airspeed. Used in the pitch controller. Centimeters per second.
float airspeed_error_cm;
// The difference between current and desired airspeed. Used in the pitch controller. Meters per second.
float airspeed_error;
// An amount that the airspeed should be increased in auto modes based on the user positioning the
// throttle stick in the top half of the range. Centimeters per second.

View File

@ -143,7 +143,7 @@ void Plane::calc_airspeed_errors()
// use the TECS view of the target airspeed for reporting, to take
// account of the landing speed
airspeed_error_cm = SpdHgt_Controller->get_target_airspeed()*100 - airspeed_measured_cm;
airspeed_error = SpdHgt_Controller->get_target_airspeed() - airspeed_measured_cm * 0.01f;
}
void Plane::calc_gndspeed_undershoot()