SPB Git

Repository Public

fetch_horizons_fixture.sh 3.1 KB 60 lines shellscript

1#!/bin/sh2# =============================================================================3#                  SP BOUCHER | INFRASTRUCTURE & AUTOMATION4#             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5# =============================================================================6#7# Project          : ORIX Cosmos8# File             : DataPipeline/time/fetch_horizons_fixture.sh9# Module           : DataPipeline10# Repository       : https://git.spboucher.ai/orix-cosmos11# Project Website  : https://www.orixlab.dev12# Created          : 2026-11-2413# Last Modified    : 2026-11-2414#15# Author           : Simon-Pierre Boucher16# Position         : Professor of Finance17# Institution      : Université du Québec en Outaouais (UQO)18# Organization     : SP Boucher19# Website          : https://spboucher.ai20# Git              : https://git.spboucher.ai21#22# Preferred Contact: support@spboucher.ai23# Technical Contact: dev@spboucher.ai24# Security/Admin   : admin@spboucher.ai25#26# Copyright (c) 202627# Simon-Pierre Boucher28# All rights reserved where applicable. This file is governed by the29# applicable project license, copyright notices and relevant law.30# Existing third-party rights and notices remain unaffected.31#32# License          : None specified (no license file in this repository)33#34# Do not embed credentials, private keys, access tokens,35# certificates or confidential personal information.36#37# =============================================================================38# END OF SP BOUCHER SOURCE HEADER39# =============================================================================4041# ORIX Cosmos42# File: DataPipeline/time/fetch_horizons_fixture.sh43# Description: Re-creates the JPL Horizons test fixture used by CosmosCoordinates (topocentric Mars: apparent RA/Dec, azimuth/elevation, local apparent sidereal time, TDB-UT). Test reference only, never production data.44#45# Author: Simon-Pierre Boucher46# Contact: contact@spboucher.ai47#48# Usage: DataPipeline/time/fetch_horizons_fixture.sh > Packages/CosmosCoordinates/Tests/Fixtures/horizons_mars_topo_2024.txt49# No API key and no personal information are sent. Horizons may revise its Earth-orientation file, so values can50# change in the last digits between retrievals; the committed fixture is the reference for the tests.51set -eu52curl --fail --silent --show-error --max-time 60 -G 'https://ssd.jpl.nasa.gov/api/horizons.api' \53  --data-urlencode "format=text" --data-urlencode "COMMAND='499'" --data-urlencode "OBJ_DATA='NO'" \54  --data-urlencode "MAKE_EPHEM='YES'" --data-urlencode "EPHEM_TYPE='OBSERVER'" --data-urlencode "CENTER='coord@399'" \55  --data-urlencode "COORD_TYPE='GEODETIC'" --data-urlencode "SITE_COORD='-70.7345,-30.2407,2.7'" \56  --data-urlencode "TLIST='2024-03-10 05:00:00','2024-06-15 09:30:00','2024-06-15 21:17:43','2024-09-22 02:00:00','2024-12-20 08:45:10'" \57  --data-urlencode "TLIST_TYPE='CAL'" --data-urlencode "TIME_TYPE='UT'" --data-urlencode "QUANTITIES='1,2,4,7,30'" \58  --data-urlencode "ANG_FORMAT='DEG'" --data-urlencode "EXTRA_PREC='YES'" --data-urlencode "APPARENT='AIRLESS'" \59  --data-urlencode "CSV_FORMAT='YES'" --data-urlencode "TIME_DIGITS='FRACSEC'"60
Files main
Menu

Theme