Page 4 of 4 FirstFirst ... 234
Results 31 to 35 of 35

Thread: Gain Optimization Script

  1. #31
    Captain
    Join Date
    Apr 2018
    Posts
    868
    sudo crontab -e will edit roots crontab. In there you don't need sudo but it doesn't hurt either. Just checking.

    A little confused how -36.4 could end up in there.

    But if you want the changed gain to be displayed correctly maybe just use another method to change the gain (that only works because you already have that map changing gain):

    Code:
    echo "36.4" > /usr/local/sbin/gain/newgain
    With the script you already installed that should work just fine, also the map should correctly show the new gain.
    (Otherwise the map doesn't even know which gain is the gain now, still have no idea why it would display -36.4)

  2. #32
    Passenger
    Join Date
    Jan 2015
    Posts
    36
    Quote Originally Posted by Oblivian View Post
    Gains should be entered in +, dump1090 default amounts passed are positive. -10 is the only one that should appear -. So you are probably triggering that somewhere with an invalid value?

    Which makes too many chars to display on the line with "s

    Sent from my EML-L09 using Tapatalk
    I am using valid positive values and the config file shows that it is updating as expected. I think I need to also update a map setting but not sure how, possible something like:-

    sudo sed -n 's/\GAIN=//p' /etc/default/dump1090-mutability > /usr/local/sbin/gain/currentgain

    but when I run that I get "Permission denied"

  3. #33
    Captain
    Join Date
    Apr 2018
    Posts
    868
    Also note that using

    echo "36.4" > /usr/local/sbin/gain/newgain

    in the crontab to change gain, you don't even need a separate line for restarting dump1090 because the setgain script already takes care of that.

    After thinking about it.... the only valid reason for the gain to be -36.4 is if you somehow got an minus into the crontab, probably after the = sign. (which is an easy typo as those two keys are close to each other.)
    Last edited by wiedehopf; 2019-03-09 at 22:47.

  4. #34
    Captain
    Join Date
    Apr 2018
    Posts
    868
    Code:
    0 0 * * * echo "36.4" > /usr/local/sbin/gain/newgain
    0 6 * * * echo "33" > /usr/local/sbin/gain/newgain
    Use this as your crontab and it should just work in my opinion

  5. #35
    Passenger
    Join Date
    Jan 2015
    Posts
    36
    echo "36.4" > /usr/local/sbin/gain/newgain works perfectly!

    Thanks

Posting Permissions

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