diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2005-04-07 00:37:56 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2005-04-07 00:37:56 +0000 |
commit | 41cbe4abc4cf687a412e4bafe107d71ec04f8841 (patch) | |
tree | d02d3f6d8f9764cb3e24c684385b53388805f2fa /geoid.c | |
parent | 67b71a2fd2743deff94a80db3e3d70724876b7f0 (diff) | |
download | gpsd-41cbe4abc4cf687a412e4bafe107d71ec04f8841.tar.gz |
Apparently I had the sign on the geoid correction wrong.
Diffstat (limited to 'geoid.c')
-rw-r--r-- | geoid.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -89,7 +89,7 @@ void ecef_to_wgs84fix(struct gps_fix_t *fix, h = p / cos(phi) - n; fix->latitude = phi * RAD_2_DEG; fix->longitude = lambda * RAD_2_DEG; - fix->altitude = h + wgs84_separation(fix->latitude, fix->longitude); + fix->altitude = h - wgs84_separation(fix->latitude, fix->longitude); /* velocity computation */ vnorth = -vx*sin(phi)*cos(lambda)-vy*sin(phi)*sin(lambda)+vz*cos(phi); veast = -vx*sin(lambda)+vy*cos(lambda); |