summaryrefslogtreecommitdiff
path: root/gpssim.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-01-08 03:50:52 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-01-08 03:50:52 +0000
commit1f3ac4d1f2cf5d67a3a0a22cb2e692bb6c885893 (patch)
treed31d8e8ff8ea9068bb37ba2aa2945fdbb75f57db /gpssim.py
parent75db070a2d69276a6f6dcfeecf62869b3fbd8c36 (diff)
downloadgpsd-1f3ac4d1f2cf5d67a3a0a22cb2e692bb6c885893.tar.gz
gpssim uses the new geodetic-separation wrapper.
Diffstat (limited to 'gpssim.py')
-rw-r--r--gpssim.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/gpssim.py b/gpssim.py
index ff16e854..d2251343 100644
--- a/gpssim.py
+++ b/gpssim.py
@@ -4,7 +4,7 @@ A GPS simulator.
This is proof-of-concept code, not production ready; some functions are stubs.
"""
import sys, math, random, exceptions
-import gps
+import gps, gpslib
# First, the mathematics. We simulate a moving viewpoint on the Earth
# and a satellite with specified orbital elements in the sky.
@@ -204,9 +204,7 @@ class NMEA:
if sim.mode == gps.MODE_3D:
gga += "%.1f,M" % self.ksv.lat
gga += ","
- # Geodetic separation goes her
- # gga += "%.3f,M," % separation
- gga += ","
+ gga += "%.3f,M," % gpslib.wg84_separation(sim.ksv.lat, sim.ksv.lon)
# Magnetic variation goes here
# gga += "%3.2f,M," % mag_var
gga += ",,"