mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
ArduPlane: add _cm to get_vector_from_origin_NEU
... and the _NE equivalent. Moves us closer to using metres in interfaces. Several places already *0.01 the result of these methods
This commit is contained in:
committed by
Randy Mackay
parent
e696676589
commit
6a06efa8d7
@@ -54,7 +54,7 @@ void ModeQLoiter::run()
|
||||
if (last_pos_set_ms != 0 && now - last_pos_set_ms < precland_timeout_ms) {
|
||||
// we have an active landing target override
|
||||
Vector2f rel_origin;
|
||||
if (plane.next_WP_loc.get_vector_xy_from_origin_NE(rel_origin)) {
|
||||
if (plane.next_WP_loc.get_vector_xy_from_origin_NE_cm(rel_origin)) {
|
||||
quadplane.pos_control->set_pos_desired_NE_cm(rel_origin);
|
||||
last_target_loc_set_ms = 0;
|
||||
}
|
||||
|
||||
@@ -60,8 +60,8 @@ void ModeThermal::update_soaring()
|
||||
AP_Mission::Mission_Command prev_nav_cmd;
|
||||
|
||||
if (!(plane.mission.get_next_nav_cmd(plane.mission.get_prev_nav_cmd_with_wp_index(), prev_nav_cmd) &&
|
||||
prev_nav_cmd.content.location.get_vector_xy_from_origin_NE(prev_wp) &&
|
||||
current_nav_cmd.content.location.get_vector_xy_from_origin_NE(next_wp))) {
|
||||
prev_nav_cmd.content.location.get_vector_xy_from_origin_NE_cm(prev_wp) &&
|
||||
current_nav_cmd.content.location.get_vector_xy_from_origin_NE_cm(next_wp))) {
|
||||
prev_wp.zero();
|
||||
next_wp.zero();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user