All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 36 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: methods to show flight info labels directly on dump1090 map?
PostPosted: Wed Dec 14, 2016 7:31 pm 
Offline
supernova87a - FlightAware user avatar

Joined: Tue Aug 14, 2007 7:00 pm
Posts: 7
Hi all -

I have just successfully set up a Raspberry Pi with the Flightaware Pro stick, and a simple antenna, and running the dump1090 map server seems to be already great for my initial purposes.

However, I would like this to be used as a map display in a sort of public office location, and not having people clicking all over the window to explore individual aircraft.

I would rather the airplane icons just already have text labels next to them with the flight #, altitude, airspeed, etc. So people can see immediatelyl which plane it is flying overhead (for example).

Is there a way the dump1090 map can be made to do this? Or is there a straightforward application that you all prefer instead? We all use Macs (aside from the Raspberry PI). All the software I see in searching is Windows.

Thanks for any suggestions!


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Wed Dec 14, 2016 7:46 pm 
Offline
FlightAware Member
jonhawkes2030 - FlightAware user avatar

Joined: Tue Jan 05, 2016 4:15 pm
Posts: 1064
Location: NYC
Check out VRS
http://www.virtualradarserver.co.uk/
Should work on MACs

or planeplotter (Windows Only I think)
http://www.coaa.co.uk/planeplotter.htm

They are great for displaying traffic.

You could also use the FA site itself. Login and you get more data and less ads.
https://es.flightaware.com/live/map


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 14, 2016 8:26 pm 
Offline
FlightAware Member
jvcdcarlos - FlightAware user avatar

Joined: Thu Apr 23, 2015 4:57 am
Posts: 195
planeplotter can run on a rpi with help from other program similar to virtual machine virtual radar also.


Sent from my SM-N910F using Tapatalk


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Thu Dec 15, 2016 12:22 pm 
Offline
supernova87a - FlightAware user avatar

Joined: Tue Aug 14, 2007 7:00 pm
Posts: 7
Thank you both for your replies! I will have a look.

I see however that the PlanePlotter on RPi option is not actually the plotting of the planes on the RPi in an application / page for display -- it's to use the RPi output to feed a PlanePlotter program running on a Windows machine (if I understand the webpage correctly). The ppup program seems to be a simple dumping routine to pipe to a machine running PP... ?


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Thu Dec 15, 2016 1:49 pm 
Offline
FlightAware Member
Akissack - FlightAware user avatar

Joined: Sun Jun 21, 2015 12:55 pm
Posts: 63
If you are using the openlayers dump1090, then this may help:

In planeObject.js, around line 308 in 'PlaneObject.prototype.updateIcon = function()'
replace:
Code:
                } else {
                        this.markerIcon = icon;
                        this.markerStyle = new ol.style.Style({
                                image: this.markerIcon
                        });
                        this.markerStaticIcon = null;
                        this.markerStaticStyle = new ol.style.Style({});
                }

with:
Code:
                } else {
                        this.markerIcon = icon;

                        var labelText = '';
                        labelText     = (this.flight ? 'Call: '+this.flight : 'No Call');
                        labelText     = labelText +'\n ICAO: '+this.icao ;
                        labelText     = labelText +'\nAlt: '+ (this.altitude ? parseInt(this.altitude/100) : '?');

                        this.markerStyle = new ol.style.Style({

                               text: new ol.style.Text({
                                        text: labelText ,
                                        fill: new ol.style.Fill({color: 'yellow'}),
                                        stroke: new ol.style.Stroke({color: this.labelColour, width: 4}),
                                        textAlign: 'left',
                                        textBaseline: "bottom",
                                        font: 'normal 10px tahoma',
                                        offsetX: +15,
                                        offsetY: +30
                                }),

                                image: this.markerIcon
                        });
                        this.markerStaticIcon = null;
                        this.markerStaticStyle = new ol.style.Style({});

                }


to give something like: Image


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Thu Dec 15, 2016 2:45 pm 
Offline
supernova87a - FlightAware user avatar

Joined: Tue Aug 14, 2007 7:00 pm
Posts: 7
Thanks so much for that suggestion! That looks like a great solution. I have downloaded the mutability version of dump1090 and I see the planeObject.js lines of code you mentioned.

One very dumb question I have -- I just tried to start up the server in this version of the code. However, the Raspberry PI's 192.168.x.x:8080 map output web page under the old version no longer is accessible. I get a Chrome browser error: "This site can’t be reached
192.168.x.x refused to connect."

Was there something about the mutability version that changed the web server configurations? Am I missing something very simple?

I have tried invoking ./dump1090 (mutability) with the flags:
--interactive --net --net-bind-address 192.168.x.x --net-http-port 8080

to be explicit and get it back working, but to no avail. I also tried accessing it at http://127.0.0.1:8080/ but also no luck.

Any tips? Thank you so much.


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Thu Dec 15, 2016 3:13 pm 
Offline
FlightAware Member
Akissack - FlightAware user avatar

Joined: Sun Jun 21, 2015 12:55 pm
Posts: 63
i would have thought that you could just replace the html folder from mutability to where ever your previous version was. However before trying that just check http://<address>/dump1090/gmap.html (eg: http://192.168.1.11/dump1090/gmap.html)

Al


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Thu Dec 15, 2016 5:17 pm 
Offline
FlightAware Member
jonhawkes2030 - FlightAware user avatar

Joined: Tue Jan 05, 2016 4:15 pm
Posts: 1064
Location: NYC
I forgot about the apple TV application someone had made
post198170.html?hilit=apple%20tv#p198170

It is not cheap, $10 I think, however, it may do what you want.
I haven't used it so can't comment on its value.


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Thu Dec 15, 2016 10:21 pm 
Offline
FlightAware Member
joelwiley - FlightAware user avatar

Joined: Mon Mar 12, 2012 7:46 pm
Posts: 856
supernova87a wrote:
Thank you both for your replies! I will have a look.

I see however that the PlanePlotter on RPi option is not actually the plotting of the planes on the RPi in an application / page for display -- it's to use the RPi output to feed a PlanePlotter program running on a Windows machine (if I understand the webpage correctly). The ppup program seems to be a simple dumping routine to pipe to a machine running PP... ?

Just to clarify on ppup. PPUP1090 is a rpi program that uploads directly to the planeplotter server.
I run planeplotter on a windows desktop taking the feed from rpi running dump1090-FA (FA feeder site 2394) which also runs ppup1090 to upload directly to the server in the UK. It works for me, YMMV


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Thu Dec 15, 2016 10:56 pm 
Offline
supernova87a - FlightAware user avatar

Joined: Tue Aug 14, 2007 7:00 pm
Posts: 7
Akissack wrote:
i would have thought that you could just replace the html folder from mutability to where ever your previous version was. However before trying that just check http://<address>/dump1090/gmap.html (eg: http://192.168.1.11/dump1090/gmap.html)

Al


Thanks for your multiple tips - this worked great. It took me a few tries to sort out installing the dump1090-mutability version separately from the previous version, and then to fiddle with the text in the config file, but it worked.

Thanks!


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Fri Dec 16, 2016 1:38 pm 
Offline
supernova87a - FlightAware user avatar

Joined: Tue Aug 14, 2007 7:00 pm
Posts: 7
Two other questions if I can ask your further expert advice!

1) Is there a layer I could activate to get the entire background maps area to be lighter or darker (like have it appear more as a very light or dark background) so that the planes appear more distinct against the map? Or have the map setting/layer itself show less contrasty or grab fewer map elements (like discard distracting highway exit numbers, railroads, etc)?

2) Is there a way I could have all planes show their historical track without clicking on them individually? Would that be turning off the "clearLines" function in the planeObjects.js file? But how to get them to show up without clicking?

Thanks!


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Fri Dec 16, 2016 4:54 pm 
Offline
FlightAware Member
Akissack - FlightAware user avatar

Joined: Sun Jun 21, 2015 12:55 pm
Posts: 63
supernova87a wrote:
Two other questions if I can ask your further expert advice!

1) Is there a layer I could activate to get the entire background maps area to be lighter or darker (like have it appear more as a very light or dark background) so that the planes appear more distinct against the map? Or have the map setting/layer itself show less contrasty or grab fewer map elements (like discard distracting highway exit numbers, railroads, etc)?


A lighter map here:
ads-b-flight-tracking-f21/less-definition-map-osm-t38364.html
that I found here:
http://blog.programster.org/openlayers- ... osm-tiles/

I hope that helps


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Fri Dec 16, 2016 5:00 pm 
Offline
FlightAware Member
Akissack - FlightAware user avatar

Joined: Sun Jun 21, 2015 12:55 pm
Posts: 63
supernova87a wrote:
2) Is there a way I could have all planes show their historical track without clicking on them individually? Would that be turning off the "clearLines" function in the planeObjects.js file? But how to get them to show up without clicking? !


This is a bit of a blunt hammer (eg you really need to refine it with an on/off button), but in
planeObject.js, procedure PlaneObject.prototype.updateLines, comment out the first two lines!

Code:
// Update our planes tail line,
PlaneObject.prototype.updateLines = function() {
        //if (!this.selected)
        //        return;

        if (this.track_linesegs.length == 0)
                return;

        var estimateStyle = new ol.style.Style({
                stroke: new ol.style.Stroke({
                        color: '#a08080',
                        width: 1.5,
                        lineDash: [3, 3]
                })
        });


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Fri Dec 16, 2016 7:48 pm 
Offline
supernova87a - FlightAware user avatar

Joined: Tue Aug 14, 2007 7:00 pm
Posts: 7
Thank you so much! These tips worked out great!

Image


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Sat Dec 17, 2016 1:54 pm 
Offline
FlightAware Member
MikeMathee - FlightAware user avatar

Joined: Sun Sep 11, 2016 12:35 pm
Posts: 50
Akissack wrote:
If you are using the openlayers dump1090, then this may help:

In planeObject.js, around line 308 in 'PlaneObject.prototype.updateIcon = function()'
replace:
Code:
                } else {
                        this.markerIcon = icon;
                        this.markerStyle = new ol.style.Style({
                                image: this.markerIcon
                        });
                        this.markerStaticIcon = null;
                        this.markerStaticStyle = new ol.style.Style({});
                }

with:
Code:
                } else {
                        this.markerIcon = icon;

                        var labelText = '';
                        labelText     = (this.flight ? 'Call: '+this.flight : 'No Call');
                        labelText     = labelText +'\n ICAO: '+this.icao ;
                        labelText     = labelText +'\nAlt: '+ (this.altitude ? parseInt(this.altitude/100) : '?');

                        this.markerStyle = new ol.style.Style({

                               text: new ol.style.Text({
                                        text: labelText ,
                                        fill: new ol.style.Fill({color: 'yellow'}),
                                        stroke: new ol.style.Stroke({color: this.labelColour, width: 4}),
                                        textAlign: 'left',
                                        textBaseline: "bottom",
                                        font: 'normal 10px tahoma',
                                        offsetX: +15,
                                        offsetY: +30
                                }),

                                image: this.markerIcon
                        });
                        this.markerStaticIcon = null;
                        this.markerStaticStyle = new ol.style.Style({});

                }


to give something like: Image


I tried this on the dump1090-fa, planeObject.js file located in /usr/share/dump1090-fa/html, but it does not seem to work.

How could this be done on the dump1090-fa installation?


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Sun Dec 18, 2016 1:41 am 
Offline
supernova87a - FlightAware user avatar

Joined: Tue Aug 14, 2007 7:00 pm
Posts: 7
Quote:

I tried this on the dump1090-fa, planeObject.js file located in /usr/share/dump1090-fa/html, but it does not seem to work.

How could this be done on the dump1090-fa installation?



Are you sure that that directory is the one being used by the web server? If you create a backup copy of the planeObject.js file, and edit the live one, does it cause any change in the displayed icons? If not, then you may be editing the wrong instance of the file?


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Sun Dec 18, 2016 6:05 am 
Offline
FlightAware Member
MikeMathee - FlightAware user avatar

Joined: Sun Sep 11, 2016 12:35 pm
Posts: 50
supernova87a wrote:
MikeMathee wrote:
I tried this on the dump1090-fa, planeObject.js file located in /usr/share/dump1090-fa/html, but it does not seem to work.

How could this be done on the dump1090-fa installation?
Are you sure that that directory is the one being used by the web server?


It was in fact the correct file and location.
Just had to reboot the system. :oops:

Thank you for this!


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Sun Dec 18, 2016 10:46 am 
Offline
FlightAware Member
GDoggRaspberry - FlightAware user avatar

Joined: Sat May 09, 2015 1:12 pm
Posts: 69
MikeMathee wrote:
supernova87a wrote:
MikeMathee wrote:
I tried this on the dump1090-fa, planeObject.js file located in /usr/share/dump1090-fa/html, but it does not seem to work.

How could this be done on the dump1090-fa installation?
Are you sure that that directory is the one being used by the web server?


It was in fact the correct file and location.
Just had to reboot the system. :oops:

Thank you for this!


This is great! It was a bit much on my screen with 80 planes visible so I simplified it to only display the identifier. The sole entry for labelText is:

labelText = (this.flight ? this.flight : ' ');

And moved it very close to the plane icon:

offsetX: +10,
offsetY: +5


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Sun Dec 18, 2016 11:43 am 
Offline
FlightAware Member
Akissack - FlightAware user avatar

Joined: Sun Jun 21, 2015 12:55 pm
Posts: 63
GDoggRaspberry wrote:

This is great! It was a bit much on my screen with 80 planes visible so I simplified it to only display the identifier. The sole entry for labelText is:

labelText = (this.flight ? this.flight : ' ');

And moved it very close to the plane icon:

offsetX: +10,
offsetY: +5


Agreed, in reality I use these two additional lines so that the labels only appear when I zoom to an area/plane of interest

Code:
                    var zmm = OLMap.getView().getZoom();
                        if (zmm <= 8) labelText = '';


Code:
                } else {
                        this.markerIcon = icon;

                        var labelText = '';
                        labelText     = (this.flight ? 'Call: '+this.flight : 'No Call');
                        labelText     = labelText +'\n ICAO: '+this.icao ;
                        labelText     = labelText +'\nAlt: '+ (this.altitude ? parseInt(this.altitude/100) : '?');

                        // Selective labeling
                        var zmm = OLMap.getView().getZoom();
                        if (zmm <= 8) labelText = '';

                        this.markerStyle = new ol.style.Style({

                              text: new ol.style.Text({
                                      text: labelText ,
                                      fill: new ol.style.Fill({color: 'yellow'}),
                                      stroke: new ol.style.Stroke({color: this.labelColour, width: 4}),
                                      textAlign: 'left',
                                      textBaseline: "bottom",
                                      font: 'normal 10px tahoma',
                                      offsetX: +15,
                                      offsetY: +30
                               }),

                               image: this.markerIcon
                        });
                        this.markerStaticIcon = null;
                        this.markerStaticStyle = new ol.style.Style({});

                }


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Sun Dec 18, 2016 1:05 pm 
Offline
FlightAware Member
MikeMathee - FlightAware user avatar

Joined: Sun Sep 11, 2016 12:35 pm
Posts: 50
Akissack wrote:
Agreed, in reality I use these two additional lines so that the labels only appear when I zoom to an area/plane of interest

Code:
                    var zmm = OLMap.getView().getZoom();
                        if (zmm <= 8) labelText = '';


This is great!


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Sun Dec 18, 2016 1:41 pm 
Offline
EGBWJon - FlightAware user avatar

Joined: Sun Jul 31, 2016 11:41 am
Posts: 13
Can this label option be added to the next release of Dump1090 FA Debian/Raspbian packages please?

It's too complicated to add for those who can't do Linux and don't have dump 1090 Mutability installed


Thanks


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Sun Dec 18, 2016 1:55 pm 
Offline
FlightAware Member
MikeMathee - FlightAware user avatar

Joined: Sun Sep 11, 2016 12:35 pm
Posts: 50
EGBWJon wrote:
Can this label option be added to the next release of Dump1090 FA Debian/Raspbian packages please?

It's too complicated to add for those who can't do Linux and don't have dump 1090 Mutability installed


Thanks


I added this to my dump1090-fa installation.
Does not require much skill, only need to add the lines to the file.
It's as difficult as editing a text file.


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Sun Jan 15, 2017 1:52 pm 
Offline
EGBWJon - FlightAware user avatar

Joined: Sun Jul 31, 2016 11:41 am
Posts: 13
Hmm

I'm still struggling!

I found the file to edit to add labels, but I did not have permission to overwrite it or save after editing. I tried to change permissions but it wouldn't have it in SSH/SFTP or on the Pi itself


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Sun Jan 15, 2017 7:28 pm 
Offline
FlightAware Member
toverfield - FlightAware user avatar

Joined: Fri Jun 03, 2011 5:30 pm
Posts: 82
Location: Lake Travis, TX
EGBWJon wrote:
I found the file to edit to add labels, but I did not have permission to overwrite it or save after editing. I tried to change permissions but it wouldn't have it in SSH/SFTP or on the Pi itself

I use, for example:

Code:
sudo vi planeObject.js


Top
 Profile  
 
 Post subject: Re: methods to show flight info labels directly on dump1090
PostPosted: Tue Jan 17, 2017 1:17 pm 
Offline
seh2000 - FlightAware user avatar

Joined: Sat Nov 08, 2014 9:29 pm
Posts: 29
Hi,

Hope OK I add a question to this topic.


I have successfully updated planeObject.js with the code suggested by Akissack earlier.

Now, I would like to add the start and end destinations e.g. LAX - DUB, but I struggle to find the right codes to add.

Not knowing if it is possible, but if then could anybody make a suggestion?


Cheers Steen


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 36 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: oracfa and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to: