It would be neat if on this custom web interface would be a clickable link to your /graphs1090… I have installed both, they are great!
Maybe that link to appear only if detects the custom graphs installed?
@wiedehopf just noticed that label extensions does not respect value in settings “units=metric”. Label extensions will show values still at aeronautical.
Only aeronautical units are proper units
But im the “sunday” spotter so my perception is not enough for aeronautical units
Just had a plane streak across at 47,000. Can you remind us how to get the color/altitude line back on the bottom of the display?
You can’t unless you go back to the original colors.
Which you’d have to figure out how to do yourself (the colors are defined in config.js, you can use the original dump1090-fa colors section).
I’d suggest pressing L and O for extended labels.
You’ll see the altitude next to the plane.
Or K for track labels which also have altitude.
Suggestion Time
Through a url, provide the ability to load the map directly to a specified aircraft.
A request to tar1090 index.html provides a hexcode parameter. Once received by the client side javascript, the map behaves similar in nature to the map behavior once the “Follow” function is executed against a selected aircraft (i.e. map zoomed in on aircraft, track enabled, info shown on left side and selected in table)
Example URL
hostname.com/tar1090/index.html?hc=abd1234
Use case would be to create a specific url within a flight notification script (e.g. which sends out an alert when a preconfigured hex code is seen). Within the notification channel (e.g. email/slack/twitter) the url would allow the user to click and have the map load directly to that aircraft
If the aircraft in the url doesn’t exist or the aircraft has no position then the map could just default to the normal view
I’ll try some code changes tonight and see if I can get it working… Looks like there is a good structure to the functions within the code so that i could hook into existing logic - wml
Hah!
You say that now
In script.js search for loadFinished = true;
that’s where you can use selectPlaneByHex("a6eff9", true)
to select and focus a plane.
Selecting by callsign or tail number is going to be unreliable.
Tail numbers are successively loaded from the database which has quite a few holes.
Also they might not be loaded at that time, it takes a couple of seconds after the actual load is finished.
By callsign should work ok-ish.
Just iterate over the PlanesOrdered
array and check your string against plane.flight
Be aware they callsigns are filled up with spaces, so you might want to use .trim()
or do some kind of regex comparison.
I’m not sure how you get the query key, otherwise i’d probably just implement it.
But you seem to be taking a look so i’ll let you continue
hexcode (my query parameter) to me is the adsb transponder code, not the flight number or callsign.
My aircraft watcher service is using the transponder code to determine an alert.
just to confirm PlaneObject.icao is the transponder code aka hexcode?
No comments?
I would glady give up at the “follow a random plane” letter for the “show graphs”. And a similar button there to switch back to maps.
Good call. I have no use for the “random” button, But… if you launch graphs…if installed… I would want a new browser tab or window to open… if possible
Not knowing the ins and outs of github, I made script.js changes to get it working and put the code on pastebin - Hex Code URL Parameter - Pastebin.com
Functionality
A request to tar1090/index.html?hc=HEXCODE or /tar1090/?hc=HEXCODE will zoom the map to the aircraft in the same way “Follow Random Plane” works
If the hexcode is not present (e.g. a request to /tar1090/ ) or the hex code is not in the viewable & non filtered aircraft then the map loads as normal (using last stored zoom settings as is the default behavior)
Code Changes
- Line 407 to 470 - Added the URL parameter detection function - getAllUrlParams. Code from How to Get URL Parameters with JavaScript — SitePoint
- Line 789 to 802 - Detect a hex code, search for it and select it (if valid)
In my opinion that’s what bookmarks are for.
I opted for the shorter variant that ignores older browsers.
Does this work for you?
Not an option when I serve that web page on the internet to show it to my friends…
Then send them both links.
Make a page where you link to both.
The possibilities are endless.
I could make a config option to place an arbitrary link i suppose but i’m not inclined to do that at the moment.
Thanks, that’s a fair answer.
Now I need to figure out how to work that lighttpd
Yes, it works well. Thank you for the edits and improvements!
tar1090 now supports multiple instances, it’s explained here:
Edit: Uninstall works for individual instances, README has been updated accordingly.