Copter: replace get_rate_bf_targets with get_rate_ef_targets

This commit is contained in:
Randy Mackay 2023-01-06 16:57:16 +09:00 committed by Andrew Tridgell
parent 53dd638826
commit 3763fd8121
2 changed files with 9 additions and 4 deletions

View File

@ -750,10 +750,15 @@ bool Copter::get_wp_crosstrack_error_m(float &xtrack_error) const
return true;
}
// get the target body-frame angular velocities in rad/s (Z-axis component used by some gimbals)
bool Copter::get_rate_bf_targets(Vector3f& rate_bf_targets) const
// get the target earth-frame angular velocities in rad/s (Z-axis component used by some gimbals)
bool Copter::get_rate_ef_targets(Vector3f& rate_ef_targets) const
{
rate_bf_targets = attitude_control->rate_bf_targets();
// always returns zero vector if landed or disarmed
if (copter.ap.land_complete) {
rate_ef_targets.zero();
} else {
rate_ef_targets = attitude_control->get_rate_ef_targets();
}
return true;
}

View File

@ -687,7 +687,7 @@ private:
bool get_wp_distance_m(float &distance) const override;
bool get_wp_bearing_deg(float &bearing) const override;
bool get_wp_crosstrack_error_m(float &xtrack_error) const override;
bool get_rate_bf_targets(Vector3f& rate_bf_targets) const override;
bool get_rate_ef_targets(Vector3f& rate_ef_targets) const override;
// Attitude.cpp
void update_throttle_hover();