Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct squawk id in ADSB TX #818

Merged

Conversation

Brumi-2021
Copy link
Contributor

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)

image

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)
image

sdrangel , with RTL-SDR (you can see the squawk ,and all other fixed additoinal data from the last package MB (56 bits)
image

dump1090 with RTL-SDR (you can see the squawk in the last line, and also the exact MB correctly detected in HEX )
image

Let's enjoy ,
Cheers,

@gullradriel
Copy link
Member

Nice PR, research and implementation.
Let's test it ! :-)

@gullradriel gullradriel merged commit 3c13161 into portapack-mayhem:next Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants