Display a simple radar plot of your Raspberry Pi's Flightradar24 detector's data.
This program shows the output being seen by the local FR24 receiver. It was created to visualise, in real-time, the data obtained by the FR24 feed.
NOTE: Only aircraft with transponders providing lat/lon information will be shown on the radar plot.
Each aircraft is shown at its current position with a line showing the vector the aircraft will travel at its current speed and heading in the next minute. The colour of the line represents the altitude using standard FR24 colours The "tell" next to the aircraft gives its callsign and altitude.
Clicking on the current location of a displayed arcraft will open a new window showing details of that flight using the offical FR24 site.
A table showing more information about all of the aircraft that are seen by the receiver AND are reporting a lat/long position.
The display updates every 5 seconds.
To change the range of the displayed plot simply update the Max Range field below the plot - the unit is Nautical Miles.
To filter the display based on reported altitude simply change the Min and Max Alt fields - the unit is Feet.
After you have installed the FR24 software on your Raspberry Pi, place the downloaded show.html and help.html files into /var/www/html/. Make sure that these are readable by the lighttpd process running as www-data.
Modify /etc/lighttpd/lighttpd.conf:
At the end of the file add:
##### redirect flights.json to FR24 port ####
server.modules += (
"mod_proxy",
)
proxy.server = ( "flights.json" =>
( (
"host" => "localhost",
"port" => 8754
) )
)
Restart the service using:
sudo /etc/init.d/lighttpd restart
This change allows the Javascript AJAX request to get the flight information passed to the correct port on the FR24 server.
By default the program will infer the location of the receiver by assuming it is in the centre of the received aircraft - this is almost certainly INCORRECT but it allows you to get a picture of the aircraft that are visible.
To correctly locate the receiver create a file called location.txt in the same directory as show.html. This file should contain a BASE location (latitude, longitude) for your receiver.
NOTE: longitude is negative for locations WEST of Greenwich
The example below is for a receiver located West of London at Latitude 51.5281 (Northern hemisphere)and Longitude -0.9048 (West of the Greenwich meridian). This can also included named local airports, or other feature, that are to be displayed on the plot, e.g. LTN = London Luton Airport and LHR = London Heathrow Airport)
# name, lat N+, lon W- as per FR24
# first location should be the BASE location for the receiver.
BASE,51.5281,-0.9048
# other useful places to show on radar plot
LTN,51.8864,-0.2413
LHR,51.4680,-0.4551
Once loaded the displayed plot should be centred on your location with the other useful places also shown, if in range.
At this point use your browser to access your Raspberry Pi using show.html as the url.
If you are seeing intermittent errors whereby data is not being sent to the FR24 servers you may wish to follow the advice below.
Check in the system log using dmesg -T to see if you are getting errors similar to:
WARN::dwc_otg_hcd_urb_dequeue:639: Timed out waiting for FSM NP transfer to complete on …….
If so take a look at (raspberrypi/firmware#1804). The solution proposed there may help, i.e.
Edit /boot/cmdline.txt and add the text below to the end of the current line in the file:
dwc_otg.fiq_enable=0 dwc_otg.fiq_fsm_enable=0
NOTE: Do NOT create a second line!
After making the change reboot your Pi.