diff options
author | Gary E. Miller <gem@rellim.com> | 2016-03-31 19:26:53 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2016-03-31 19:26:53 -0700 |
commit | 20fe9920129a8f8090badd5eebf12b22d13de846 (patch) | |
tree | 47367e34d203616ad456bafa7ac62f1fa6b314ba /geoid.c | |
parent | 9b4c18b947030cf5dc54f9e773ce03e86fda72f3 (diff) | |
download | gpsd-20fe9920129a8f8090badd5eebf12b22d13de846.tar.gz |
if isnan() climb or speed, reset them to zero.
Diffstat (limited to 'geoid.c')
-rw-r--r-- | geoid.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -128,7 +128,7 @@ void ecef_to_wgs84fix(struct gps_fix_t *fix, double *separation, vz * sin(phi); /* sanity check the climb, 10,000 m/s max will do */ if ( isnan(fix->climb) ) - fix->climb = 9999.9; + fix->climb = 0; else if ( 9999.9 < fix->climb ) fix->climb = 9999.9; else if ( -9999.9 > fix->speed ) @@ -137,7 +137,7 @@ void ecef_to_wgs84fix(struct gps_fix_t *fix, double *separation, fix->speed = sqrt(pow(vnorth, 2) + pow(veast, 2)); /* sanity check the speed, 10,000 m/s max will do */ if ( isnan(fix->speed) ) - fix->speed = 9999.9; + fix->speed = 0; else if ( 9999.9 < fix->speed ) fix->speed = 9999.9; else if ( -9999.9 > fix->speed ) |