Daily Log/E-Mail Aircraft Report directly on your RaspberryPi

Yes, I should have made it clear that the 2dB signal level is to maximize close by planes. IE usually to pick up the most ground positions near an airport.

Due to the ADSB messages are amplitude modulated the decoder software can does work on messages close to the max signal level but not so much near the smallest signal level. Max signal are clipped a still decodable. While small messages get lost in the noise level.

The sweet spot for receiver is the -2dB to -35dB range, there is still a chance to decode messages outside this range. If you move the sweet spot closer (the inner part of the donut) you also lose a lot of the far away signals (outer part of the donut).

In my experience at max gain the inner range is around 3-4km and the outer range is 350-400km.
If you lower the gain to around 20 the inner range is less than 1km and the outer range drops to about 200km or less. So you are giving up a large amount of your far range to be able to see those 1km or less planes. You are giving up 150km far to get 3 km closer detection. There aren’t many cases you want to do this unless you are near an airport and looking for planes on the ground.

Most of the discussions on the forums about gain settings are to maximize messages decoded per second. This includes the automated scripts for best gain.

1 Like

The original question I was trying to answer was why someone is missing planes on the ground. You need the gain low + you need the receiver location to be set.

I forgot to mention one more thing. Old receivers (8+ years ago) had a huge donut effect. The minimum detection range was around 15km and their max range was around 200km. And they cost in about $600.

Today the receivers don’t have a noticeable donut effect (3km to 400km decodable range) and they cost $20.

I would just set the gain as high as possible and not worry to much about missing the very few close by messages unless you really need them.

Here is a lot of discussion about gain and number of messages detected.

2 Likes

David,
Does this wheel sensor exist in fixed undercarriage aircraft like cessna 172/182 and cirrus designs?

Was that the lat, lon in the receiver.json file?

I am having the same problem, howewer lat,lon are already set in this file.

Regards, Andrew

That was in the ac_counter.php file. insert your coordinates in place of the ones already in the code. You will have to convert DEG MIN SEC to a decimal figure. Because I am in Australia I have to use a (minus symbol) i.e., -38.303028 deg latitude.

you just have to set your lat and lon in dump1090 properly - then ac_counter.php fetches the data from the aircraft.json file. warrnamboolcity is right when he mentions that there are locations with negative values - maybe yours too. but he probably mixed up with the other script (radar.php) where to insert coordinates - in ac_counter.php there is no need to set coordinates …

Sorry, but I think I am missing something here, your script looks in receiver.json for the lat, lon. Looking at that file there is the correct lat & lon for my location in Tasmania, Australia, yes a negative lat.

I am getting 7000nm distances in my daily email

aircraft.json path is…

// set path to aircraft.json file
$user_set_array[‘url_json’] = ‘http://127.0.0.1/dump1090-fa/data/

receiver.json has my lat & lon values but I need to replace the “0” values in your script below to get the correct nm distances in the daily report.

// fetch receiver.json and read receiver latitude and longitude
$json_receiver_location = json_decode(file_get_contents($user_set_array[‘url_json’] . ‘receiver.json’), true);
isset($json_receiver_location[‘lat’]) ? $rec_lat = $json_receiver_location[‘lat’] : $rec_lat = 0;
isset($json_receiver_location[‘lon’]) ? $rec_lon = $json_receiver_location[‘lon’] : $rec_lon = 0;

Does that make sense?

Regards, Andrew Smith

nope - does not really make sense …

try the following → add the below line of code after line 198 ($i++;)

print(PHP_EOL . 'LAT: ' . $rec_lat . ' LON: ' . $rec_lon . PHP_EOL);

and see what the scipt prints out when running via terminal

cheers
tom

Hi Tom,

Thanks for your quick reply, see below.

pi@raspberrypi:~ $ php /home/pi/ac_counter.php
upt(us): 0000934 - 1.000000 loops/s avg - since 0 days 00:00:00 - run 0 => 0056 aircraft(s) @ 125838 msg today

LAT: -41.1 LON: 146.82

Lat & lon are the correct values for my location.

Before I ran this I changed the following 2 lines back to their original value of 0

isset($json_receiver_location[‘lat’]) ? $rec_lat = $json_receiver_location[‘lat’] : $rec_lat = 0;
isset($json_receiver_location[‘lon’]) ? $rec_lon = $json_receiver_location[‘lon’] : $rec_lon = 0;

Then set script to test (3 emails at 1 minute intervals), rebooted, first email showing distance of 7715nm!

Regards, Andrew

No. The wheel sensor method is virtually non-existent in small GA. There are two methods allowed for automatic change from ALT to GND. One is a wheel weight sensor. It’s often used on transport category aircraft. The other methods is air speed. Once you drop below a set speed, it automatically changes to GND. That speed is based on the specific aircraft that system is in.

George Town! Tassie is a nice place. Do you do Raaus instruction?

It might pay to goto to file path where the original ac_counter.php is and confirm it is there. Then delete the one you made executable in the /Pi directory. CP (copy) the original ac_counter. php back into the /Pi directory, add the relevant numbers then make it executable with chmod… I reckon I had the same problem from memory and this is what I did. I reckon once you make a file executable it is like a bride wearing white the second time around. You can’t change it back to something it once was.

I am presuming here you made the file executable then made last Lon changes??

I’ve noticed that from 13th October 2018 I’ve lost all first altitude and last altitude information from my daily log .xls spreadsheet. I’ve made no changes to my Raspberry Pi in over six months. PiAware Skyview is still working correctly. On my FR24 Feeder Tracked Aircraft List it still shows aircraft altitude is being picked up for FlightRadar 24 and within the “Flights with Positions From This Feeder on FlightAware.com Within the Last Hour” section on my FlightAware stats page Altitude is still being shown.

Try adding these three lines to radar.php as described here:
(Dump1090 MySQL Database Script with Alert and Filter - #56 by wiedehopf)

It adds support for the 3.6 version of dump1090 which may have been automatically installed if you have that enabled.

Thanks for information, I tried it early yesterday morning and the first altitude and last altitude columns are still blank. The other columns are working as expected.

I added:

isset($row[‘gs’]) ? $ac_speed = $row[‘gs’] : false;
isset($row[‘baro_rate’]) ? $ac_vert_rate = $row[‘baro_rate’] : false;
isset($row[‘alt_baro’]) ? $ac_altitude = $row[‘alt_baro’] : false;

Oh i just now see the script is different.
Where did you add them?

For this script the appropriate place is below this line:

		isset($row['mlat']) ? $ac_mlat = implode(' ', $row['mlat']) : $ac_mlat = '';

If you added it somewhere elese it won’t work.

Thank you for the help, I added it under the “tisb” isset initially but I’ve just changed it, so I will have to wait until midnight to make sure it works correctly now.

yeah you will need to restart the service or if you don’t know how to do that just reboot the pi.

sudo reboot

otherwise the old version of the script will keep running.
which script are you using anyway? radar.php or ac_counter.php?

1 Like

Hello, I put it in radar.php i’ll need to wait until tomorrow morning to add it to ac_counter.php

Thank you, I did the change yesterday and the altitude information is back. :grinning:

Hi Tom,
Cool stuff, both radar and counter working like a charm!

2 Likes