What is the Maximum Range I can Get?

Distance is given on the mutability version of dump1090.

Yes, running Mutabilityā€¦I have distance, but donā€™t have Bearing. Iā€™m looking for ā€œPlane is 240Ā° @ 52NM from siteā€ information. Mutability is halfway there, and I have the Position info as well in Lat/Long, but would love if Plane Lat/Long vs Site Location Lat/Long was calculated into a Bearing.

I chose to overwrite the files from the Github and the dump1090 page wonā€™t load. The loading bar goes all the way to the right and just spins. Thoughts?

Upon further testing, just copying the new script.js to the existing directory breaks it.

That is simple trig. I am sure it has already been written. It just needs to be added to the display.

You canā€™t do that, the files are dependent on each other and must be used as a set, you canā€™t mix and match. Pull all the files in the html folder over except for config.js. For config.js you need to add the extra lines to your existing file.

If you still have problems open the JavaScript console or debugger in your browser and let us know what the error message(s) are.

The bearing data exists, where do you want to see it? As another column in the table, or in the data block for the selected aircraft?

You must enter the additional lines at the end of the config.js file. These declare new variables that the updated script.js relies on. If the variables are not set, then the new script.js wonā€™t work and youā€™ll see the never-ending spinner.

Wanted to use it in the data block for a selected aircraft, so instead of just ā€œDistance from Siteā€, it will read ā€œBearing/Distance from Siteā€ for that aircraft.

the problem lied within script.js both


RangeAltitude
UseMlatDataForRange

was undefined. Fixed by adding below to script.js


var RangeAltitude = ];
var UseMlatDataForRange = ];

Although, Toggle Range doesnā€™t do anything. The only error currently showing is


"Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required"

@usafpride - you just keep installing a very small part of the needed changes. This is exactly what you will get if you ignore the above advice from both me and mgunther to update your config.js. :astonished: : The edits you suggest to to the new script.js are NOT needed and will instead break the Range system.

Can I suggest you do the following to start again:

  1. Save your current config.js file to a different location.

  2. Copy everything (including sub-folders) that is in the public_html folder on github.com/lignumaqua/dump1090 over your current public_html folder

  3. Edit your curent, saved, config.js, by adding the following lines at the end.



// Grid size for heatmap. Range in miles from Site. Default 200. 
HeatMapRange = 200;

// Set Altitudes and Colors for Range Rings
// RangeAltitude is an array of altitudes in feet
// Use 99999 for range at any altitude
// RangeColor is a corresponding array containing the color values of the rings
RangeAltitude  = new Array(99999,30000,10000);
RangeColor     = new Array('#008000','#000080','#800000');

// Allow use of MLAT data for the range poly
UseMlatDataForRange = true;


  1. Put your edited config.js back in the public_html folder

Cool, Iā€™ll add that. :smiley:

I did follow your advice and I copied everything over from GitHub brand new. Completely new install. config.js contains those lines already. Maybe Iā€™m not getting the most recent copy from GitHub, but I simply did a


sudo cp -rf ~/dump1090/public_html/* /usr/share/dump1090-mutability/html/

Iā€™ll give it another try.

Still no joy. Clean install results in these errors with FF 44.0


Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead jquery.min.js:1:0
unreachable code after return statement script.js:1142:8
ReferenceError: RangeAltitude is not defined
 script.js:22:17
unreachable code after return statement script.js:1142:8
39.93922141570338 45.72077858429662 -89.4288833207844 -81.55111667921557 script.js:621:9
InvalidValueError: not an Array <unknown>
"Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required" util.js:23:322

@usafpride:
I have a update_lignumaqua.sh file with the following in my home directory:


rm -rf dump1090/
git clone -n https://github.com/lignumaqua/dump1090 --depth 1
cd ./dump1090
git checkout HEAD:public_html formatter.js gmap.html planeObject.js script.js style.css maplabel.js
rm -rf ./.git
sudo cp ./*.* /usr/share/dump1090-mutability/html/

It copies and updates all required files. But you still need to manually add some lines to config.js.

I removed everything from


/usr/share/dump1090-mutability/html

, ran your update script. The page now loads, but with no planes showing. Error is as follows


Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead jquery.min.js:1:0
unreachable code after return statement script.js:1142:8
39.93922141570338 45.72077858429662 -89.4288833207844 -81.55111667921557 script.js:621:9
Starting to load history (120 items) script.js:283:17
Loading history #0 script.js:296:9
unreachable code after return statement script.js:1142:8
GET XHR http://192.168.1.107:20800/dump1090/upintheair.json [HTTP/1.1 404 Not Found 26ms]
Loading history #1
<snip>
Done loading history script.js:318:9
Sorting history script.js:324:17
Applying history 0/120 at: 1454775386.7 script.js:330:25
TypeError: PolyRange[j] is undefined planeObject.js:349:1

upintheair.json makes sense not being there as it isnā€™t in the repo to copy over.

These lines are in config.sys


// Grid size for heatmap. Range in miles from Site. Default 200.
HeatMapRange = 200;

// Set Altitudes and Colors for Range Rings
// RangeAltitude is an array of altitudes in feet
// Use 99999 for range at any altitude
// RangeColor is a corresponding array containing the color values of the rings
RangeAltitude  = new Array(99999,30000,10000);
RangeColor     = new Array('#008000','#000080','#800000');

// Allow use of MLAT data for the range poly
UseMlatDataForRange = true;


mgunther shows the right way to do this, much better than my instructions! :slight_smile:

If youā€™ve copied over config.js then you will need to go into that and re-enter your site coordinates and any other changes you had made previously.

PS - Also make sure you do a ā€˜hardā€™ reload in FF (Ctrl-F5) to ensure that cached copies of the old files are discarded

This is a very strange error:


39.93922141570338 45.72077858429662 -89.4288833207844 -81.55111667921557 script.js:621:9

Do you know where those lines are coming form? They arenā€™t in the script.js file. can you see them in config.js or any of the files?

Done and Done. No planes show. I fired up IE11 and it loads fine, so it is a FF issue

it is coming from this block of code in script.js (in particular, the console.log is the line)


if (SitePosition) {
        maxlat = google.maps.geometry.spherical.computeOffset(SitePosition, HeatMapRange * 1609,0).lat();
        minlat = google.maps.geometry.spherical.computeOffset(SitePosition, HeatMapRange * 1609,180).lat();
        maxlon = google.maps.geometry.spherical.computeOffset(SitePosition, HeatMapRange * 1609,90).lng();
        minlon = google.maps.geometry.spherical.computeOffset(SitePosition, HeatMapRange * 1609,270).lng();
        console.log(minlat, maxlat, minlon, maxlon);
        latstep = (maxlat - minlat)/(HeatMapRange *2);
        lonstep = (maxlon - minlon)/(HeatMapRange *2);
        HeatMapValid = true;
    }

Ah - thanks! I test in Safari, IE, Chrome, and Opera. Havenā€™t used Firefox in many yearsā€¦ Looks like I need to install it and address its quirks. Sorry you had these problems.

(Iā€™m used to javscript consoles that separate errors from console logs, thanks also for solving that mystery.)

No worries. Some days Iā€™m not the sharpest knife in the drawer, but today seems to be a good day :slight_smile:

Interesting note, "Select Closest" will display that plane on the map.