Added HDT, HDM and fixed formatting bug
This commit is contained in:
parent
7af6cecfbc
commit
97353c83a6
|
@ -168,10 +168,10 @@ class BoatValueGeo(BoatValue):
|
|||
minutes = (self.value - degrees) * 60
|
||||
if self.geofmt == 'lat':
|
||||
direction = ('E' if self.value > 0 else 'W')
|
||||
formatted = "{0}° {1:.{3}f}' {2}".format(degrees, minutes, direction, decpl)
|
||||
formatted = "{0}° {1:.{3}f}' {2}".format(degrees, minutes, direction, self.decpl)
|
||||
elif self.geofmt == 'lon':
|
||||
direction = 'N' if self.value > 0 else 'S'
|
||||
formatted = "{0}° {1:.{3}f}' {2}".format(degrees, minutes, direction, decpl)
|
||||
formatted = "{0}° {1:.{3}f}' {2}".format(degrees, minutes, direction, self.decpl)
|
||||
else:
|
||||
formatted = str(self.placeholder)
|
||||
return formatted
|
||||
|
@ -407,6 +407,8 @@ class BoatData():
|
|||
self.gpst = BoatValueTime("GPST")
|
||||
self.sog = BoatValueSpeed("SOG", "kn")
|
||||
self.cog = BoatValueAngle("COG", "deg")
|
||||
self.hdm = BoatValueAngle("HDM", "deg")
|
||||
self.hdt = BoatValueAngle("HDT", "deg")
|
||||
self.xte = BoatValueDistance("XTE", "m")
|
||||
self.stw = BoatValueSpeed("STW", "kn")
|
||||
self.dbt = BoatValueDepth("DBT", "m")
|
||||
|
@ -467,6 +469,8 @@ class BoatData():
|
|||
'AWS': self.aws,
|
||||
'BTW': self.bearing,
|
||||
'COG': self.cog,
|
||||
'HDM': self.hdm,
|
||||
'HDT': self.hdt,
|
||||
'DBT': self.dbt,
|
||||
'DBS': self.dbs,
|
||||
'DTW': self.wpdist,
|
||||
|
|
Loading…
Reference in New Issue