projecthorus / radiosonde_auto_rx

Automatically Track Radiosonde Launches using RTLSDR
GNU General Public License v3.0
477 stars 124 forks source link

Add RS41 Burst-Kill timer support from upstream RS repo #88

Closed darksidelemm closed 5 years ago

darksidelemm commented 5 years ago

Extraction of the burst-kill timer value has been added to the upstream RS repo as of https://github.com/rs1729/RS/commit/3e68a22786a3a8a376c64e785673c3f51459204b

darksidelemm commented 5 years ago

Found the countdown timer bytes in cal frame 0x32. @rs1729 check out the changes I've made here: https://github.com/darksidelemm/radiosonde_auto_rx/blob/testing/demod/rs41dm_dft.c#L901

The countdown timer value is 0xFFFF until after burst, and then it counts down starting at the burst timer value in frame 0x32.

Currently doing some tests with it in my testing branch before pushing it into the main testing branch for wider use.

rs1729 commented 5 years ago

You mean the bt in frame 0x31? Yes, after burst the first 2 bytes in 0x32 count down from there, good observation. The burst detection takes a few hundred meters I guess, before it starts. I think I noted somewhere that the bytes in 0x32 are not constant. Maybe that is the "RAM" and 0x00-0x31 is the "ROM". (after setting up the rs41)

Update: Just looked at some more data. Because there is also the kill timer that is sometimes used to shut down the radiosonde after a specified time after launch. The rs41 that I received at launch time switched to full power after about 600m above start, so before you need to be very close to the station to decode the signal. And from that moment byte 4-6 change. More interesting, the one recording where I recovered a kill-timer rs41, the timer/counter in bytes 0-1 counts down, and it counts down from the kill-timer-count to 0 when the sonde shuts down (i.e. in this case it is not the burst timer). Though I have no recordings of rs41-kill-timer at launch time, probably the timer is set when the radiosonde goes to full power (after some 600m above start), same mechanism as for burst kill. (When I remember correctly, I calculated the time difference as kill_counter = shut_down - full_power(2min/600m after/above launch)).

So it looks like these bytes 0-1 in 0x32 count down to shut down, either because of burst kill or time kill, and the kill timer is sometimes really something to worry and hurry (if set to 200min e.g.). Don't know, if both are set and at burst time the bt-counter would beat the kt-counter, what happens, and only if bk=1, ...

darksidelemm commented 5 years ago

I've added in just the countdown timer for now, in https://github.com/projecthorus/radiosonde_auto_rx/pull/140

rs1729 commented 5 years ago

Ok, I included it in a little more compact form, for output on a single line. I wanted to push more modular decoders a couple of weeks ago but got distracted a little.. Just pushed iq->mod for rs41, have dfm09 and m10 ready, rs92 and lms6 should be also possible, although rs92 has some global gps stuff... in principle it could be also used as subroutines together in one main (modulo possible bugs, too many substitutions...) Also additional data like aux and conf data (freq, timers, ...) could be accessed easier this way. I put it in a subdir, more adjustments, iq and so on later. The idea was to put something like this in a separate repo so you could fork from there, only the essential files.