mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 01:23:34 +08:00
Prevent some warnings for lat/lon double conversions
This commit is contained in:
+2
-2
@@ -513,8 +513,8 @@ __EXPORT bool inside_geofence(const struct vehicle_global_position_s *vehicle, c
|
||||
|
||||
unsigned int i, j, vertices = fence->count;
|
||||
bool c = false;
|
||||
double lat = vehicle->lat / 1e7;
|
||||
double lon = vehicle->lon / 1e7;
|
||||
double lat = vehicle->lat / 1e7d;
|
||||
double lon = vehicle->lon / 1e7d;
|
||||
|
||||
// skip vertex 0 (return point)
|
||||
for (i = 0, j = vertices - 1; i < vertices; j = i++)
|
||||
|
||||
Reference in New Issue
Block a user