Files
astronomy/generate/dtplot
Don Cross f2ee3d38b8 Moved JPL Horizons file for DeltaT so it doesn't break unit tests.
I downloaded the airless_Moon_dt.txt file from JPL Horizons so that
I could reverse engineer their DeltaT function. But keeping it in
the horizons directory caused unit test breakage. Moved to delta_t
directory so dtplot can still use it to make graphs.
2020-05-15 14:16:11 -04:00

25 lines
719 B
Bash
Executable File

#!/bin/bash
#
# Don Cross - 2020-05-15
# Plot the Delta-T extrapolator versus the generated Delta-T function.
#
Fail()
{
echo "FAIL($0): $1"
exit 1
}
OUT_EXTRAP=delta_t/dt_extrapolate.csv
OUT_ACTUAL=delta_t/dt_actual.csv
JPL_DATA=delta_t/airless_Moon_dt.txt
rm -f "${OUT_EXTRAP}" "${OUT_ACTUAL}"
./build || Fail "Cannot build generate program."
./generate source || Fail "Cannot generate source code."
./ctbuild || Fail "Cannot build ctest program."
./generate dtplot "${OUT_EXTRAP}" || Fail "Error writing extrapolated data."
./ctest dtplot "${OUT_ACTUAL}" || Fail "Error writing actual data."
./plot_delta_t.py "${OUT_EXTRAP}" "${OUT_ACTUAL}" "${JPL_DATA}" || Fail "Error displaying data."
exit 0