From 4b3e779f56b5fb75f548d28982b22403ac9135c3 Mon Sep 17 00:00:00 2001 From: claresinger Date: Fri, 3 Jun 2022 14:28:19 -0700 Subject: [PATCH] remove lon_perihelion parameter and update epoch to be given as a string that can be parsed as DateTime. --- docs/src/API.md | 1 - src/Planet/Planet.jl | 8 +------- src/Planet/planet_parameters.jl | 3 +-- src/parameters.toml | 12 +++--------- 4 files changed, 5 insertions(+), 19 deletions(-) diff --git a/docs/src/API.md b/docs/src/API.md index 6a964b29..790e895a 100644 --- a/docs/src/API.md +++ b/docs/src/API.md @@ -102,7 +102,6 @@ Planet.mean_anom_epoch Planet.obliq_epoch Planet.lon_perihelion_epoch Planet.eccentricity_epoch -Planet.lon_perihelion Planet.MSLP Planet.T_surf_ref Planet.T_min_ref diff --git a/src/Planet/Planet.jl b/src/Planet/Planet.jl index 0e193161..f6f8ccc4 100644 --- a/src/Planet/Planet.jl +++ b/src/Planet/Planet.jl @@ -52,7 +52,6 @@ export molmass_dryair, obliq_epoch, lon_perihelion_epoch, eccentricity_epoch, - lon_perihelion, MSLP, T_surf_ref, T_min_ref @@ -157,7 +156,7 @@ function year_anom end function orbit_semimaj end """ Total solar irradiance (W/m``^2``) """ function tot_solar_irrad end -""" Time of epoch (J2000) (s) """ +""" Time of epoch """ function epoch end """ Mean anomaly at the epoch (radians) """ function mean_anom_epoch end @@ -169,11 +168,6 @@ subtended at the Sun by the orbital arc from vernal equinox to perihelion). """ function lon_perihelion_epoch end """ Orbital eccentricity at the epoch """ function eccentricity_epoch end -""" Longitude of perihelion (radians), measured relative to vernal equinox. -The calculation of the mean anomaly is formulated such that the vernal equinox -is fixed in the calendar. However, this requires tracking both the current longitude of perihelion -as well as the reference longitude of perihelion at the reference time (epoch). """ -function lon_perihelion end """ Mean sea level pressure (Pa) """ function MSLP end """ Mean surface temperature (K) in reference state """ diff --git a/src/Planet/planet_parameters.jl b/src/Planet/planet_parameters.jl index 9cd0afc7..b09fe908 100644 --- a/src/Planet/planet_parameters.jl +++ b/src/Planet/planet_parameters.jl @@ -55,12 +55,11 @@ Planet.grav(ps::AbstractEarthParameterSet) = 9.81 Planet.year_anom(ps::AbstractEarthParameterSet) = 365.26 * Planet.day(ps) Planet.orbit_semimaj(ps::AbstractEarthParameterSet) = 1 * astro_unit() Planet.tot_solar_irrad(ps::AbstractEarthParameterSet) = 1362.0 -Planet.epoch(ps::AbstractEarthParameterSet) = 2451545.0 * Planet.day(ps) +Planet.epoch(ps::AbstractEarthParameterSet) = "2000-01-01T11:58:56.816" Planet.mean_anom_epoch(ps::AbstractEarthParameterSet) = deg2rad(357.52911) Planet.obliq_epoch(ps::AbstractEarthParameterSet) = deg2rad(23.432777778) Planet.lon_perihelion_epoch(ps::AbstractEarthParameterSet) = deg2rad(282.937348) Planet.eccentricity_epoch(ps::AbstractEarthParameterSet) = 0.016708634 -Planet.lon_perihelion(ps::AbstractEarthParameterSet) = deg2rad(282.937348) Planet.MSLP(ps::AbstractEarthParameterSet) = 1.01325e5 Planet.T_surf_ref(ps::AbstractEarthParameterSet) = 290.0 Planet.T_min_ref(ps::AbstractEarthParameterSet) = 220.0 diff --git a/src/parameters.toml b/src/parameters.toml index e8a31f42..8763b157 100644 --- a/src/parameters.toml +++ b/src/parameters.toml @@ -511,9 +511,9 @@ type = "float" [epoch_time] alias = "epoch" -value = 211813488000 -type = "float" -description = "derived: 2451545.0 * [day]" +value = "2000-01-01T11:58:56.816" +type = "String" +description = "J2000 epoch (Jan 1, 2000 11:58:56.816 UTC) as string" [mean_anomalistic_at_epoch] alias = "mean_anom_epoch" @@ -538,12 +538,6 @@ alias = "eccentricity_epoch" value = 0.016708634 type = "float" -[longitude_perihelion] -alias = "lon_perihelion" -value = 4.938188299449 -type = "float" -description = "(282.937348 degrees) in radians" - [mean_sea_level_pressure] alias = "MSLP" value = 101325