mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 16:43:34 +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
@@ -247,7 +247,7 @@ bool Geofence::isCloserThanMaxDistToHome(double lat, double lon, float altitude)
|
||||
{
|
||||
bool inside_fence = true;
|
||||
|
||||
if (isHomeRequired() && _navigator->home_position_valid()) {
|
||||
if (isHomeRequired() && _navigator->home_global_position_valid()) {
|
||||
|
||||
const float max_horizontal_distance = _param_gf_max_hor_dist.get();
|
||||
|
||||
@@ -281,7 +281,7 @@ bool Geofence::isBelowMaxAltitude(float altitude)
|
||||
{
|
||||
bool inside_fence = true;
|
||||
|
||||
if (isHomeRequired() && _navigator->home_position_valid()) {
|
||||
if (isHomeRequired() && _navigator->home_alt_valid()) {
|
||||
|
||||
const float max_vertical_distance = _param_gf_max_ver_dist.get();
|
||||
const float home_alt = _navigator->get_home_position()->alt;
|
||||
|
||||
Reference in New Issue
Block a user