alkissack / Dump1090-OpenLayers-html

Modifications to the Openlayers html files (part of the dump1090-fa branch)
GNU General Public License v2.0
44 stars 20 forks source link

Assorted questions, feedback and tweaks #11

Closed clwgh closed 1 year ago

clwgh commented 1 year ago

Hi Allan, this is a mixture of assorted questions, feedback and tweaks for Dump1090 OL3 that I first mentioned in June.

I will number each item. If you would like a separate issue opening, or more info, or a PR on any particular item, please reference the number and I will oblige. I'll collate the answers into a Q&A document and issue a PR for that so it can be built on over time. Thanks for your work in maintaining this OL3 repo.

1. QUESTION. If an aircraft comes along which would extend the range plot, but the aircraft is hidden because there is a height filter in use, will the plot still be extended?

2. QUESTION. Is it possible to have buttons which can export or import all the (Max|Mid|Min)Rng(Lat|Lon|Range) data from localStorage, eg as a JSON file? This will help keep that hard-won range plot from being lost by a browser reset.

3. QUESTION. When using the mouse scrollwheel on the official SkyAware the zoom is very smooth and gradual. When using it on OL3 the zoom consists of course steps with no in-between zoom levels. Is there a way to make the OL3 mouse scrollwheel zooming smooth?

4. QUESTION. The default columns displayed with the map are ICAO, flag, Ident, Name, Squawk, Altitude, Speed, Distance and Track. Expanding the table shows all the available columns. Is there a way to add some of these to the default columns? For example I'd like to be able to see RSSI all the time. Perhaps there could be a section in config.js where all the columns are listed with 1 or 0 for shown or not shown, with the above columns being set to 1 as by default.

5. QUESTION. Is there a way to set which map layers are enabled by default? Perhaps this could be a section in config.js, with all layers listed and a 1 or 0 for shown or not shown by default.

6. FEEDBACK. Both config.js and script.js spell "Terrain" as "Terrian". But since the spelling is consistent it all still works :-) Not sure if this is deliberate, thought it worth mentioning.

7. QUESTION. By default the range plot values in config.js are

MinRangeHeight =  2000
MidRangeHeight = 10000
MaxRangeHeight = 50000

It is possible for some aircraft to be seen above 50,000ft. I want to include those in the max range plot. Is it okay to simply change that line from 50000 to, say, 100000? This would catch everything ever likely to be seen, but is it safe (in terms of plot data integrity) to simply change this value like this?

Related question – what happens if it stays at 50000 and an aircraft comes in above that? Does that aircraft not count towards the max range plot (since MaxRng* already represent the highest values)?

8. TWEAK. I changed the HeyWhatsThat terrain rings from solid black to dashed blue. This helps separate it from the solid black range circles.

config.js line 136 UseTerrianLineDash = true;

script.js line 1731 color: "#0000ff",

9. TWEAK. The Mac renders the table with a small serif monospaced font which is hard to read. I added a font entry in style.css which allows it to use standard Mac font, Menlo-Regular, a much nicer sans-serif monospaced font. There may be a nicer way to do this but it fixes the problem.

style.css lines 126, 156, 157

#tableinfo { font-size: 10pt;  font-family: Menlo-Regular, monospace;} /* AKISSACK  ------------ Ref: AK9F */
.icaoCodeColumn {
    font-family: Menlo-Regular, monospace;

menlo-font-table-mac

10. TWEAK. The table always loaded with a fixed width and needed to be expanded slightly to let it all fit on and remove the scrollbar. I fixed this by changing the sidebar container width from the default 500px to auto. Note however this only works when loading or reloading the page. If the table is expanded and then Show Map is used the table returns as squashed again (reloading the page with this tweak fixes it again). I think something else is controlling the width there but I have not found where that is.

style.css line 97 width: auto; /* AKISSACK ------------ Ref: AK9F */

11. TWEAK. The selected aircraft line in the table is grey. This is visually difficult to pick out. I have changed the selected colour to a shade of yellow. This makes it much easier to see and, as a bonus, complements the yellow style on selected aircraft on the map.

style.css line 168 .selected { background-color: #dddd66; }

selected-aircraft-yellow-table

12. TWEAK. To avoid wiping the hard-won range plot if accidentally misclicking Reset Range I have changed the behaviour of that element in index.html from onclick to ondblclick to require a double-click.

index.html line 130 <span class="sidebarButton pointer" ondblclick="resetRangePlot();">Reset Range</span> <!-- AKISSACK Ref: ref: AK8K -->

13. FEEDBACK. When hovering the mouse on an aircraft, the pop-up box is always in NM (shown as nm) regardless of the DisplayUnits option in config.js.

popup-always-nautical-miles

alkissack commented 1 year ago

very helpful. I am rolling this out (starting with the quickest)

alkissack commented 1 year ago
  1. QUESTION. If an aircraft comes along which would extend the range plot, but the aircraft is hidden because there is a height filter in use, will the plot still be extended? ANSWER. Plot is still honoured for hidden aircraft (I cleared my ranges and selected only 'specials' and could see the range altering due to non-special aircraft
alkissack commented 1 year ago

FEEDBACK. Both config.js and script.js spell "Terrain" as "Terrian". But since the spelling is consistent it all still works :-) Not sure if this is deliberate, thought it worth mentioning. ACTION: Typo' now being corrected

alkissack commented 1 year ago

QUESTION. By default the range plot values in config.js are..... ANSWER . I'll update this to 99999, I see no downside to this

alkissack commented 1 year ago

TWEAKS 8,9,10, 11 & 12. ACTION: Incorporated as-is (thanks) TWEAK 10. ACTION: A further adjustment has resolved this in script.js function showMap() { $("#map_container").show(); $("#toggle_sidebar_control").show(); $("#splitter").show(); $("#sudo_buttons").show(); $("#show_map_button").hide(); $("#sidebar_container").width("auto"); // <<<<<<<<<<<<<<<<<<<<<<<<

alkissack commented 1 year ago
  1. FEEDBACK - CORRECTED
alkissack commented 1 year ago
  1. QUESTION. Is there a way to set which map layers are enabled by default? Perhaps this could be a section in config.js, with all layers listed and a 1 or 0 for shown or not shown by default. ANSWER - I looked into this and it is possible, but it seems that with a session storage the manually save settings are honoured, so if you choose the preference for layers, this look to be retained unless the cache is forced to be cleared
alkissack commented 1 year ago
  1. QUESTION. Is it possible to have buttons which can export or import all the (Max|Mid|Min)Rng(Lat|Lon|Range) data from localStorage, eg as a JSON file? This will help keep that hard-won range plot from being lost by a browser reset. REMARK - added a save option as a development option. later to investigate loading these files back in.
alkissack commented 1 year ago
  1. QUESTION. Is it possible to have buttons which can export or import all the (Max|Mid|Min)Rng(Lat|Lon|Range) data from localStorage, eg as a JSON file? This will help keep that hard-won range plot from being lost by a browser reset.

  2. QUESTION. When using the mouse scrollwheel on the official SkyAware the zoom is very smooth and gradual. When using it on OL3 the zoom consists of course steps with no in-between zoom levels. Is there a way to make the OL3 mouse scrollwheel zooming smooth?

  3. QUESTION. The default columns displayed with the map are ICAO, flag, Ident, Name, Squawk, Altitude, Speed, Distance and Track. Expanding the table shows all the available columns. Is there a way to add some of these to the default columns? For example I'd like to be able to see RSSI all the time. Perhaps there could be a section in config.js where all the columns are listed with 1 or 0 for shown or not shown, with the above columns being set to 1 as by default.

ADDED 3 new issues so as not to lose visibility of these request

alkissack commented 1 year ago

Closing this issue with responses above and addition of 3 more discrete issues

clwgh commented 1 year ago

Thankyou for your time looking at these.

clwgh commented 1 year ago

QUESTION. By default the range plot values in config.js are..... ANSWER . I'll update this to 99999, I see no downside to this

Out of interest is there a reason to use 99999 and not 100000? Is it a way of indicating "the absolute top" versus just another boundary?

What is MaxRangeLikely = 300 used for, is that impacted?

There are some altitude refs to 40000 in other places, eg lines 67 and 142 (both are as below), do they need changing too? I have my mod of 100000 in place and have not touched the below and have not seen any issues, so not sure if it matters.

lines 67 and 142 have these:

h: [ { alt: 2000,  val: 20 },    // orange
     { alt: 10000, val: 140 },   // light green
     { alt: 40000, val: 300 } ], // magenta
alkissack commented 1 year ago

QUESTION. By default the range plot values in config.js are..... ANSWER . I'll update this to 99999, I see no downside to this

Out of interest is there a reason to use 99999 and not 100000? Is it a way of indicating "the absolute top" versus just another boundary?

What is MaxRangeLikely = 300 used for, is that impacted?

There are some altitude refs to 40000 in other places, eg lines 67 and 142 (both are as below), do they need changing too? I have my mod of 100000 in place and have not touched the below and have not seen any issues, so not sure if it matters.

lines 67 and 142 have these:

h: [ { alt: 2000,  val: 20 },    // orange
     { alt: 10000, val: 140 },   // light green
     { alt: 40000, val: 300 } ], // magenta

script.js has a pre existing range for altitudes (line 307) of -99999 to 99999 so I adopted the max of those, rather than 100000 as I wasn't sure if this would be truncated/limited anyway (I am not fully conversant with much of the original code)

MaxRangeLikely - you can change this. I set it as I was getting some silly spike distances (e.g. 500 miles) that were clearly false. so this variable throws away ranges above MaxRangeLikely to preserve a more realistic max range plot. If you are expecting >300 miles, please increase this appropriately.

alt: 40000, val: 300 } ], // magenta <- this is pre-existing code that my implementation retains, but may not reference.

clwgh commented 1 year ago

script.js has a pre existing range for altitudes (line 307) of -99999 to 99999 so I adopted the max of those, rather than 100000

Makes sense, I was just curious.

If you are expecting >300 miles, please increase this appropriately.

I am not expecting that :-)

this is pre-existing code that my implementation retains, but may not reference.

Understood, thanks for checking. This is a really good html drop-in replacement for the stock image, thanks for maintaining it.