mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-08 02:17:07 +08:00
geofence: lat/lon is double
This is the same change as 5832948371 but
against the master branch.
Some time ago the type of lat and lon in the global_pos uorb topic was
changed but this use here was missed.
This commit is contained in:
@@ -76,11 +76,7 @@ Geofence::~Geofence()
|
||||
|
||||
bool Geofence::inside(const struct vehicle_global_position_s *vehicle)
|
||||
{
|
||||
double lat = vehicle->lat / 1e7d;
|
||||
double lon = vehicle->lon / 1e7d;
|
||||
//float alt = vehicle->alt;
|
||||
|
||||
return inside(lat, lon, vehicle->alt);
|
||||
return inside(vehicle->lat, vehicle->lon, vehicle->alt);
|
||||
}
|
||||
|
||||
bool Geofence::inside(double lat, double lon, float altitude)
|
||||
|
||||
Reference in New Issue
Block a user