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:
Peter Barker
2025-04-29 08:29:41 +09:00
committed by Randy Mackay
parent e696676589
commit 6a06efa8d7
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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;
}
+2 -2
View File
@@ -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();
}