Heads Up on 1.20-1 Update

I was updated yesterday to the new 1.20 version and I had previously made some changes to the files in public_html in order to enhance the local web interface on port 8080.

The changes I made were presented here on the FA in this forum.

The new version overwrites the existing public_html files so I had to go back and edit those files. I have now copied the changed files to a new directory so when future upgrades happen I can simply replace the new with the old and get my enhancements back.

If you have made these changes or wish to in the future you should probably back them up somewhere prior to further updates.

Here are the enhancements. The colored flights are based on altitude.

http://i.imgur.com/OLZJn52.png

Can you point me to that update? I’d like to incorporate it as well – nice work.

(can’t figure out a way to search the forums for posts by a particular author, at least on my phone – wil try again with a real computer when I get home)

73 bob k6rtm

Hi Bob,
These are mostly updates I made to the FA dump190 version (minus the colours - someone else added them). But since I switched to dump190-mutability, I’m not using these modifications any more and they are not compatible with dump1090-mutability.

It was in this thread here:
http://discussions.flightaware.com/ads-b-flight-tracking-f21/rpi-dump1090-tracking-question-and-or-idea-t19709.html

Regards,
Marcus

Bob,Marcus,
Just added below in /usr/share/dump1090-mutability/planeObject,js around line 200



	// If we have not seen a recent position update, change color
	if (this.seen_pos > 15)
		col = StaleColor;

	//---> addition starts here: color plane with altitude 

        if (this.altitude >= 0 && this.altitude < 2000) 
                col = "rgb(255,0,0)";
                
        if (this.altitude >= 2000 && this.altitude < 5000) 
                col = "rgb(200,0,0)";
                        
        if (this.altitude >= 5000 && this.altitude < 10000) 
                col = "rgb(100,0,0)";
                        
        if (this.altitude >= 10000 && this.altitude < 20000) 
                col = "rgb(0,150,0)";
                        
        if (this.altitude >= 20000 && this.altitude < 30000) 
                col = "rgb(0,255,0)";
                        
        if (this.altitude >= 30000 && this.altitude < 50000) 
                col = "rgb(0,0,255)";    

        // addition ends here   <-----

        // If the squawk code is one of the international emergency codes,
	// match the info window alert color.             
        if (this.squawk in SpecialSquawks)
                col = SpecialSquawks[this.squawk].markerColor;



[disclaimer: Changes only to be used with dump1090-mutability. It’ll show you the colors and doesn’t seem to ruin anything else, but probably not the ultimate solution :wink: ]
Code from alexkiddo stolen here
/paul

When I try to edit the planeObject.js file… and save it states Permission denied. Can anyone tell me when I’m doing wrong? I have made sure dump1090 is stopped. Yet I get this message.

Chris, obj had put this modification on his todo list for a future version. Don’t know which editor you use but of it were nano then try starting the editor with: sudo nano planeObject.js
/paul

Ooh! Hope I have the time tomorrow – now I know where to hack!

many thanks–

bob k6rtm

It think we need to reserve the red colours for planes squawking 7700, 7600 & 7500, full intensity colours for regular planes, washed out colours for stale planes.

Thank you! I didn’t use sudo… just typed in nano…

agree on the use of full red for 7XXX codes; and on my machines the file is in:

sudo nano /usr/share/dump1090-mutability/html/planeObject.js

hint – make a backup copy of your changed file as the next update is going to overwrite it…

I like the pretty colours!

(and now we get into the data representation battles – map altitude to colour using a temperature to RGB mapping, scaling 0 to 45000 feet? How many variables can we represent using the object colour – altitude and speed?)

If I really want to avoid the project I should be working on, I’ll port my Arduino temperature to RGB code, which is derived from:

http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/

that should be pretty much a drop-in as it works with values from 1000 - 40000
so if one of you skilled folks has a project to avoid for a little while, have at it!

cheers–

bob k6rtm

Add section for color coded stale aircraft… Not pretty 'cause I did not clean up the old StaleColor

Cheers!
LitterBug



        // If we have not seen a recent position update, change color
        if (this.seen_pos > 15)
                col = StaleColor;

   //---> addition starts here: color plane with altitude

        if (this.altitude >= 0 && this.altitude < 2000)
                col = "rgb(255,0,0)";

        if (this.altitude >= 2000 && this.altitude < 5000)
                col = "rgb(200,0,0)";

        if (this.altitude >= 5000 && this.altitude < 10000)
                col = "rgb(100,0,0)";

        if (this.altitude >= 10000 && this.altitude < 20000)
                col = "rgb(0,150,0)";

        if (this.altitude >= 20000 && this.altitude < 30000)
                col = "rgb(0,255,0)";

        if (this.altitude >= 30000 && this.altitude < 50000)
                col = "rgb(0,0,255)";
//--->  Colored Stale addtion starts here
        if (this.altitude >= 0 && this.altitude < 2000 && this.seen > 15 )
                col = "rgb(255,150,150)";

        if (this.altitude >= 2000 && this.altitude < 5000 && this.seen > 15 )
                col = "rgb(200,125,125)";

        if (this.altitude >= 5000 && this.altitude < 10000 && this.seen > 15 )
                col = "rgb(100,50,50)";

        if (this.altitude >= 10000 && this.altitude < 20000 && this.seen > 15 )
                col = "rgb(120,150,120)";

        if (this.altitude >= 20000 && this.altitude < 30000 && this.seen > 15 )
                col = "rgb(170,255,170)";

        if (this.altitude >= 30000 && this.altitude < 50000 && this.seen > 15 )
                col = "rgb(175,175,255)";
//  Colored Stale addition ends here <-----

   // addition ends here   <-----

        // If the squawk code is one of the international emergency codes,
        // match the info window alert color.