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

MLAT in relay mode #89

Closed
ZeeBOB opened this issue Sep 12, 2021 · 3 comments · Fixed by #124
Closed

MLAT in relay mode #89

ZeeBOB opened this issue Sep 12, 2021 · 3 comments · Fixed by #124
Assignees

Comments

@ZeeBOB
Copy link

ZeeBOB commented Sep 12, 2021

I'm running dump1090-fa on a remote machine. When I have this container in relay mode MLAT is unable to connect, probably because it's trying to connect to dump1090-fa on localhost:30104, as per the Multilateration Settings on FlightAware's Advanced Configuation page:

The default settings set up three items:

  • beast,connect,localhost:30104 - this feeds multilateration results back to the local dump1090 for display on the map

If the container is in relay mode, it should reuse the BEASTHOST variable and add the following line to the piaware.config file:
mlat-results-format beast,connect,$BEASTHOST:30104
I'm guessing this is best done in the docker-piaware/rootfs/etc/cont-init.d/01-piaware file
piaware-config mlat-results-format "beast,connect,${BEASTHOST}:30104"

@mikenye mikenye self-assigned this Nov 30, 2021
@mikenye
Copy link
Member

mikenye commented Mar 28, 2022

Hi @ZeeBOB, sorry for the delay in getting back to you about this.

When using the container in relay mode (with BEASTHOST set), the container behaves as follows:

  • dump1090 is started, and listens on 0.0.0.0:30004 for incoming BEAST connections.
  • beast-splitter is started, and configured to connect to $BEASTHOST:$BEASTPORT, receives BEAST data, connects to dump1090 (via 127.0.0.1:30004) and sends BEAST data.
  • piaware starts mlat-client, which is configured to receive data from dump1090 (via 127.0.0.1:30005).
  • mlat-client serves data on 0.0.0.0:30105.

As dump1090 doesn't appear to have a --net-connector (like readsb does), I see your predicament... Users of readsb can use a --net-connector to pull in MLAT results, however it looks like there's no functionality in dump1090 to do this.

Would you accept me adding an MLAT_RESULTS_BEAST_CONNECT or similar environment variable allowing the mlat-results-format piaware config to be set manually?

@mikenye mikenye mentioned this issue Mar 28, 2022
@mikenye
Copy link
Member

mikenye commented Mar 28, 2022

Hi @ZeeBOB,

I've added:

Environment Variable Possible Values Description Default
MLAT_RESULTS_BEASTHOST a hostname or IP Specify an external host where MLAT results should be sent.
MLAT_RESULTS_BEASTPORT a port number Specify the TCP port number where MLAT results should be sent. 30104

These control the mlat-results-format setting:

# If MLAT_RESULTS_BEAST_CONNECT is specified
if [[ -n "$MLAT_RESULTS_BEASTHOST" ]]; then
  piaware-config mlat-results-format "$(piaware-config -show mlat-results-format) beast,connect,${MLAT_RESULTS_BEASTHOST}:${MLAT_RESULTS_BEASTHOST:-30104}"
fi

Will be merged in #124.

@mikenye
Copy link
Member

mikenye commented Mar 28, 2022

Once PR #124 is merged, this issue will automatically be closed. After this, the new image will build (will take about 1-2 hours). Once complete, please pull the image and update your container.

Please feel free to re-open the issue if you're still having problems after that.

Thanks.

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 a pull request may close this issue.

2 participants