From e9f63565028adc40fdb86a9d9b8f75bcafdb3fe3 Mon Sep 17 00:00:00 2001 From: Daniele Marra <39775345+iu7igu@users.noreply.github.com> Date: Fri, 29 Jan 2021 20:42:18 +0100 Subject: [PATCH] Bug fix on aprs report system --- hblink.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hblink.py b/hblink.py index aa4071e..7ee05d9 100644 --- a/hblink.py +++ b/hblink.py @@ -96,6 +96,8 @@ def sendAprs(): d1 = abs(d1_c) dm1=abs(float(dati[4])) - d1 dm1_s= float(dm1) * 60 + if int(str(dm1_s).split(".")[0]) < 10: + dm1_s = dm1_s * 10 dm1_u="{:.4f}".format(dm1_s) if d1 < 10 and d1 > -10: lat_utile='0'+str(d1)+str(dm1_u) @@ -106,6 +108,8 @@ def sendAprs(): d1 = int(float(dati[4])) dm1=float(dati[4]) - d1 dm1_s= float(dm1) * 60 + if int(str(dm1_s).split(".")[0]) < 10: + dm1_s = dm1_s * 10 dm1_u="{:.4f}".format(dm1_s) if d1 < 10 and d1 > -10: lat_utile='0'+str(d1)+str(dm1_u) @@ -118,6 +122,8 @@ def sendAprs(): d2=abs(d2_c) dm2=abs(float(dati[5])) - d2 dm2_s= float(dm2) * 60 + if int(str(dm2_s).split(".")[0]) < 10: + dm2_s = dm2_s * 10 dm2_u="{:.3f}".format(dm2_s) if d2 < 10 and d2 > -10: lon_utile = '00'+str(d2)+str(dm2_u) @@ -131,6 +137,8 @@ def sendAprs(): d2=int(float(dati[5])) dm2=float(dati[5]) - d2 dm2_s= float(dm2) * 60 + if int(str(dm2_s).split(".")[0]) < 10: + dm2_s = dm2_s * 10 dm2_u="{:.3f}".format(dm2_s) if d2 < 10 and d2 > -10: lon_utile = '00'+str(d2)+str(dm2_u)