mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
geo remove use of DBL_EPSILON
-this doesn't seem to be (obviously?) available on qurt
This commit is contained in:
committed by
Lorenz Meier
parent
cb63f16d48
commit
50631e5d98
+2
-2
@@ -144,7 +144,7 @@ int map_projection_project(const struct map_projection_reference_s *ref, double
|
|||||||
|
|
||||||
double k = 1.0;
|
double k = 1.0;
|
||||||
|
|
||||||
if (fabs(c) >= DBL_EPSILON) {
|
if (fabs(c) > 0) {
|
||||||
k = (c / sin(c));
|
k = (c / sin(c));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ int map_projection_reproject(const struct map_projection_reference_s *ref, float
|
|||||||
const double y_rad = (double)y / CONSTANTS_RADIUS_OF_EARTH;
|
const double y_rad = (double)y / CONSTANTS_RADIUS_OF_EARTH;
|
||||||
const double c = sqrt(x_rad * x_rad + y_rad * y_rad);
|
const double c = sqrt(x_rad * x_rad + y_rad * y_rad);
|
||||||
|
|
||||||
if (fabs(c) > DBL_EPSILON) {
|
if (fabs(c) > 0) {
|
||||||
const double sin_c = sin(c);
|
const double sin_c = sin(c);
|
||||||
const double cos_c = cos(c);
|
const double cos_c = cos(c);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user