I used BBEDIT and find/replace to build a list of values and then prepend and append to format the list. It was a one off so I didn’t bother scripting it, only took about 20 seconds.
I thought I was getting to grips with the piaware.
Especially when I read this thread and nearly understood it! Anyway, what ever I did, didn’t work, but at least I haven’t broken it this time. The map still displays, aircraft still show up, but my hoped for visibility limit hasn’t appeared.
Bound to be finger trouble somewhere. fault finding, don’t you just love it!
You need to download the json file and put it in dump1090’s html dir by hand, as heywhatsthat.com doesn’t allow cross-origin script access to the API so the map script can’t just request it directly.
Thanks guys! I got it working too. I did the same, just a few find/replace strings and edited the rest by hand.
I am running the “PiAware” image right now so I am not sure if I want to mess with swapping out my dump1090 version, although I do like the color thing!
I built the scripts for 10K,20K,30K, and 40K feet, but I am only using the first three as my range obviously drops off before I ever get to the 40K ring. No suprise to me that these things are pretty circular, I live in a pretty flat part of the country, but I do think it is a funny coincidence that my range for 10K feet lines up pretty closely with the 100nm ring, 20K feet with the 150nm ring, and 30K feet with the 200nm ring. I think in all honesty I could either turn off the range rings or leave out my calculated rings.
Oh, and one thing that heywhatsthat can’t calculate is that I have my antenna in a north facing window and I am almost completely blind to the south because of that. That is why you don’t see much south of my location.
Hi dschieszer!
Member mgunther has given an excellent method to build & install dump1090-mutability v1.15 ~dev in thread What is Easiest Way To Install Dump1090-Mutability. Click here to see the procedure.
Thanks Oliver. You have recommended to use Refraction 0.25 instead of default 0.14. Is it due to difference in optical & radio horizons?
I gave this a try in my Orange Pi running dump1090-mutability v1.15~dev.
My Steps:
(1) Followed instructions in first post of this thread, and noted ID displayed (not the name I have given, but ID generated by heywhatsthat site - see this post by member lignumaqua)
(2) Opened following address in my web browser (XXXXX is my ID from heywhatsthat site)
http ://www.heywhatsthat.com/api/upintheair.json?id=XXXXXXX&refraction=0.25&alts=3048,6096,9144,12192
(3048 m = 10,000 feet, 6096m = 20,000 feet, 9144 m = 30,000 feet, 12192 m = 40,000 feet)
Copied the entire text displayed, then SSH using PuTTy, and opened a new blank file in nano named upintheair.json
root@orangepi:~# cd /usr/share/dump1090-mutability/html
root@orangepi:/usr/share/dump1090-mutability/html# sudo nano upintheair.json
Then pasted the text I have copied from my desktop browser in the blank file upintheair.json in nano, saved (Ctrl+o) and exit (Ctrl+x).
Reloaded page http :///dump1090/gmap.html, and terrain-limit rings were shown.
Later I have did some enhancement in my Orange Pi’s script.js to give different colors to different altitude rings. These are shown in red below:
// Add terrain-limit rings. To enable this:
//
// create a panorama for your receiver location on heywhatsthat.com
//
// note the "view" value from the URL at the top of the panorama
// i.e. the XXXX in [heywhatsthat.com/?view=XXXX](http://www.heywhatsthat.com/?view=XXXX)
//
// fetch a json file from the API for the altitudes you want to see:
//
// wget -O /usr/share/dump1090-mutability/html/upintheair.json \
// 'http://www.heywhatsthat.com/api/upintheair.json?id=XXXX&refracti$
//
// NB: altitudes are in _meters_, you can specify a list of altitudes
// kick off an ajax request that will add the rings when it's done
var request = $.ajax({ url: 'upintheair.json',
timeout: 5000,
cache: true,
dataType: 'json' });
request.done(function(data) {
for (var i = 0; i < data.rings.length; ++i) {
var limitColor;
if (i==0){limitColor='#FF00FF'};
if (i==1){limitColor='#0000FF'};
if (i==2){limitColor='#00FF00'};
if (i==3){limitColor='#FF0000'};
var points = data.rings*.points;
var ring = ];
for (var j = 0; j < points.length; ++j) {
ring.push(new google.maps.LatLng(points[j][0], $
}
ring.push(ring[0]);
.
This is the data array I obtained in my web browser & copied/pasted in the OPi’s newly created blank file /usr/share/dump1090-mutability/html/upintheair.json
I miss my old elevation (moved about 8km further south in the Greater Toronto Area), yellow being the old and red the new coverage, lost 100 feet. The further north you are from Toronto, the higher the elevation.
Did a new install on virgin Jessie, using script and there were no errors. It even created the empty upintheair.json, thanks.
That said I still cannot get the maximum range rings. Since the json is in the right place, it must be my formatting. My friend ABCD said that he copied and pasted the web output. Should I have done that rather than format it to change from ] to {} etc? I noticed that in an earlier post the “segments” were in pairs and then a new line. I’m not to certain about the rules for json but mine pasted as one line.
Apologies for my lack of knowledge on json.
You are only 35km north of my sister in law. I think it would take serious arm twisting to get a piaware on her roof, but worth a try!
I was looking at the Nooelec mini 2 or 2+ but have held off until I get my amplifier sorted out. I have a feeling that I’m limited by terrain rather than equipment and wanted to check that first.
I’m still getting the odd 300+ a/c in the same two directions. Both these directions have electricity transmission lines which of course are low to the terrain so between me and the signal. I wondered if these were “bending” a signal or just causing a spurious contact.
Hi Phill,
The script should have downloaded a fully populated upintheair.json file and not an empty one. My guess is that you specified an incorrect view ID when the script asked you for it. I don’t think re-running the script will help and also you should not need to manually edit the json file. You can try to obtain the upintheair json file using the following method. (This is taken directly from dump1090 public_html/script.js file):
i Phill,
The script should have downloaded a fully populated upintheair.json file and not an empty one. My guess is that you specified an incorrect view ID when the script asked you for it. I don’t think re-running the script will help and also you should not need to manually edit the json file. You can try to obtain the upintheair json file using the following method. (This is taken directly from dump1090 public_html/script.js file):
Hi, thanks for the reply.
I tried as you suggested using a new heywhatsthat id but was still unable to download. The upintheair.json is created but is unpoplulated. Not sure what I am doing wrong. After running wget I get:
< and hollow cursor, but never returns to $. I’ve left it an hour so far but nothing. I’ll try just population the file with nano and see how it goes.
ANSWER: wget will NOT download populated json file. This was already pointed out by @obj on page 1 of this thread. I am copying his post below:
You have to:
(1) Open the json file in a browser on your Desktop or Laptop using address “http://www.heywhatsthat.com/api/upintheair.json?id=XXXX&refraction=0.25&alts=3048,9144” where XXXX is your ID from heywhatsthat site.
(2) SSH to RPi from the Desktop/Laptop
(3) Open a blank file “upinthair.json” in your RPI throgh SSH terminal using command
(4) Copy the entire content (un-modified) from the json file which is open in your desktop’s web browser
(5) Paste the copied content into blank file in nano in SSH terminal. Do NOT modify the pasted content in nano file.
(6) Save the nano file “upintheair.json” by Ctrl+o, and exit by Ctrl+x.