forked from jacobwilliams/Fortran-Astrodynamics-Toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathget_third_party.sh
More file actions
executable file
·34 lines (27 loc) · 879 Bytes
/
get_third_party.sh
File metadata and controls
executable file
·34 lines (27 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# Get some third-party files
### Ephemeris files from JPL:
mkdir tmp
cd tmp
wget ftp://ssd.jpl.nasa.gov/pub/eph/planets/fortran/*
wget ftp://ssd.jpl.nasa.gov/pub/eph/planets/ascii/de405/*
wget ftp://ssd.jpl.nasa.gov/pub/eph/planets/ascii/de421/*
# edit asc2eph.f file to set NRECL = 4:
# seems that -i only works on mac?
if [[ $OSTYPE == 'darwin'* ]]
then
sed -i '_original' '/^C.*PARAMETER ( NRECL = 4 )/s/^C//' asc2eph.f
else
sed --in-place='_original' '/^C.*PARAMETER ( NRECL = 4 )/s/^C//' asc2eph.f
fi
gfortran asc2eph.f -o asc2eph
mkdir ../eph
cat header.405 ascp*.405 | ./asc2eph
mv JPLEPH ../eph/JPLEPH.405
cat header.421 ascp*.421 | ./asc2eph
mv JPLEPH ../eph/JPLEPH.421
### Geopotential file for Earth:
wget http://download.csr.utexas.edu/pub/grace/GGM03/GGM03_Archive.zip
unzip GGM03_Archive.zip
mkdir ../grav
cp GGM03_Archive/GGM03C.GEO ../grav