Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 35

Thread: Gain Optimization Script

  1. #11
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,875
    Quote Originally Posted by Steveadi View Post
    ......now to find out how to change my gain, a big learning process.
    Please see this post:

    https://forum.flightradar24.com/thre...l=1#post115563

    .

  2. #12
    Passenger
    Join Date
    Jan 2019
    Posts
    3
    Thank you I am running a few tests morning noon and night for a couple of days so far 22.9 is winning

  3. #13
    Captain
    Join Date
    Apr 2018
    Posts
    878
    Someone is running an amplifier

    Good luck!

  4. #14
    Passenger
    Join Date
    Jan 2015
    Posts
    36

    Gain changing overnight with python script and cron

    I have no experience with python but there are many out there who do so I would appreciate any help that I can get with this.
    I've seen the gain setting test script and I think part of it would help me with this project.
    These parts look relevant (From ABCD567)
    I want something like this:- (this is just a draft and guess work on my part)

    Set gains overnight testing
    (1) Create a 2 new files optimize-gain-mut-day.py and optimize-gain-mut-night.py
    sudo nano optimize-gain-mut-day.py
    sudo nano optimize-gain-mut-night.py

    (2) Add code to files then Ctrl+o) and close file (Ctrl+x)

    (3) Make files executable
    sudo chmod +x optimize-gain-mut-day.py
    sudo chmod +x optimize-gain-mut-night.py

    Day Code

    #!/usr/bin/python2
    import time, socket, subprocess, fileinput, os

    for line in fileinput.input('/etc/default/dump1090-mutability', inplace=1):
    if line.startswith('GAIN'):
    print 'GAIN=38.6'
    else:
    print line,
    os.system("sudo /etc/init.d/dump1090-mutability restart")

    Night code

    #!/usr/bin/python2
    import time, socket, subprocess, fileinput, os

    for line in fileinput.input('/etc/default/dump1090-mutability', inplace=1):
    if line.startswith('GAIN'):
    print 'GAIN=48'
    else:
    print line,
    os.system("sudo /etc/init.d/dump1090-mutability restart")


    Then use cron to run them at 23:30 and 06:30 each day

    I know this isn't a working script yet but I post it to give the idea of what I want to achieve.

    T-EGSY1
    Last edited by Scroggie; 2019-03-09 at 12:28. Reason: Typo

  5. #15
    Captain
    Join Date
    Apr 2018
    Posts
    878
    Running such a script each day or twice a day is not a good idea.

    Especially because you want to optimize your gain for a situation with a lot of traffic not very little traffic.
    The result of the script becomes even more random with little traffic around.

    Just run it once when there is a lot of traffic around.
    Then set that gain and maybe fine tune it by hand if for example you lose close in planes because the signal is too strong but you want to receive those planes.

    Otherwise leave it.

    Running such a script at night just risks setting a random gain that is anything but optimal.

    Also i would recommend installing graphs that show you the message rate and percentage of strong signals:
    https://github.com/wiedehopf/graphs1090#graphs1090


    I'm not sure if those will work on the pi24 image though, those images sometimes have weird write protection.
    But in my opinion those graphs are more useful for adjusting gain than that script.
    Last edited by wiedehopf; 2019-03-09 at 12:33.

  6. #16
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,875
    Quote Originally Posted by wiedehopf View Post

    Also i would recommend installing graphs that show you the message rate and percentage of strong signals:
    https://github.com/wiedehopf/graphs1090#graphs1090


    I'm not sure if those will work on the pi24 image though, those images sometimes have weird write protection.
    But in my opinion those graphs are more useful for adjusting gain than that script.
    I strongly recommentd to install @wiedehopf's graphs. These are a great tool for system tune-up and monitoring.

    I have installed these graphs on
    - Raspbian image (dump1090-mutability ver 1.15~dev)
    - Piaware image (dump1090-fa)
    - PI24 image (dump1090-mutability ver 1.14)

    These work perfectly well on all three installs.
    However on Pi 24 image, the Signal Level graph is missing (cause: dump1090-mutability ver 1.14).


    Screenshots of @wiedehopf's graphs on PI24

    wiedehopf graphs on PI24.png . wiedehopf graphs on PI24-2.png
    Last edited by abcd567; 2019-03-09 at 13:55.

  7. #17
    Passenger
    Join Date
    Jan 2015
    Posts
    36
    Quote Originally Posted by wiedehopf View Post
    Running such a script each day or twice a day is not a good idea.

    Especially because you want to optimize your gain for a situation with a lot of traffic not very little traffic.
    The result of the script becomes even more random with little traffic around.

    Just run it once when there is a lot of traffic around.
    Then set that gain and maybe fine tune it by hand if for example you lose close in planes because the signal is too strong but you want to receive those planes.

    Otherwise leave it.

    Running such a script at night just risks setting a random gain that is anything but optimal.

    Also i would recommend installing graphs that show you the message rate and percentage of strong signals:
    https://github.com/wiedehopf/graphs1090#graphs1090


    I'm not sure if those will work on the pi24 image though, those images sometimes have weird write protection.
    But in my opinion those graphs are more useful for adjusting gain than that script.
    I'm not doing this to find the optimum gain, I have already done that. First by running the optimising script and latterly by setting a new gain every 24 hours and gathering hits and positions stats. So I do know what my best gain setting is. The reason for this particular project is the see what happens overnight when the noise floor has dropped by 10 dB so I can turn up the gain by that much to see the effect.
    I do have the graphs too - that's how I have seen the overnight noise level drop.
    I could do the change manually every day from the embedded gain setting in maps but automating it would be a lot less hassle.

  8. #18
    Captain
    Join Date
    Apr 2018
    Posts
    878
    That noise level is more of an approximation and doesn't necessarily mean you can receive weaker signals.

    I suppose that at night you could have no aircraft with very strong signals, so it might make a little sense.
    (For example if the Airport you live close to has no departures/arrivals)

    Apart from that i would turn up the gain until you actually start losing close in aircraft and then back off a little bit.

    Good luck with your script though, seems like a reasonable approach!

  9. #19
    Passenger
    Join Date
    Jan 2015
    Posts
    36
    I suppose I might just as well switch the gains manually for a few days to see if it's worth the effort.
    I've just about reached the best configuration possible for my location anyway with often 1.7 million hits a day with 2,500 - 2,700 aircraft - up 349 nm max and 210 nm average.
    This is a typical day showing why I thought such a test overnight might show a little improvement - very little most likely!

    ADS-B.jpg

  10. #20
    Captain
    Join Date
    Apr 2018
    Posts
    878
    That gain looks quite low anyway, turn it up by 5.

    Or do you really already lose close in aircraft when you do that?

    Note that if you have the adsb-receiver version of the graphs, the "Messages >-3dB" graph is using incorrect values.

    But as i said i would just turn up the gain until losing close in aircraft when you look at the local map then turn it back down a bit.
    Last edited by wiedehopf; 2019-03-09 at 16:37.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •