From 45e46d96ef27b323e405001f90ed336d01c4bccd Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Mon, 20 May 2013 01:08:15 +0200 Subject: [PATCH] [math] use double in ecef_of_lla_d --- sw/airborne/math/pprz_geodetic_double.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sw/airborne/math/pprz_geodetic_double.c b/sw/airborne/math/pprz_geodetic_double.c index 371eac115a..5a9d9bcec6 100644 --- a/sw/airborne/math/pprz_geodetic_double.c +++ b/sw/airborne/math/pprz_geodetic_double.c @@ -74,7 +74,7 @@ void ecef_of_lla_d(struct EcefCoor_d* ecef, struct LlaCoor_d* lla) { const double cos_lat = cos(lla->lat); const double sin_lon = sin(lla->lon); const double cos_lon = cos(lla->lon); - const double chi = sqrtf(1. - e2*sin_lat*sin_lat); + const double chi = sqrt(1. - e2*sin_lat*sin_lat); const double a_chi = a / chi; ecef->x = (a_chi + lla->alt) * cos_lat * cos_lon;