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

Expose acarsdec -n, -N and -j options #95

Open
lsilva171 opened this issue Jul 11, 2021 · 6 comments
Open

Expose acarsdec -n, -N and -j options #95

lsilva171 opened this issue Jul 11, 2021 · 6 comments

Comments

@lsilva171
Copy link

Will it be possible to to expose acarsdec options to send acars messages to addr:port via UDP?

This would allow docker-acarshub to send acars messages to programs like FlightAirMap

@fredclausen
Copy link
Member

fredclausen commented Jul 11, 2021

If I'm understanding you right this option is already partially available, although undocumented which I should change. If my memory serves me correctly -n -N and -j are mutually exclusive on the decoders (I can test this to be sure if you really need -n or -N) and we need -j for ACARS Hub to work correctly.

All vdlm2dec and acarsdec instances in the container are started up in the container with -j and serve their JSON data to an internal server, both of which is has a port you can map to allow external programs access to the data.

  • Port 15555 for UDP VDLM2 JSON
  • Port 15550 for UDP ACARS JSON

@lsilva171
Copy link
Author

lsilva171 commented Jul 12, 2021

Thanks for taking time to reply me.

I just tested the following:

/usr/local/bin/acarsdec -N 10.0.65:5555 -j 127.0.0.1:15555 -r 0 130.025 130.425 130.450 131.125 131.475 131.550

and acarsdec started without any issues. I didn't see any errors, just the following messages:

Found Rafael Micro R820T tuner
Exact sample rate is: 2000000.052982 Hz

Could you give it a try to see if you have the same behavior?

My acarsdec was built from source, like yours I suspect.

By the way, the options I am really interested on have exposed are -n and -N as both allow to feed external programs like Planeplotter and FlghtAirMap (which run on different servers)

@fredclausen
Copy link
Member

We do build both decoders from source for use in the container.

My memory is exceptionally fuzzy about what log entries acarsdec spits out but I feel like what you posted looks normal for startup. It should show received messages on the console log.

I'll try and see if the decoders can be started up with multiple feed outs, and if so I'll add in an option for it to do that. I have a feeling it won't, though. If it won't, I can add in an option to start up another decoder with the -n or -N option, but that would require another SDR if you also wanted to use the web front-end.

It depends on what your goal is. If you want to use ACARS Hub to just effectively run the SDR dongles and the decoders, and not worry about everything else it does like storing messages, web front end, etc, then it would be pretty easy for me to add this in.

Otherwise, I'd have to rewrite some of the ACARS Hub code to ingest the data in a different format to allow for a single decoder to output data in the PP format, while having it do everything ACARS Hub does right now.

Again, it's all contingent on whether the decoder can output in both PP and JSON formats simultaneously. I'll test and get back to you.

@lsilva171
Copy link
Author

lsilva171 commented Jul 12, 2021

I would say ACARS Hub for me would be the primary interface to read and search for ACARS messages
However, the question is how close ACARS Hub will become to other ADS-B web interfaces. In a perfect world, someone could have just one interface to have access to all ADS-B and ACARS info. The one you are working on is the closest I've seen to this perfect world.
But at the end, the question is how much "duplicated" work you would need to go through to offer a tar1090 like map tab vs integrating with existent offerings out there.
From my side, using PP or FlightAirMap are not a hard requirements but for example, I like the FAM statistics and I think would not make sense for you to add those to ACARS Hub
So, I would go with the low hanging fruit, which is (if possible and not a lot of work) to expose the ACARS message and have the other programs to take of the rest.
I appreciate a lot your help and work.

@fredclausen
Copy link
Member

The goal is that ACARS Hub becomes that perfect world you've described and it's where I'm going to be taking this project. Eventually I'll add in readsb so the requirement to also be running tar1090 to get the ADSB data is removed.

If you have any suggestions about what tar1090 does that ACARS Hub isn't please let me know. Besides a few interesting things like range rings and showing more data about the plane when you click on it there isn't much more to do.

I took a look through the acarsdec source code and for sure it won't support outputting to multiple sources. I'll have a look through vdlm2dec and see what it'll do. That said, it doesn't look hard to make it do that so I'll give it a go and we'll run a modified decoder in the container. Way back in the day we ran a custom version of acarsdec because there was a little nasty bug in the decoder that was causing a lot of problems. Eventually the author of acarsdec merged in the change so we switched back to using his version.

I'm unfamiliar with FAM statistics but for sure I can look at emulating that functionality in ACARS Hub.

@lsilva171
Copy link
Author

lsilva171 commented Sep 7, 2021

Thanks for working on this request.
Are ports 5550, 5555, 15550 and 15555 exposed?
I did a port scan and could see any traffic on those ports.
Additionally, when reviewing Dockerfile I can only see port 80 being exposed.

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

No branches or pull requests

2 participants