diff options
author | rodri <rgl@antares-labs.eu> | 2024-05-12 20:34:03 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-05-12 20:34:03 +0000 |
commit | aeb153cdd6cb37dc1e9d61b22a92430a756ddeb5 (patch) | |
tree | 679f3970653138702f9206a8beb256d814de1cb5 /tools/horizon.api.get | |
parent | 55ceca8db396829cba474164545c6bcfcc45eea4 (diff) | |
download | 3dee-aeb153cdd6cb37dc1e9d61b22a92430a756ddeb5.tar.gz 3dee-aeb153cdd6cb37dc1e9d61b22a92430a756ddeb5.tar.bz2 3dee-aeb153cdd6cb37dc1e9d61b22a92430a756ddeb5.zip |
began work on a solar system planetarium.
Diffstat (limited to 'tools/horizon.api.get')
-rwxr-xr-x | tools/horizon.api.get | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/horizon.api.get b/tools/horizon.api.get new file mode 100755 index 0000000..22a909e --- /dev/null +++ b/tools/horizon.api.get @@ -0,0 +1,29 @@ +#!/bin/rc +# +# NASA JPL Horizons API +# https://ssd.jpl.nasa.gov/horizons/ +# +rfork ne +center=() +target=() +t0=() +t1=() +step=() +flagfmt='' +args='center target t0 t1 step' + +fn usage { + aux/usage + exit usage +} + +if(! ifs=() eval `{aux/getflags $*} || ! ~ $#* 5) + usage + +center=$1 +target=$2 +t0=$3 +t1=$4 +step=$5 + +hget 'https://ssd.jpl.nasa.gov/api/horizons.api?format=text&COMMAND='''$target'''&OBJ_DATA=''YES''&MAKE_EPHEM=''YES''&EPHEM_TYPE=''VECTORS''&CENTER='''$center'''&START_TIME='''$t0'''&STOP_TIME='''$t1'''&STEP_SIZE='''$step'''&VEC_TABLE=''1''' |