Skip to content

Commit 830df60

Browse files
committed
Zachtek bug fix for altitude
1 parent 7c7637b commit 830df60

4 files changed

Lines changed: 26 additions & 6 deletions

File tree

BalloonTelemetry.cfg

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@
88
# ldatetime = last date/time of successful upload of balloon data, you can change this value to reprocess past data
99
#
1010

11+
[KI4OHR-12]
12+
tracker = Z
13+
uploadcallsign = K5MAP
14+
wsprcallsign = KI4OHR/A
15+
ballooncallsign = KI4OHR-12
16+
timeslot = 6
17+
comment = This is for testing
18+
uploadsite = T
19+
telemetryfile = Y
20+
# launched = 2023-08-13 @ 17:50
21+
ldatetime = 2023-08-19 18:00:00
22+
1123
[WA1DVR-8]
1224
tracker = U
1325
uploadcallsign = K5MAP

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ Requirements: Python v3.x
3838
$ pip install maidenhead
3939
$ pip install configupdater
4040

41+
## Execution
42+
43+
$ python BalloonTelemetry.py callsign-999 [balloon callsign and SSID to be shown on APRS.fi or SondeHub ]
44+
4145

4246
## Testing
4347

constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# (at your option) any later version. #
1212
# #
1313
#==============================================================================================================#
14-
__version__ = '0.2.6'
14+
__version__ = '0.2.8'
1515

1616
SOFTWARE_NAME = "k5map-python"
1717

getZachtek.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#import time
3939
#import datetime
4040
from socket import *
41-
#import pprint
41+
import pprint
4242

4343
from miscFunctions import *
4444
from constants import __version__, SOFTWARE_NAME
@@ -104,7 +104,7 @@ def getZachtek(wCallsign, uCallsign, bCallsign, timeslot, last_date, strComment
104104
logging.warning(" Exit function, insufficient WSPR records to process" )
105105
return 0, None, None
106106

107-
##pprint.pp(jWsprData)
107+
#pprint.pp(jWsprData)
108108
aDateTime = []
109109
aMatch = []
110110
# build array of 'time' from WSPR data (2023-07-23 06:36:00)
@@ -143,9 +143,10 @@ def getZachtek(wCallsign, uCallsign, bCallsign, timeslot, last_date, strComment
143143

144144
# calc altitude from power
145145
# reference https://github.com/HarrydeBug/WSPR-transmitters/blob/master/Standard%20Firmware/Release/Hardware_Version_2_ESP8285/WSPR-TX2.05/WSPR-TX2.05.ino line 1430
146-
alt1 = int(jWsprData[x]['power']) * 300
146+
#alt1 = int(jWsprData[x]['power']) * 300
147147
#alt2 = int(jWsprData[i+1]['power']) * 300
148-
altitude = alt1
148+
altitude = (int(jWsprData[x]['power']) + int(jWsprData[y]['power'])) * 300
149+
logging.debug(f" alt1 = {jWsprData[x]['power']}, alt2 = {jWsprData[y]['power']}, altitude(m) = {altitude}")
149150

150151
##logging.info(" Altitude: meters = " + str(altitude) + ", feet = " + str(round(altitude*3.28084)))
151152
logging.info(f" DateTime: {jWsprData[y]['time']}, Grid: {jWsprData[y]['tx_loc']}, Lat: {lat}, Lon: {lon}, Alt: {altitude}m {round(altitude*3.28084)}ft, x-y {x} {y}")
@@ -160,8 +161,11 @@ def getZachtek(wCallsign, uCallsign, bCallsign, timeslot, last_date, strComment
160161
jUploadData.append(JSON)
161162

162163
logging.debug(f" jUploadData Len = {len(jUploadData)}")
163-
#print("----------------------------------------")
164+
print("----------------------------------------")
164165
#pprint.pp(jUploadData[i], indent=2)
166+
l = len(aMatch)
167+
pprint.pp(jWsprData[aMatch[l-2]], indent=2)
168+
pprint.pp(jWsprData[aMatch[l-1]], indent=2)
165169

166170
return 1, jUploadData, jWsprData[y]['time']
167171

0 commit comments

Comments
 (0)