Skip to content

ASTERIX#34

Open
k2fc wants to merge 40 commits into
wiedehopf:devfrom
k2fc:asterix
Open

ASTERIX#34
k2fc wants to merge 40 commits into
wiedehopf:devfrom
k2fc:asterix

Conversation

@k2fc

@k2fc k2fc commented Apr 23, 2023

Copy link
Copy Markdown
Contributor

This PR adds ASTERIX i/o support.

The following command line arguments are added:
--net-ai-port
--net-ao-port
--net-asterix-reduce

Additionally --net-connector has the following formats added:
asterix_in
asterix_out

Currently, only CAT021 (ADS-B) messages are supported. The following CAT021 items work:

Item Number Description Notes
10 Data Source Identification Hard Coded to output SAC=0 SIC=1. Discarded on input. Required field per Asterix spec
40 Target Report Descriptor
71 Time of Applicability for position Input only
130 Position in WGS-84 Coordinates Output and input
131 Position in WGS-84 Coordinates (High-Resolution) Input only
72 Time of Applicability for velocity Input only
150 Air Speed
151 True Airspeed
80 Target Address
73 Time of Message Reception of Position
74 Time of Message Reception of Velocity - High Precision Input Only
75 Time of Message Reception for Velocity
76 Time of Message Reception for Velocity – High Precision Input Only
140 Geometric Height
90 Quality Indicators I do not fully understand these, so it's probably not correct
210 MOPS Version I do not fully understand these, so it's probably not correct
70 Mode 3/A Code
230 Roll Angle
145 Flight Level
152 Magnetic Heading
200 Target Status I do not fully understand these, so it's probably not correct (especially Nav Modes)
155 Barometric Vertical Rate
157 Geometric Vertical Rate
160 Airborne Ground Vector
77 Time of Report Transmission
170 Target Identification (Callsign)
20 Emitter Category I do not fully understand this, so it's probably not correct
220 Met Information Ouput only. I tried to add COMM_B code to decode met information, but I have not decoded any. Unknown if this works. readsb can still continue to derive the met information on its own, but it won't be sent over ASTERIX.
8 Aircraft Operational Status I do not fully understand this. It may be correct, but I wouldn't bet money on it.
400 Receiver ID Output only. Only 8 bits are available. I simply took the last 8 bits of mm->receiverId... it should probably be a hash.

MLAT messages are not passed. I don't have access to MLAT data to work with, but MLAT data should be exchanged as CAT020.

Known issues

Most issues are caused by my lack of understanding on some of the internals.

  • Quality indicators seem to intermittently show up. When they do, they seem to match what my main instance of readsb (beast format) shows, but they quickly revert to n/a.
  • ADS-B version always shows as v15... not sure why.
  • I have seen TIS-B ground targets appear at ~1500ft intermittently, but haven't tracked down the cause yet.

k2fc added 30 commits March 29, 2023 13:16
successfully made plausible ASTERIX packets with position, time, altitude, vertical rates, address, and aircraft identification
@wiedehopf

Copy link
Copy Markdown
Owner

So this kinda needs a rebase.
But i'll try and make a diff and just make one big patch i guess.

Is the merged version working for you?

@wiedehopf

Copy link
Copy Markdown
Owner

So i want this as one big commit i'm making right now.
It is just a diff from the current state.a
Plus some whitespace fixes (trailing space / indent).

I'll see how i can attribute you.
Will try just messing with a commit ;)

@wiedehopf

Copy link
Copy Markdown
Owner

https://github.com/wiedehopf/readsb/tree/asterix

Ok please test this, make a new branch on your side and make a new PR using this commit i made.
That should give you all the attribution properly.

I'll close this PR, feel free to just copy the text from the new PR.

@wiedehopf wiedehopf closed this Aug 12, 2023
@wiedehopf wiedehopf reopened this Aug 27, 2023
@wiedehopf

Copy link
Copy Markdown
Owner

@k2fc i'm trying to merge this but i'd like it to show properly on github that it was your PR ... but due to rebase and stuff anyhow it's complicated.
You mind getting that branch over to you? I can change the branch name if that's an issue.

@wiedehopf

Copy link
Copy Markdown
Owner

@k2fc This is merged, but it won't show as merged here as i wanted to flatten all the work in progress commits a bit.

Merged as: 8dfb94b

I tried to get you to pull that branch so i can just merge it and it shows as PR on here but there was no response.
If that's important to you, i can still make that happen.

@wiedehopf wiedehopf closed this Dec 29, 2023
@wiedehopf

Copy link
Copy Markdown
Owner

Keeping this PR open even though it's merged for some visibility of the feature :)

@Telecomeansa

Copy link
Copy Markdown

Is there another way to convert SBS data to Asterix without losing the information?

@wiedehopf

Copy link
Copy Markdown
Owner

SBS data is bad data.
It doesn't contain the raw messages.
Get a better data source.

@ifsnop

ifsnop commented Jun 22, 2025

Copy link
Copy Markdown

Which version of the Asterix category 21 has been implemented? @wiedehopf @k2fc

I have access to asterix Cat21 v2.1 messages so I would like to test/debug/help with this implementation.

@wiedehopf

wiedehopf commented Jun 22, 2025

Copy link
Copy Markdown
Owner

This is merged so just test if it works for whatever you're trying to do.

I don't know too much about asterix so i don't know about versions.
The PR author hasn't repsonded here for a bit but maybe you get lucky.
Otherwise it's up to you to read the code that's in readsb ... net_io.c so you don't have to search too long.

@ifsnop

ifsnop commented Jun 22, 2025

Copy link
Copy Markdown

Since you left the PR open for future reference: Asterix definitions have different versions that change during time. For CAT21 (ADS-B) there can be easily like 10 different versions, incompatible with each other, so before testing it is important to know what you are testing. If there isn't any more info, I will keep reading the code. Some previous inspection showed i021/090 present, so luckily the implementation maybe of v2.1 or greater.

Thanks for you patience.

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.

4 participants