Bug fix on aprs report system

This commit is contained in:
Daniele Marra 2021-01-29 20:42:18 +01:00 committed by GitHub
parent 837d372bb3
commit e9f6356502
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,6 +96,8 @@ def sendAprs():
d1 = abs(d1_c) d1 = abs(d1_c)
dm1=abs(float(dati[4])) - d1 dm1=abs(float(dati[4])) - d1
dm1_s= float(dm1) * 60 dm1_s= float(dm1) * 60
if int(str(dm1_s).split(".")[0]) < 10:
dm1_s = dm1_s * 10
dm1_u="{:.4f}".format(dm1_s) dm1_u="{:.4f}".format(dm1_s)
if d1 < 10 and d1 > -10: if d1 < 10 and d1 > -10:
lat_utile='0'+str(d1)+str(dm1_u) lat_utile='0'+str(d1)+str(dm1_u)
@ -106,6 +108,8 @@ def sendAprs():
d1 = int(float(dati[4])) d1 = int(float(dati[4]))
dm1=float(dati[4]) - d1 dm1=float(dati[4]) - d1
dm1_s= float(dm1) * 60 dm1_s= float(dm1) * 60
if int(str(dm1_s).split(".")[0]) < 10:
dm1_s = dm1_s * 10
dm1_u="{:.4f}".format(dm1_s) dm1_u="{:.4f}".format(dm1_s)
if d1 < 10 and d1 > -10: if d1 < 10 and d1 > -10:
lat_utile='0'+str(d1)+str(dm1_u) lat_utile='0'+str(d1)+str(dm1_u)
@ -118,6 +122,8 @@ def sendAprs():
d2=abs(d2_c) d2=abs(d2_c)
dm2=abs(float(dati[5])) - d2 dm2=abs(float(dati[5])) - d2
dm2_s= float(dm2) * 60 dm2_s= float(dm2) * 60
if int(str(dm2_s).split(".")[0]) < 10:
dm2_s = dm2_s * 10
dm2_u="{:.3f}".format(dm2_s) dm2_u="{:.3f}".format(dm2_s)
if d2 < 10 and d2 > -10: if d2 < 10 and d2 > -10:
lon_utile = '00'+str(d2)+str(dm2_u) lon_utile = '00'+str(d2)+str(dm2_u)
@ -131,6 +137,8 @@ def sendAprs():
d2=int(float(dati[5])) d2=int(float(dati[5]))
dm2=float(dati[5]) - d2 dm2=float(dati[5]) - d2
dm2_s= float(dm2) * 60 dm2_s= float(dm2) * 60
if int(str(dm2_s).split(".")[0]) < 10:
dm2_s = dm2_s * 10
dm2_u="{:.3f}".format(dm2_s) dm2_u="{:.3f}".format(dm2_s)
if d2 < 10 and d2 > -10: if d2 < 10 and d2 > -10:
lon_utile = '00'+str(d2)+str(dm2_u) lon_utile = '00'+str(d2)+str(dm2_u)