DroneScout Receiver Manual - version 1.0 May 2022 - © BlueMark Innovations BV 2022
24/28
#BasicID message 1
if BasicID1_valid == 1:
BasicID1_start_byte = 32
[UAType] = struct.unpack('i',
UASdata[BasicID1_start_byte:BasicID1_star 4])
[IDType] = struct.unpack('i', UASdata[BasicID1_star
4:BasicID1_star 4 + 4])
print("Basic ID 1 data")
print("UAType......", UAType)
print("IDType......", IDType)
print("Basic ID......", UASdata[BasicID1_star
8:BasicID1_sta 8 + 21].decode('ascii'))
print("")
#LocationValid message
if LocationValid == 1:
Location_start_byte = 32 + 32
print("Location data")
[Status] = struct.unpack('i',
UASdata[Location_start_byte:Location_star 4])
print("Status......", Status)
[Direction] = struct.unpack('f', UASdata[Location_star
4:Location_star 4 + 4])
print("Direction......", Direction)
[SpeedHorizontal] = struct.unpack('f', UASdata[Location_start_byte
+ 8:Location_star 8 + 4])
[SpeedVertical] = struct.unpack('f', UASdata[Location_star
12:Location_star 12 + 4])
print("SpeedHorizontal......", SpeedHorizontal)
print("SpeedVertical......", SpeedVertical)
[Latitude] = struct.unpack('d', UASdata[Location_star
16:Location_star 16 + 8])
[Longitude] = struct.unpack('d', UASdata[Location_star
24:Location_star 24 + 8])
print("Latitude......", Latitude)
print("Longitude......", Longitude)
[AltitudeBaro] = struct.unpack('f', UASdata[Location_star
32:Location_star 32 + 4])
[AltitudeGeo] = struct.unpack('f', UASdata[Location_star
36:Location_star 36 + 4])
print("AltitudeBaro......", AltitudeBaro)
print("AltitudeGeo......", AltitudeGeo)
[HeightType] = struct.unpack('i', UASdata[Location_star
40:Location_star 40 + 4])
[Height] = struct.unpack('f', UASdata[Location_star
44:Location_star 44 + 4])
print("HeightType......", HeightType)
print("Height......", Height)
[HorizAccuracy] = struct.unpack('i', UASdata[Location_star
48:Location_star 48 + 4])
[VertAccuracy] = struct.unpack('i', UASdata[Location_star
52:Location_star 52 + 4])
[BaroAccuracy] = struct.unpack('i', UASdata[Location_star
56:Location_star 56 + 4])
[SpeedAccuracy] = struct.unpack('i', UASdata[Location_star
60:Location_star 60 + 4])
[TSAccuracy] = struct.unpack('i', UASdata[Location_star
64:Location_star 64 + 4])
[TimeStamp] = struct.unpack('f', UASdata[Location_star
68:Location_star 68 + 4])
print("HorizAccuracy......", HorizAccuracy)
print("VertAccuracy......", VertAccuracy)