mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 14:53:35 +08:00
navigator: home_positionvalid -> global_home_position_valid
This is to make clear that the relevant part of the home position message for navigator is the global one. Local home position isn't required as everything is done in global coordinates. The specific home_alt_valid is used when lat/lon are not used
This commit is contained in:
committed by
Mathieu Bresciani
parent
d2f2ba59a4
commit
3f3a4ac5c1
@@ -83,7 +83,7 @@ void RTL::on_inactive()
|
||||
if ((hrt_absolute_time() - _destination_check_time) > 1_s) {
|
||||
_destination_check_time = hrt_absolute_time();
|
||||
|
||||
if (_navigator->home_position_valid()) {
|
||||
if (_navigator->home_global_position_valid()) {
|
||||
find_RTL_destination();
|
||||
}
|
||||
|
||||
@@ -723,7 +723,7 @@ void RTL::calc_and_pub_rtl_time_estimate()
|
||||
|
||||
// Calculate RTL time estimate only when there is a valid home position
|
||||
// TODO: Also check if vehicle position is valid
|
||||
if (!_navigator->home_position_valid()) {
|
||||
if (!_navigator->home_global_position_valid()) {
|
||||
rtl_time_estimate.valid = false;
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user