Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi this PR , solves the previous issue #733
Furrtek almost finalised the SQUAWK transmission in the ADSB -TX .
I just completed his previous job , correcting some small errors , but following his main structure .
I could finalise and solve it , after studying the following good link , https://mode-s.org/decode/ , and many test ...
This time , I tried to expand and insert a lot of comments inside the code , to save time to the next improvements :-)
Mode S services. (Mode Select Beacon System). There are two types of Mode S interrogations about squawk (called also as identity code) ,
The short (56 bits) . and the long (112 bits ).
Identity squawk replies can be DF=5 (Surveillance Identity reply)(56 bits) / DF 21 (Comm-B with Identity reply) (112 bits)
I struggled quite a lot trying to radiate the simple one , DF=5 , (56 bits msg) , till realising that our current sw always is sending 112 bits msg. (if you specify just 56 bits, the current transmission routines are adding as padding 56 x 0's more ).
Then to be simple , I decided to use the DF 21 (112 bits) , sending the correct squawk + a fixed field MB of one of the example EHS message hardcoded . (just as a example ) .
I wrote as a comment in the code,
// In this example, in addition to the squawk , we are adding fixed MB = Track and turn report (BDS 5,0) decoding MB example = "F9363D3BBF9CE9" (56 bits)
// # -9.7, roll angle (deg)
// # 140.273, track angle (deg)
// # -0.406, track angle rate (deg/s)
// # 476, ground speed (kt)
// # 466, TAS (kt)
Then , I tested ,and confirmed a correct reception using (dump1090 +RTL-SDR) , and also (sdrangel + RTL-SDR)
Moreover ,I learnt, that to receive a correct squawk , you need keep marked as a tick , "callsign" + "squawk" , (squawk alone, sometimes does not work well) .
Sending squawk = 4216 , (transmitting both callsign + squawk)
sdrangel , with RTL-SDR (you can see the squawk ,and all other fixed additoinal data from the last package MB (56 bits)
dump1090 with RTL-SDR (you can see the squawk in the last line, and also the exact MB correctly detected in HEX )
Let's enjoy ,
Cheers,