Skip to content

Instantly share code, notes, and snippets.

@gyaresu
Forked from c5e3/extract_positions.sh
Created November 23, 2016 01:04
Show Gist options
  • Save gyaresu/dd3d6ef7e2cfbe57896dc5aae3f0cc8b to your computer and use it in GitHub Desktop.
Save gyaresu/dd3d6ef7e2cfbe57896dc5aae3f0cc8b to your computer and use it in GitHub Desktop.
#!/bin/bash
cat $1 | grep IRA >> $1_positions.csv
sed -i -e 's/^.\+sat:/sat:/' -e 's/\( RAI\:.\+\)\|\(sat:\)\|\(beam:\)\|\(pos=(\)\|\()\)\|\(alt=\)\|\(+\)//g' -e 's%/%;%' -e 's/ /;/g' -e '/^00;00/d' -e '1 i\satellite;beam;latitude;longitude;altitude' $1_positions.csv
awk -F ';' '($5<=100){print}' $1_positions.csv >> $1_positions_spotbeams.csv
awk -F ';' '($5>100){print}' $1_positions.csv >> $1_positions_satellites.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment