[math] use double in ecef_of_lla_d

This commit is contained in:
Felix Ruess
2013-05-20 01:08:15 +02:00
parent c84095b1cb
commit 45e46d96ef
+1 -1
View File
@@ -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 cos_lat = cos(lla->lat);
const double sin_lon = sin(lla->lon); const double sin_lon = sin(lla->lon);
const double cos_lon = cos(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; const double a_chi = a / chi;
ecef->x = (a_chi + lla->alt) * cos_lat * cos_lon; ecef->x = (a_chi + lla->alt) * cos_lat * cos_lon;