summaryrefslogtreecommitdiff
path: root/geoid.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2005-05-27 19:45:25 +0000
committerEric S. Raymond <esr@thyrsus.com>2005-05-27 19:45:25 +0000
commitb297ae5a6ba32c36d5bd352524d318f967a61dfa (patch)
tree62ed46de815ae6c3b87c1849d4996aecc0b55c21 /geoid.c
parent7a1fdd3999e03cacf4599685517dd906f593323c (diff)
downloadgpsd-b297ae5a6ba32c36d5bd352524d318f967a61dfa.tar.gz
698 splint warnings.
Diffstat (limited to 'geoid.c')
-rw-r--r--geoid.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/geoid.c b/geoid.c
index c0e1d0e8..f6016eaa 100644
--- a/geoid.c
+++ b/geoid.c
@@ -84,7 +84,8 @@ void ecef_to_wgs84fix(struct gps_fix_t *fix,
/* geodetic location */
lambda = atan2(y,x);
- p = sqrt(pow(x,2) + pow(y,2));
+ /*@ -evalorder @*/
+ p = sqrt(pow(x,2) + pow(y,2));
theta = atan2(z*a,p*b);
phi = atan2(z + e_2*b*pow(sin(theta),3),p - e2*a*pow(cos(theta),3));
n = a / sqrt(1.0 - e2*pow(sin(phi),2));
@@ -99,6 +100,7 @@ void ecef_to_wgs84fix(struct gps_fix_t *fix,
fix->climb = vx*cos(phi)*cos(lambda)+vy*cos(phi)*sin(lambda)+vz*sin(phi);
fix->speed = sqrt(pow(vnorth,2) + pow(veast,2));
heading = atan2(veast,vnorth);
+ /*@ +evalorder @*/
if (heading < 0)
heading += 2 * PI;
fix->track = heading * RAD_2_DEG;