From b64ef149605bf1e1b3e5a7fb43ba29303aeff0b0 Mon Sep 17 00:00:00 2001 From: NoNameForMee Date: Sat, 17 Dec 2022 22:18:18 +0100 Subject: [PATCH 1/2] Correct one AU to 149597870700 m exactly 1 AU per the IAU 2012 Resolution B2 and the BIPM published "The International System of Units (SI), 9th ed." Table 8 of "Non-SI units accepted for use with the SI units". Ref: https://www.iau.org/static/resolutions/IAU2012_English.pdf, accessed 2022-12-17 Ref: https://www.bipm.org/documents/20126/41483022/SI-Brochure-9.pdf, accessed 2022-12-17 --- include/keplerian_toolbox/astro_constants.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/keplerian_toolbox/astro_constants.hpp b/include/keplerian_toolbox/astro_constants.hpp index 69b9db62..6f74153f 100644 --- a/include/keplerian_toolbox/astro_constants.hpp +++ b/include/keplerian_toolbox/astro_constants.hpp @@ -43,7 +43,7 @@ #define M_E boost::math::constants::e() #endif -#define ASTRO_AU 149597870691.0 +#define ASTRO_AU 149597870700.0 #define ASTRO_JR 71492000.0 #define ASTRO_MU_SUN 1.32712440018e20 #define ASTRO_MU_EARTH 398600441800000.0 From b67349a5036bd0f43fac4f723087ad9b7515599d Mon Sep 17 00:00:00 2001 From: NoNameForMee Date: Sat, 17 Dec 2022 22:25:56 +0100 Subject: [PATCH 2/2] Correct one AU to 149597870.700 km exactly As per the XXVIII General Assembly of the International Astronomical Union, (2012 Resolution B). And subsequent change by BIPM, the International Bureau of Weights and Measures, to the Non-SI units accepted for use with the SI units. Also, added some explicit official references to the value provided. (This commit here is effectively cherry-picked from what appeared to me to be the upstream libsgp4, see its merge request https://github.com/dnwrnr/sgp4/pull/31). --- include/keplerian_toolbox/third_party/libsgp4/Globals.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/keplerian_toolbox/third_party/libsgp4/Globals.h b/include/keplerian_toolbox/third_party/libsgp4/Globals.h index 1228f041..d7546f18 100644 --- a/include/keplerian_toolbox/third_party/libsgp4/Globals.h +++ b/include/keplerian_toolbox/third_party/libsgp4/Globals.h @@ -63,7 +63,13 @@ const double kF = 1.0 / 298.26; * earth rotation per sideral day */ const double kOMEGA_E = 1.00273790934; -const double kAU = 1.49597870691e8; +/* 1 AU, here given in km, per the IAU 2012 Resolution B2 + * and the BIPM published "The International System of Units (SI), 9th ed.", + * Table 8 of "Non-SI units accepted for use with the SI units". + * Ref: https://www.iau.org/static/resolutions/IAU2012_English.pdf, accessed 2022-12-17 + * Ref: https://www.bipm.org/documents/20126/41483022/SI-Brochure-9.pdf, accessed 2022-12-17 + */ +const double kAU = 1.49597870700e8; const double kSECONDS_PER_DAY = 86400.0; const double kMINUTES_PER_DAY = 1440.0;