Signal Strength Heatmap

Yes, the page is generated each time the script runs - it includes the date and number of samples used to generate the plots as variables, so they obviously change.

I can amend the name of the HTML file if that’s what people want - I’ve no experience writing web pages so if there are particular ways things are supposed to be done then I’m probably not aware of them. The web page was just cobbled together in the simplest way to make it easier to see the plots, so if someone wants to improve it then feel free.

You can then just put the folder /plots/ in the address bar and the browser will automatically call the index.html.

It’s not really an advantage but it doesn’t hurt :slight_smile:
The danger is of course forgetting the trailing / because it doesn’t work without that.

The minor change I made on plots.html was to add the time it was created. I run this automatically at midnight, so i want to see if it did run at that time. Plus if I’m playing, see the time I messed up the file! :grin:

Heatmap plots - mlat $mlat - created on $date at $date2 from $count positions:

Added this variable to get the time it was created

date2=$(date +%T)

And a little note to remind me whether i’m using MLAT (or MLAT only) in the plots.

So it looks like this:

That’s very good, a simple tweak I’d like to see included.

You beat me to the tweak for adding mlat status!

I’ve change the html file to index.html, and added time and mlat status to the top of the page:

2 Likes

Latest polar.sh (downloaded from GH 20 min. ago) stopped working for me.
It is unable to extract data from timelapse1090 to /tmp/heatmap:

# polar.sh -1
Using config file
HWT OK
Using disk : /tmp
Using local archive:
Unpacking compressed data:
.
Retrieving recent history:
..............................................
/usr/local/bin/polar.sh: line 162: /tmp/heatmap: No such file or directory
Number of data points collected:
Calculating Range, Azimuth and Elevation data:
awk: inplace:25: warning: inplace_begin: Cannot stat `/tmp/heatmap' (No such file or directory)

I have a backup file that is running fine:

root@rpi3:/tmp# ~pi/backup/polar.sh -1
HWT OK
Using disk : /tmp
Using local archive:
Unpacking compressed data:
.
Retrieving recent history:
.........................................................................................
Number of data points collected: 10784
Calculating Range, Azimuth and Elevation data:
Filtering altitudes
Processing heywhatsthat.com data:
Generating all altitudes heatmap...
....

FYI I just had to reboot the Pi3, so my data is almost empty ATM…

Completely empty, it takes some time for timelapse1090 to store it’s first compressed chunk.
The script doesn’t use the scraps lying around so to say.

Yeah, I see.
But the script was failing before the reboot (too). The last reboot was around noon today: severe WiFi issues over here…

It will use the history_timestamp.json files as well - that’s what is doing when it says “retrieving recent history”. That should be sufficient to create a heatmap file.

I think the issue is possibly related to how you are running the script. Can you try running it from the directory it is in with bash polar.sh -1 and see if it runs correctly?
On a pi 3 (or any system with 1Gb or ram or less) it will create the data file on disk rather than in /tmp because large data sets can cause it to run out of ram when processing. When it tries to use the disk it puts the data file into the current working directory, which is possibly causing issues if that is also /tmp.

Thank you for the prompt response.
Moved the script to /home/pi/heatmap/.
I’ll try again sometime tomorrow, since it keeps failing - probably due to a lack of “compressed data” after the reboot 30 min. ago.

You can also test the script by grabbing some data directly - start it like this:
./polar.sh 1 1
and it will grab data every second for a minute and plot it.

Timelapse1090 archives files after only a few minutes so you should see at least something if the pi has been up for any period of time. I think there is something else going on that’s causing the problem.

It’s working now, even with little data and running in /tmp.
Cause was PEBKAC: one missing line in manually created polar.conf: the mlat=yes entry.

1 Like

Just for fun, i wanted to add some airports on these plots. Obviously a work in progress, mainly because I can’t code! :grin:

So added these and it came out okay. Definitely shows i need to move my antenna outside.

#ADD LABELS FOR AIRPORTS
set label 13 “KAKR” at -1.2, 5 center font “,16” front nopoint tc lt 3
set label 14 “KCAK” at -0.1, -2.3 center font “,16” front nopoint tc lt 3
set label 15 “KCLE” at -19, 27 center font “,16” front nopoint tc lt 3
set label 16 “KSU” at 1.1, 11.8 center font “,16” front nopoint tc lt 3
set label 17 “AERO” at -16.7, -0.8 center font “,16” front nopoint tc lt 3
set label 18 “KPIT” at 54.3, -27.5 center font “,16” front nopoint tc lt 3
set label 19 “KBJJ” at -20.3, -4.8 center font “,16” front nopoint tc lt 3
set label 20 “KBKL” at -10.9, 33.9 center font “,16” front nopoint tc lt 3
set label 21 “KAGC” at 68.9, -36 center font “,16” front nopoint tc lt 3
set label 22 “KMGW” at 69.7, -78.8 center font “,16” front nopoint tc lt 3
set label 23 “KYNG” at 34.7, 18.2 center font “,16” front nopoint tc lt 3

Need to work on font/color/size…

3 Likes

I have also been fiddling with something similar. If it works right it should be able to populate airport data automatically, but it’s not ready yet.

I can’t really code either, but it’s remarkable what you can get done by trial and error and pinching examples from other people.

Also gnuplot has to be one of the most frustrating pieces of software I’ve ever used to make do what you want.

1 Like

If or when you do, can you put the ability to add places that may not show up as an “airport”? Not sure how extensive that data file may be. For example, the local Children’s Hospital has a helipad and I’m able to track those flights. And Goodyear has a blimp airfield close by as well. They may be in your database but if not…

Just thinking out loud. And as always, thank you for doing this and making it public. It’s got me interested in the coding even if I suck at it! :rofl:

There is a public domain airport database with about 55k airports and airfields in it that conveniently supplies a csv file. It does include some hospital helipads, though I don’t know what is required to be included - whether they are actual helicopter bases or just landing facilities. The Goodyear blimp base seems to be in it.

1 Like

That’s slick. Goodyear is in it. Hospital(s) helipads are in the map as well (did not look at the map the first time, only a list). Does have a lot of the smaller fields too. Thanks!

Can you tell me what is up with this plot? I’ve triple checked the settings against HWT.

Someone else had that happen and I’m not sure what causes it since I haven’t been able to reproduce it as yet. If you send me the heywhatsthat id I can try to replicate it and work out why it’s doing that.