Show only recorded positions in trail & coloured list

The "to-do" list for Virtual Radar Server is as long as my arm, but if you want to pile more work onto it then this is for you.
Post Reply
Bhaal
Posts: 37
Joined: Wed Aug 12, 2015 10:20 am

Show only recorded positions in trail & coloured list

Post by Bhaal » Mon Aug 24, 2015 8:10 am

Hi agw,

So I don't normally look at dump1090's web out put often, but I noticed with the newer versions of mutability that it only shows altitude trails for recorded positions, in between it's just a dashed line, similar to the way FR24 displays when it loses track of aircraft, just wondering if this would be possible to implement with VRS? Would be interesting to see my black spots etc.. I have the "remove from map after signal lost" setting set to 60 seconds, so the planes don't disappear and reappear all the time when flying between trees and houses in line with my LoS...

Also, is there a way to colour the lines in the list for mlat planes? If it's not easy, then it's no problem, just a question (Yes, saw this change in dump1090-mutability as well) :)

Thanks!

Bhaal
Posts: 37
Joined: Wed Aug 12, 2015 10:20 am

Re: Show only recorded positions in trail & coloured list

Post by Bhaal » Sat Jan 16, 2016 4:45 pm

Ok, hate to drag this thread out again, but I sat down for a little while and figured out how to use the custom content plugin to change the colour of the rows in the list for MLAT aircraft, it's very crude (My javascript foo is not good), but works, although it's a little clunky as I also have added the mouseover example code to my vrs so I had to do more trickery to make it play ball as well, otherwise it would have been simpler.. Oh well.. Also (just thought about this) Doing this could interfere with the emergency squawk colour change... AND I am sure agw is going to shake his head or run away screaming etc....

Sooo, To make it work you will need to have the "Transponder Flag" added to the Aircraft List, doesn't matter what position it's in.

<EDIT:> Ok, it's not so clunky now, works well, instead of injecting CSS I just add/remove classes and now it works perfectly along with the mouseOver highlighting... I have edited the code sections with what is working for me now....</EDIT>

In my custom CSS file is this which is JUST for the mouseover in the list (A demo from the Custom Content Plugin documentation):

Code: Select all

<style media="screen" type="text/css">
.aircraftList .vrsEven:hover,
.aircraftList .vrsOdd:hover {
    color: #ffffff;
    background-color: #327CD8;
}
.aircraftList .mlatEven {
    background-color: #eedcf4;
}
.aircraftList .mlatOdd {
    background-color: #fdf5ff;
}
.aircraftList .mlatEven:hover,
.aircraftList .mlatOdd:hover {
    color: #ffffff;
    background-color: #327CD8;
}
</style>
And now for the hack of the century:

Code: Select all

if(VRS && VRS.globalDispatch && VRS.serverConfig) {
    VRS.globalDispatch.hook(VRS.globalEvent.displayUpdated, function(bootStrap) {
        $('table.aircraftList.live td').filter(function(){
            if($(this).attr('title') === "Mode-S" && !$(this).parent().hasClass("vrsSelected") && ($(this).parent().hasClass("vrsEven") || $(this).parent().hasClass("vrsOdd") || $(this).parent().hasClass("interested"))) {
                if($(this).parent().hasClass("vrsEven")) {
                    $(this).parent().removeClass("vrsEven").addClass("mlatEven");
                }
                else {
                    $(this).parent().removeClass("vrsOdd").addClass("mlatOdd");
                }
            }
            else {
                if($(this).parent().hasClass("mlatEven")) {
                    $(this).parent().removeClass("mlatEven").addClass("vrsEven");
                }
                else {
                    $(this).parent().removeClass("mlatOdd").addClass("vrsOdd");
                }
            }
        });
    });
};
Hope that helps someone out besides me... Or at the very least you get a good laugh out of it :D

Post Reply