alkissack / dump1090-openlayers-html Goto Github PK
View Code? Open in Web Editor NEWModifications to the Openlayers html files (part of the dump1090-fa branch)
License: GNU General Public License v2.0
Modifications to the Openlayers html files (part of the dump1090-fa branch)
License: GNU General Public License v2.0
Thanks for this excellent variant of the html. A couple of us used this years ago with the PiAware SD card image v4.0 and it worked great. Trying it now with the PiAware SD card image v8.2 it continues to work well except that the aircraft names always now show as Unknown. I've scoured the code but am not sure why the various types defined don't appear. Mentioning it here in case you're not aware and there's a fix. Probably related to some change with how SkyAware works in the current 8.2 version.
Thanks once again.
Chris
The current export/import ranges functionality has limited granularity. Ranges are exported per degree so there can be a loss of a maximum range if, for example, if a maximum falls on a bearing such as 10.5 degrees.
This will help keep that hard-won range plot from being lost by a browser reset.
Thanks for your recent updates, lots of new features to play with. Much appreciated. It looks great. Currently testing the range plot export and import. Seeing if I can automate a scp to send the downloaded files back into the backup directory on the Pi. I don't think the front-end can do that directly itself due to standard browser security setups these days.
This issue
Not really an issue, another enquiry. On the map, the mouse pointer's lat, lon and distance to the site (in the chosen units) is present in the upper left and updates in real time.
I wondered, might it be possible to also add the bearing relative to the site please? ie 000° to 359°. That gives an accuracy of ~4 NM per degree at a range of 220 NM when moving tangentially to the site. Should be accurate enough for this context.
The reason being that it's very useful when combined with the range plot. For example, I see a large spike increase in range in one particular direction. It appears to correlate with a gap between houses. I'd like to see the exact bearing by moving my mouse over it, and then use a compass here to confirm if the gap is indeed responsible.
Another example is moving to a distant aircraft of interest which may be visible with binoculars or a scope. Confirm the bearing on the map, duplicate with a compass and this greatly assists in locating the aircraft visually, rather than trying to guesstimate the direction.
Just an idea, no worries if it's not feasible or a ton of work. Many thanks.
Chris
Hi alkissack,
I wasn't too sure how else to get hold of you. Im fairly new to this.
I love your version of this, especially the aircraft images..!
Any chance you may be working on an updated "list" of aircraft icons/images for the map - to include some Airbus, Embraer images??
Keep up the good work, love it!!!
Hello.
I've been unsuccessful trying to use this web-root in my fork of the original Dump1090 by Salvatore Sanfilippo.
When I handle the GET /data/aircraft.json
, I send back to the web-client an array like this:
[
{"hex":"471234", "flight":"abcd", "lat":60.1, "lon":-5.0, "altitude":4000, "track":140, "speed":300},
...
]
But nothing gets shown on the nice map.
What other .json
array does it need to function? Is this documented somewhere?
Please advice.
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.
Thankyou for your recent updates to this project.
This issue relates to the map options in the drop-down for "Terrain" and "Terrain + Roads". These options are resulting in a blank canvas with just the aircraft and range, etc overlaid. In otherwords, the map parts are not loading.
Further investigation reveals that the tiles are being loaded from subdomains which apparently do not exist. For example one of the tiles:
$ nslookup a.tile.stamen.com
** server can't find a.tile.stamen.com: NXDOMAIN
Edit – it looks like this is responsible
https://stamen.com/stamen-x-stadia-the-end-of-the-road-for-stamens-legacy-map-tiles/
Edit 2 – It looks like there is no way for you to make the new service available en masse since it requires an API key or domain auth (I may be wrong on that and it can still be done). Perhaps the code can be updated to use the new service and users instructed to create their own accounts and obtain an API key if they want to use it (free for 200,000 credits), and config.js
updated to store the key, eg stadiaKey = xxx ;
.
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;
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; }
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
.
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?
for a selected aircraft the infoblock will show the correct aircraft type. i.e. the span "selected_icaotype" is correct
However, the mouseover on the aircraft icon in the map will show "unknown aircraft" and the name column in the table is empty.
any thoughts on what can be done to get the aircraft type consistent across the 3 areas?
Myself and a friend have been playing with the Export Ranges feature. It turns out that different browsers are handling this in different ways.
Firefox saves all 3 files: minRange.json
, midRange.json
and maxRange.json
.
Safari usually saves just minRange.json
, but sometimes saves just midRange.json
Chrome prompts to save one of the files and then pops up a window asking to save or cancel the remaining "multiple files".
In the case of Safari, I found a similar post which implied that if the downloads are too quick in succession, Safari doesn't respond to all of them. I think this is what is happening here. It was suggested that a short delay between the files can mitigate that.
It may also mitigate the effect on Chrome, which appears to be treating the succession of downloads as something potentially threatening, something it doesn't do for single file downloads with a short delay between them.
I took a look at the code and am not sure where a delay might be introduced, because it seems that all three files are formed and downloaded horizontally as part of the same logic in a single function.
Is it possible to add a short delay, for example 1 second, between each file being downloaded please? I think this would fix Safari's handling and may also keep Chrome from prompting.
Alternatively, instead of having a single Export Ranges button, having a button for each range type should work, each linking to a function just for that range type. But that is not as pretty but would be functional and foolproof since we can then just save whichever range type we want at a given time.
On a related note, your own range plots are present in the backup directory, maybe left over from testing.
I set up a test rig with the current FlightAware dump1090-fa and then copied public-html to /usr/share/skyaware and it results only in a blank page with spinning wheel, no map and no planes and no data is being shown.
It worked flawlessly with version 7.2 of dump1090-fa but not with version 8.2, any chance of an update?
Can I support fault finding with logs or anything?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.