mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 23:53:34 +08:00
Merge pull request #1366 from PX4/geofencehotfix
geofence: lat/lon is double
This commit is contained in:
@@ -76,11 +76,7 @@ Geofence::~Geofence()
|
|||||||
|
|
||||||
bool Geofence::inside(const struct vehicle_global_position_s *vehicle)
|
bool Geofence::inside(const struct vehicle_global_position_s *vehicle)
|
||||||
{
|
{
|
||||||
double lat = vehicle->lat / 1e7d;
|
return inside(vehicle->lat, vehicle->lon, vehicle->alt);
|
||||||
double lon = vehicle->lon / 1e7d;
|
|
||||||
//float alt = vehicle->alt;
|
|
||||||
|
|
||||||
return inside(lat, lon, vehicle->alt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Geofence::inside(double lat, double lon, float altitude)
|
bool Geofence::inside(double lat, double lon, float altitude)
|
||||||
|
|||||||
Reference in New Issue
Block a user