mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-06-09 10:31:43 +02:00
Move util scripts
This commit is contained in:
parent
2f94c15455
commit
0834c06e31
9 changed files with 6 additions and 2 deletions
30
utils/import-tle.sh
Executable file
30
utils/import-tle.sh
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -u
|
||||
set -e
|
||||
|
||||
search=$1
|
||||
|
||||
# Get the ids of sats matching the search term
|
||||
if [ ! -f ids.txt ]
|
||||
then
|
||||
curl https://celestrak.com/pub/satcat.txt | grep "$search" | cut -b14-18 > ids.txt
|
||||
fi
|
||||
|
||||
# Download TLE data for each sat
|
||||
while read id
|
||||
do
|
||||
if [ ! -f $id.txt ]
|
||||
then
|
||||
wget "https://celestrak.com/satcat/tle.php?CATNR=$id" -O $id.txt
|
||||
fi
|
||||
# 6000 s ~ 95 min ~ 1 orbital period
|
||||
done < ids.txt
|
||||
|
||||
while read id
|
||||
do
|
||||
if [ ! -f $id.waypoints ]
|
||||
then
|
||||
./tle2wps.py $id.txt 2020 08 28 6000 > $id.waypoints
|
||||
fi
|
||||
done < ids.txt
|
Loading…
Add table
Add a link
Reference in a new issue