mirror of
https://github.com/ha7ilm/openwebrx.git
synced 2026-01-21 15:50:17 +01:00
Round instead of floor height conversion
This commit is contained in:
parent
daa499ab93
commit
32fe01f128
|
|
@ -64,10 +64,10 @@ IGLOGIN {callsign} {password}
|
|||
if "aprs_igate_height":
|
||||
try:
|
||||
height_m = float(pm["aprs_igate_height"])
|
||||
height_ft = int(height_m * FEET_PER_METER)
|
||||
height_ft = round(height_m * FEET_PER_METER)
|
||||
height = "HEIGHT=" + str(height_ft)
|
||||
except:
|
||||
logger.error("Cannot parse 'aprs_igate_height': " + str(pm["aprs_igate_height"]))
|
||||
logger.error("Cannot parse 'aprs_igate_height', expected float: " + str(pm["aprs_igate_height"]))
|
||||
|
||||
if((len(comment) > 0) and ((comment[0] != '"') or (comment[len(comment)-1] != '"'))):
|
||||
comment = "\"" + comment + "\""
|
||||
|
|
|
|||
Loading…
Reference in a new issue