kng / satnogs_gr-satellites

First try on combining gr-satellites with the satnogs-client and satnogs-flowgraphs
GNU General Public License v3.0
11 stars 3 forks source link

grsat-wrapper sanity check #15

Open janvgils opened 9 months ago

janvgils commented 9 months ago

With the T-9 launch I was testing new yml files and during the creation I made an error that caused me the have a problem for over 2 days. At the end the problem was with gr_satellites --list_satellites one of the new yml files had a syntax error.

  if [ ! -s "$SATLIST" ] || [ ! -f "$GRSVER" ] || [ "$($GRSTS)" != "$(<"$GRSVER")" ]; then
    echo "$PRG Generating satellite list"
    $GRSBIN --list_satellites | sed  -n -Ee  's/.*NORAD[^0-9]([0-9]+).*/\1/p' > "$SATLIST"
    $GRSTS > "$GRSVER"
  fi

This syntax error didn't produce an error when running grsat-wrapper nor something in the log file and therefor didn't point me in the right direction.

Below the wrong yml file:

name: KAFASAT
norad: 99028
data:
  &tlm0 AX25 telemetry:
    telemetry: ax25
transmitters:
  1k2 G3RUH FSK downlink:
    frequency: 435.835e6
    modulation: FSK
    baudrate: 1200
    framing: AX.25 G3RUH
    data:
    - *tlm0

The correct yml file:

name: KAFASAT
norad: 99028
data:
  &tlm0 AX25 telemetry:
    telemetry: ax25
transmitters:
  1k2 G3RUH FSK downlink:
    frequency: 435.835e+6
    modulation: FSK
    baudrate: 1200
    framing: AX.25 G3RUH
    data:
    - *tlm0

What would be the best way to do some kind of sanity check ?

Maybe something like gr_satellites --list_satellites || exit 1 after doing some test I noticed $? is 1 when the command fails.

kng commented 9 months ago

I think the entire cache list should be abandoned, so simply launch it every time, as it will quit gracefully with not supported satellites. I have been using it this way in two other projects with success.

kng commented 8 months ago

The check has been removed in commit 8982bf3 and should no longer be a problem. gr_satellites exits gracefully when running on not supported satellites. Feel free to close this issue if this is succifient.