Skip to content

Commit

Permalink
Altered toMaiden Call for Maidenhead 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
m0iax committed May 30, 2019
1 parent d07edf1 commit ca45595
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
Binary file added __pycache__/gps_listener.cpython-37.pyc
Binary file not shown.
23 changes: 15 additions & 8 deletions gps_listener.py
Expand Up @@ -62,18 +62,25 @@ def run(self):

data = self.session.next()
if data['class'] == 'TPV':

lat= getattr(data,'lat',0.0)
lon = getattr(data, 'lon', 0.0)
#
gpstime = getattr(data,'time', 0)
#
grid = mh.toMaiden(lat, lon, 4)

self.current_lat = lat
self.current_lon = lon
self.current_gpstime = gpstime
self.current_mhgrid = grid
currentMHGrid = grid
#
if gpstime=="0":
self.currentmhgrid="No Fix"
else:
latlon = (lat,lon)

grid = mh.toMaiden(lat, lon, precision=4)

#grid = mh.toMaiden(lat, lon, 4)
self.current_lat = lat
self.current_lon = lon
self.current_gpstime = gpstime
self.current_mhgrid = grid
currentMHGrid = grid

time.sleep(1)

Expand Down

0 comments on commit ca45595

Please sign in to comment.