FlightAware Discussions

Gain Adjustment


#283

I’m having trouble obtaining & deploying the optimize-gain-piaware3.py script.I am running PiAware 3.6.3 on an SD card, with a FA Pro stick.

When I type in

wget https://raw.githubusercontent.com/wittrup/piawarebash/master/pyh/optimize-gain-piaware3.py

I get “Cannot write to ‘optimize-gain-piaware3.py’ (Permission denied).”

I’m a real newb when it comes to all this - can someone help point me in the right direction so I can try to determining the optimum gain for my setup?


#284

you are in a folder where you don’t have write permission.

use

cd

to get back to the home directory you should have write permissions there.
then run the wget command again and follow the instructions.

i don’t particularly like the gain script.
i would use the tabular display of your local map
Screenshot%20from%202018-11-09%2022-38-21

Sort the planes by RSSI by clicking on the column head (twice or until it’s sorted with values closer to 0 at the top)
The closer to 0 a value is the stronger the signal.

Make sure not too many have a value > -3

If you have no planes > -6 or so just go ahead and increase the gain.

Now if you have sometimes low traffic coming close by (general aviation for example)
their signal might become too strong.

So if on the map you use the button “show all track” and some low level tracks are interrupted near the receiver that’s a good hint that your gain was too high to receive them.
(assuming they didn’t duck behind a hill or something)


#285

@mblacklin

looking at your stats and assuming you have been running with gain -10 until now.

pretty sure -10 is the best setting for you already.

Which antenna are you using and is it indoors?


#286

I’m using the 26” FA antenna, mounted outside, about 12’ off the ground.


#287

you are close to an airport. that’s always complicated.
also it could be that weaker signals from further away are being drowned in cell phone noise.

anyways what’s your current gain and why don’t you make a screenshot of the table i mentioned?

what also is a consideration are there hills around you that are higher than your position?
or buildings?
i mean in all directions most people will have hills in some directions :wink:


#289

Here’s a snippet of what I’ve got. Values run all the way to -30. Gain is currently set to 20. I had it at 40, without much change.


#290

you need do restart dump1090-fa or the gain doesn’t actually change

systemctl restart dump1090-fa

#291

Yes, I restart dump1090-fa each time.


#292

changing between 20 and 40 you should see a change.
try 1 then.

how are you changing gain?

you need to use

sudo piaware-config rtlsdr-gain 10

you need a sudo for the dump1090-fa restart as well (or it will show you an error)

this command will show you the current gain dump1090-fa was started with:

journalctl -u dump1090-fa -e --no-pager

#293

That works only for the case that he has flashed the SD card image from FA.
If he installed Piaware and dump1090-fa as add-on (via commands), then the gain needs to be changed directly:

sudo nano /etc/default/dump1090-fa

Followed by
sudo systemctl restart dump1090-fa

And the check:
sudo systemctl status dump1090-fa -l