llopisdon / skies-adsb

skies-adsb is a real-time 3D browser based web app for tracking aircraft using ADS-B data obtained from a RTL-SDR receiver.
MIT License
58 stars 1 forks source link

Point at existing ADSB setup. #2

Closed thebaldgeek closed 2 years ago

thebaldgeek commented 2 years ago

Not an issue, just a comment.
I am looking forward to checking this out, but currently the way its setup, I just don't have the time to dig into your code and figure out how to run it without an SDR dongle. Like most of those of us doing ADSB we already have existing systems and data on port 30003 so just want to point your app to our feeds without needing another dongle and antenna splitter.
Once I figure that out, I will be able to provide more feedback I suspect.

llopisdon commented 2 years ago

hi @thebaldgeek

skies-adsb uses websockets to receive the adsb data from port 30003 via a websockify proxy. The app is designed to use any proxy on a local network even your localhost.

You can accomplish what you want by following the steps below.

1 - install websockify on your localhost

see: https://github.com/novnc/websockify

if you have Python 3 on your localhost you can install it via pip.

sudo pip install websockify

I have only used the latest version of websockify obtained via pip.

If you are on an Ubuntu machine you can use apt to install websockify but I have not tested this version.

2 - clone app to your localhost

cd /your/projects/dir
git clone https://github.com/llopisdon/skies-adsb.git

3 - create a .env file on your localhost

cd /path/to/skies-adsb
touch .env

add the following variables to the .env file -- these are the minimum variables you must define (note the flight status will not be working):

SKIES_ADSB_HOST_DEV=localhost:30006
DEFAULT_ORIGIN_LATITUDE=25.794868197349306
DEFAULT_ORIGIN_LONGITUDE=-80.27787208557129

be sure to change the origin lat/long to match your location or nearest airport acting as the origin for the simulation.

4 - start websockify proxy

now open a terminal and start the websockify proxy as follows:

websockify 30006 <ip of machine with adsb-receiver>:30003

example:

websockify 30006 192.168.1.2:30003

5 - start skies-adsb in development mode

now open another terminal and run the app in development mode as follows:

npm install
npm run start

note: you can omit the "npm install" step if you already did this.

this will start the app in development mode on your localhost and open a browser window automatically

at this point you should see your local aircraft traffic.

thebaldgeek commented 2 years ago

Thanks for your help in getting it going via an external feed. It went pretty smooth. I just had to switch out 'localhost' for the IP of the Pi in both places you mention. Was up and running in just a few minutes. It was nice having a 5 step startup vs 9+.

In the end, it's not as compelling in my use case I was hoping. No land outlines, can't zoom out enough and very small aircraft. Seems the timeout for each aircraft is very short, around 30 seconds it seems. Screenshot attached. (My red arrows showing two aircraft).

image

I know my use case is not typical. Again, thanks for writing up how to get a remote feed going, I suspect it's going to help a lot of others get up and running. I will be sure to tell any that ask to check out the closed issues for these directions.

Cheers.

llopisdon commented 2 years ago

Hi @thebaldgeek You could try adjusting the SCALE value in the utils.js file if you are dealing with very long distances. Currently the app requires that user's supply a reference map.

I used this tool: http://geojson.io/ to build a simplified map of South Florida.

Place any map you make in the dir:

/path/to/skies-adsb/geojson

and in the .env file specify which map you want to load:

OPTIONAL_GEOJSON_MAP=<your map>.json

It seems you are working with very large distances so it should be pretty easy to quickly create a large scale map to approximate the landscape you are interested in visualizing. The app just renders what ever polygons or points you put in the geojson map file so the level of detail is up to you.

see this file for details about making maps:

docs/GEOJSON-MAPS.md

If you manage to get something working that is to your liking feel free to post an image of it here. I'm curious to see what people use this project for.

Hope that helps.