first part of integrating velocity from https://github.com/jaywilhelm/ADSB-Out_Python
This commit is contained in:
@@ -72,13 +72,23 @@ def singlePlane(arguments):
|
||||
samples = bytearray()
|
||||
for i in range(0, arguments.repeats):
|
||||
modes = ModeS()
|
||||
(df17_even, df17_odd) = modes.df17_pos_rep_encode(arguments.capability, arguments.icao, arguments.typecode, arguments.surveillancestatus, arguments.nicsupplementb, arguments.altitude, arguments.time, arguments.latitude, arguments.longitude, arguments.surface)
|
||||
|
||||
(df17_pos_even, df17_pos_odd) = modes.df17_pos_rep_encode(arguments.capability, arguments.icao, arguments.typecode, arguments.surveillancestatus, arguments.nicsupplementb, arguments.altitude, arguments.time, arguments.latitude, arguments.longitude, arguments.surface)
|
||||
|
||||
df17_velocity = modes.vel_heading_encode(arguments.capability, arguments.icao)
|
||||
|
||||
ppm = PPM()
|
||||
df17_array = ppm.frame_1090es_ppm_modulate(df17_even, df17_odd)
|
||||
df17_array_position = ppm.frame_1090es_ppm_modulate(df17_pos_even, df17_pos_odd)
|
||||
df17_array_velocity = ppm.frame_1090es_ppm_modulate(df17_velocity, df17_velocity)
|
||||
|
||||
hackrf = HackRF()
|
||||
samples_array = hackrf.hackrf_raw_IQ_format(df17_array)
|
||||
#Position
|
||||
samples_array = hackrf.hackrf_raw_IQ_format(df17_array_position)
|
||||
samples = samples+samples_array
|
||||
gap_array = ppm.addGap(arguments.intermessagegap)
|
||||
samples_array = hackrf.hackrf_raw_IQ_format(gap_array)
|
||||
samples = samples+samples_array
|
||||
#Velocity
|
||||
samples_array = hackrf.hackrf_raw_IQ_format(df17_array_velocity)
|
||||
samples = samples+samples_array
|
||||
gap_array = ppm.addGap(arguments.intermessagegap)
|
||||
samples_array = hackrf.hackrf_raw_IQ_format(gap_array)
|
||||
|
||||
Reference in New Issue
Block a user