From a5ea549fd28cf029887275a7611377588d1ed0a8 Mon Sep 17 00:00:00 2001 From: Wiljea <143950411+Wiljea@users.noreply.github.com> Date: Mon, 1 Jun 2026 18:16:27 -0400 Subject: [PATCH 1/5] constants: Add planetary and lunar masses M = GM/G Add the mass `M` for the nine planets and the Moon, inserted after each `GM`, mirroring the existing solar mass `M`. Each mass is computed as `GM/G`; since the gravitational constant `G` dominates the uncertainty, the relative uncertainty is carried as `RG`, so every mass self-corrects whenever `G` is updated. Documentation (constants.md) travels with the code: one `### M` entry per body, citing the body's `GM` source and the gravitational constant. Co-Authored-By: Claude Opus 4.8 --- doc/calc-help/constants.md | 80 ++++++++++++++++++++++++++++++++++++++ src/constants.cc | 50 ++++++++++++++++++++++++ 2 files changed, 130 insertions(+) diff --git a/doc/calc-help/constants.md b/doc/calc-help/constants.md index 4800ae16..d7e1b02a 100644 --- a/doc/calc-help/constants.md +++ b/doc/calc-help/constants.md @@ -994,6 +994,14 @@ Mercury gravitational parameter It is measured by radio tracking of spacecraft (Mariner 10, MESSENGER). [Reference 4](#reference-4) +### M☿ constant + +Mercury mass + +Mercury's mass, derived from the gravitational parameter `GM☿` and the measured +gravitational constant `G` as `GM☿/G`. The relative uncertainty is carried as +`ⓇG` (the dominant term), so the mass self-corrects whenever `G` is updated. [Reference 4](#reference-4) [Reference 5](#reference-5) + ### Req☿ constant Mercury equatorial radius @@ -1110,6 +1118,14 @@ Venus gravitational parameter Venus's gravitational parameter, measured by radio tracking of spacecraft (Magellan, Venus Express). [Reference 4](#reference-4) +### M♀ constant + +Venus mass + +Venus's mass, derived from the gravitational parameter `GM♀` and the measured +gravitational constant `G` as `GM♀/G`. The relative uncertainty is carried as +`ⓇG` (the dominant term), so the mass self-corrects whenever `G` is updated. [Reference 4](#reference-4) [Reference 5](#reference-5) + ### Req♀ constant Venus equatorial radius @@ -1223,6 +1239,14 @@ Earth gravitational parameter Exact nominal value (IAU 2015). Earth's gravitational parameter. An exact nominal value defined by the IAU (2015). [Particle Data Group 2023](#particle-data-group-2023) +### M♁ constant + +Earth mass + +Earth's mass, derived from the gravitational parameter `GM♁` and the measured +gravitational constant `G` as `GM♁/G`. The relative uncertainty is carried as +`ⓇG` (the dominant term), so the mass self-corrects whenever `G` is updated. [Particle Data Group 2023](#particle-data-group-2023) [Reference 5](#reference-5) + ### Req♁ constant Earth equatorial radius @@ -1342,6 +1366,14 @@ Moon gravitational parameter Measured. Moon's gravitational parameter, measured by lunar laser ranging and spacecraft radio tracking. [Reference 4](#reference-4) +### M☽ constant + +Moon mass + +The Moon's mass, derived from the gravitational parameter `GM☽` and the measured +gravitational constant `G` as `GM☽/G`. The relative uncertainty is carried as +`ⓇG` (the dominant term), so the mass self-corrects whenever `G` is updated. [Reference 4](#reference-4) [Reference 5](#reference-5) + ### Req☽ constant Moon equatorial radius @@ -1458,6 +1490,14 @@ Mars gravitational parameter Measured. Mars system gravitational parameter, including the contribution of its moons Phobos and Deimos, measured by spacecraft radio tracking. [Reference 4](#reference-4) +### M♂ constant + +Mars mass + +Mars's mass, derived from the gravitational parameter `GM♂` and the measured +gravitational constant `G` as `GM♂/G`. The relative uncertainty is carried as +`ⓇG` (the dominant term), so the mass self-corrects whenever `G` is updated. [Reference 4](#reference-4) [Reference 5](#reference-5) + ### Req♂ constant Mars equatorial radius @@ -1570,6 +1610,14 @@ Jupiter gravitational parameter Exact nominal value (IAU 2015). Jupiter system gravitational parameter. An exact nominal value defined by the IAU (2015). [Particle Data Group 2023](#particle-data-group-2023) +### M♃ constant + +Jupiter mass + +Jupiter's mass, derived from the gravitational parameter `GM♃` and the measured +gravitational constant `G` as `GM♃/G`. The relative uncertainty is carried as +`ⓇG` (the dominant term), so the mass self-corrects whenever `G` is updated. [Particle Data Group 2023](#particle-data-group-2023) [Reference 5](#reference-5) + ### Req♃ constant Jupiter equatorial radius @@ -1688,6 +1736,14 @@ Saturn gravitational parameter Measured. Saturn system gravitational parameter, measured by radio tracking of the Cassini spacecraft. [Reference 4](#reference-4) +### M♄ constant + +Saturn mass + +Saturn's mass, derived from the gravitational parameter `GM♄` and the measured +gravitational constant `G` as `GM♄/G`. The relative uncertainty is carried as +`ⓇG` (the dominant term), so the mass self-corrects whenever `G` is updated. [Reference 4](#reference-4) [Reference 5](#reference-5) + ### Req♄ constant Saturn equatorial radius @@ -1805,6 +1861,14 @@ Uranus gravitational parameter Measured. Uranus system gravitational parameter, measured by Voyager 2 radio tracking. [Reference 4](#reference-4) +### M⛢ constant + +Uranus mass + +Uranus's mass, derived from the gravitational parameter `GM⛢` and the measured +gravitational constant `G` as `GM⛢/G`. The relative uncertainty is carried as +`ⓇG` (the dominant term), so the mass self-corrects whenever `G` is updated. [Reference 4](#reference-4) [Reference 5](#reference-5) + ### Req⛢ constant Uranus equatorial radius @@ -1923,6 +1987,14 @@ Neptune gravitational parameter Measured. Neptune system gravitational parameter, measured by Voyager 2 radio tracking and Hubble Space Telescope astrometry of Triton. [Reference 4](#reference-4) +### M♆ constant + +Neptune mass + +Neptune's mass, derived from the gravitational parameter `GM♆` and the measured +gravitational constant `G` as `GM♆/G`. The relative uncertainty is carried as +`ⓇG` (the dominant term), so the mass self-corrects whenever `G` is updated. [Reference 4](#reference-4) [Reference 5](#reference-5) + ### Req♆ constant Neptune equatorial radius @@ -2040,6 +2112,14 @@ Pluto gravitational parameter Measured. Pluto system gravitational parameter, measured by New Horizons radio tracking. [Reference 4](#reference-4) +### M♇ constant + +Pluto mass + +Pluto's mass, derived from the gravitational parameter `GM♇` and the measured +gravitational constant `G` as `GM♇/G`. The relative uncertainty is carried as +`ⓇG` (the dominant term), so the mass self-corrects whenever `G` is updated. [Reference 4](#reference-4) [Reference 5](#reference-5) + ### Req♇ constant Pluto equatorial radius diff --git a/src/constants.cc b/src/constants.cc index a3d5d122..f051ab9a 100644 --- a/src/constants.cc +++ b/src/constants.cc @@ -1214,6 +1214,11 @@ static const cstring basic_constants[] = " 0.0000000091E13_m³/s² " " 'ROUND(ⓈGM☿/ⒸGM☿;-2)' " " 2.203E13_m³/s² ]", + // *Mercury mass - Calculation from GM and G + "M☿", "[ 'ROUND(CONVERT(ⒸGM☿/ⒸG;1_kg);XPON(UVAL(ⒸGM☿/ⒸG·ⓇG))-XPON(UVAL(ⒸGM☿/ⒸG))-2)' " + " 'CONVERT(ROUND(UBASE(ⓇM☿*ⒸM☿);-2);1_kg)' " + " 'ⓇG' " + " 3.301E23_kg ]", // *Mercury equatorial radius - Measurement [22] "Req☿", "[ 2439.7_km " " 0.1_km " @@ -1289,6 +1294,11 @@ static const cstring basic_constants[] = " 0.00000012E14_m³/s² " " 'ROUND(ⓈGM♀/ⒸGM♀;-2)' " " 3.249E14_m³/s² ]", + // *Venus mass - Calculation from GM and G + "M♀", "[ 'ROUND(CONVERT(ⒸGM♀/ⒸG;1_kg);XPON(UVAL(ⒸGM♀/ⒸG·ⓇG))-XPON(UVAL(ⒸGM♀/ⒸG))-2)' " + " 'CONVERT(ROUND(UBASE(ⓇM♀*ⒸM♀);-2);1_kg)' " + " 'ⓇG' " + " 4.867E24_kg ]", // *Venus equatorial radius - Measurement [22] "Req♀", "[ 6051.8_km " " 0.1_km " @@ -1364,6 +1374,11 @@ static const cstring basic_constants[] = "GM♁", "[ 3.986004E14_m³/s² " " 0_m³/s² " " 0 ]", + // *Earth mass - Calculation from GM and G + "M♁", "[ 'ROUND(CONVERT(ⒸGM♁/ⒸG;1_kg);XPON(UVAL(ⒸGM♁/ⒸG·ⓇG))-XPON(UVAL(ⒸGM♁/ⒸG))-2)' " + " 'CONVERT(ROUND(UBASE(ⓇM♁*ⒸM♁);-2);1_kg)' " + " 'ⓇG' " + " 5.972E24_kg ]", // *Earth equatorial radius - Exact nominal value [3] "Req♁", "[ 6378.1_km " " 0_km " @@ -1438,6 +1453,11 @@ static const cstring basic_constants[] = " 0.0000000009E12_m³/s² " " 'ROUND(ⓈGM☽/ⒸGM☽;-2)' " " 4.903E12_m³/s² ]", + // *Moon mass - Calculation from GM and G + "M☽", "[ 'ROUND(CONVERT(ⒸGM☽/ⒸG;1_kg);XPON(UVAL(ⒸGM☽/ⒸG·ⓇG))-XPON(UVAL(ⒸGM☽/ⒸG))-2)' " + " 'CONVERT(ROUND(UBASE(ⓇM☽*ⒸM☽);-2);1_kg)' " + " 'ⓇG' " + " 7.346E22_kg ]", // *Moon equatorial radius - Measurement [22] "Req☽", "[ 1738.1_km " " 0.1_km " @@ -1513,6 +1533,11 @@ static const cstring basic_constants[] = " 0.00000000091E13_m³/s² " " 'ROUND(ⓈGM♂/ⒸGM♂;-2)' " " 4.283E13_m³/s² ]", + // *Mars mass - Calculation from GM and G + "M♂", "[ 'ROUND(CONVERT(ⒸGM♂/ⒸG;1_kg);XPON(UVAL(ⒸGM♂/ⒸG·ⓇG))-XPON(UVAL(ⒸGM♂/ⒸG))-2)' " + " 'CONVERT(ROUND(UBASE(ⓇM♂*ⒸM♂);-2);1_kg)' " + " 'ⓇG' " + " 6.417E23_kg ]", // *Mars equatorial radius - Measurement [22] "Req♂", "[ 3396.2_km " " 0.1_km " @@ -1586,6 +1611,11 @@ static const cstring basic_constants[] = "GM♃", "[ 1.26686534E17_m³/s² " " 0_m³/s² " " 0 ]", + // *Jupiter mass - Calculation from GM and G + "M♃", "[ 'ROUND(CONVERT(ⒸGM♃/ⒸG;1_kg);XPON(UVAL(ⒸGM♃/ⒸG·ⓇG))-XPON(UVAL(ⒸGM♃/ⒸG))-2)' " + " 'CONVERT(ROUND(UBASE(ⓇM♃*ⒸM♃);-2);1_kg)' " + " 'ⓇG' " + " 1.898E27_kg ]", // *Jupiter equatorial radius - Exact nominal value [3] "Req♃", "[ 71492_km " " 0_km " @@ -1657,6 +1687,11 @@ static const cstring basic_constants[] = " 0.00000000091E16_m³/s² " " 'ROUND(ⓈGM♄/ⒸGM♄;-2)' " " 3.794E16_m³/s² ]", + // *Saturn mass - Calculation from GM and G + "M♄", "[ 'ROUND(CONVERT(ⒸGM♄/ⒸG;1_kg);XPON(UVAL(ⒸGM♄/ⒸG·ⓇG))-XPON(UVAL(ⒸGM♄/ⒸG))-2)' " + " 'CONVERT(ROUND(UBASE(ⓇM♄*ⒸM♄);-2);1_kg)' " + " 'ⓇG' " + " 5.685E26_kg ]", // *Saturn equatorial radius - Measurement [22] "Req♄", "[ 60268_km " " 4_km " @@ -1731,6 +1766,11 @@ static const cstring basic_constants[] = " 0.0000040E15_m³/s² " " 'ROUND(ⓈGM⛢/ⒸGM⛢;-2)' " " 5.795E15_m³/s² ]", + // *Uranus mass - Calculation from GM and G + "M⛢", "[ 'ROUND(CONVERT(ⒸGM⛢/ⒸG;1_kg);XPON(UVAL(ⒸGM⛢/ⒸG·ⓇG))-XPON(UVAL(ⒸGM⛢/ⒸG))-2)' " + " 'CONVERT(ROUND(UBASE(ⓇM⛢*ⒸM⛢);-2);1_kg)' " + " 'ⓇG' " + " 8.682E25_kg ]", // *Uranus equatorial radius - Measurement [22] "Req⛢", "[ 25559_km " " 4_km " @@ -1805,6 +1845,11 @@ static const cstring basic_constants[] = " 0.00000010058E15_m³/s² " " 'ROUND(ⓈGM♆/ⒸGM♆;-2)' " " 6.837E15_m³/s² ]", + // *Neptune mass - Calculation from GM and G + "M♆", "[ 'ROUND(CONVERT(ⒸGM♆/ⒸG;1_kg);XPON(UVAL(ⒸGM♆/ⒸG·ⓇG))-XPON(UVAL(ⒸGM♆/ⒸG))-2)' " + " 'CONVERT(ROUND(UBASE(ⓇM♆*ⒸM♆);-2);1_kg)' " + " 'ⓇG' " + " 1.024E26_kg ]", // *Neptune equatorial radius - Measurement [22] "Req♆", "[ 24764_km " " 15_km " @@ -1877,6 +1922,11 @@ static const cstring basic_constants[] = "GM♇", "[ 9.755E11_m³/s² " " 0.005E11_m³/s² " " 'ROUND(ⓈGM♇/ⒸGM♇;-2)' ]", + // *Pluto mass - Calculation from GM and G + "M♇", "[ 'ROUND(CONVERT(ⒸGM♇/ⒸG;1_kg);XPON(UVAL(ⒸGM♇/ⒸG·ⓇG))-XPON(UVAL(ⒸGM♇/ⒸG))-2)' " + " 'CONVERT(ROUND(UBASE(ⓇM♇*ⒸM♇);-2);1_kg)' " + " 'ⓇG' " + " 1.462E22_kg ]", // *Pluto equatorial radius - Measurement [26] "Req♇", "[ 1188.3_km " " 1.6_km " From abdda9df0221af5eaa8e31632c172334e76ab698 Mon Sep 17 00:00:00 2001 From: Wiljea <143950411+Wiljea@users.noreply.github.com> Date: Mon, 1 Jun 2026 18:20:08 -0400 Subject: [PATCH 2/5] constants: Add rotation angular velocity wrot = 2*pi/Prot Add the sidereal rotation angular velocity `wrot` for the nine planets, the Moon and the Sun, inserted after each `Prot`, mirroring the existing computed-constant pattern. Each is `2*pi/Prot`, expressed in radians per second (`r/s`), with the relative uncertainty carried from `Prot`. Retrograde rotators (Venus, Uranus, Pluto) carry a minus sign on the value only; the uncertainty uses the positive magnitude so it stays positive. Documentation (constants.md) travels with the code: one `### wrot` entry per body, noting the retrograde sign where applicable and citing the same source as the corresponding rotation period. Co-Authored-By: Claude Opus 4.8 --- doc/calc-help/constants.md | 85 ++++++++++++++++++++++++++++++++++++++ src/constants.cc | 44 ++++++++++++++++++++ 2 files changed, 129 insertions(+) diff --git a/doc/calc-help/constants.md b/doc/calc-help/constants.md index d7e1b02a..e3471746 100644 --- a/doc/calc-help/constants.md +++ b/doc/calc-help/constants.md @@ -1052,6 +1052,13 @@ Mercury's sidereal rotation period is a measured quantity. It is the true time it takes to spin 360° on its axis. Mercury is in a 3:2 spin-orbit resonance with the Sun, rotating three times for every two orbits. [Reference 22](#reference-22) +### ωrot☿ constant + +Mercury rotation angular velocity + +Mercury's sidereal rotation angular velocity, computed as `2π/Prot☿` from the +sidereal rotation period. The unit is radians per second (`r/s`). [Reference 22](#reference-22) + ### ϵ☿ constant Mercury axial tilt @@ -1177,6 +1184,15 @@ Measured. Venus's sidereal rotation period is the true time it takes to spin 360 on its axis. Venus rotates retrograde (opposite to its orbital motion), with a rotation period longer than its orbital period. [Reference 22](#reference-22) +### ωrot♀ constant + +Venus rotation angular velocity + +Venus's sidereal rotation angular velocity, computed as `2π/Prot♀` from the +sidereal rotation period. The value is negative because Venus rotates retrograde +(opposite to its orbital motion); the uncertainty uses the positive magnitude. +The unit is radians per second (`r/s`). [Reference 22](#reference-22) + ### ϵ♀ constant Venus axial tilt @@ -1298,6 +1314,13 @@ Earth sidereal rotation period Measured. Earth's sidereal rotation period (one sidereal day), the time for one rotation relative to the fixed stars. [Reference 24](#reference-24) +### ωrot♁ constant + +Earth rotation angular velocity + +Earth's sidereal rotation angular velocity, computed as `2π/Prot♁` from the +sidereal rotation period. The unit is radians per second (`r/s`). [Reference 24](#reference-24) + ### ϵ♁ constant Earth axial tilt @@ -1425,6 +1448,14 @@ Measured. Moon's sidereal rotation period is the true time it takes to spin 360° on its axis. The Moon is tidally locked to Earth, so its rotation period equals its orbital period. [Reference 22](#reference-22) +### ωrot☽ constant + +Moon rotation angular velocity + +The Moon's sidereal rotation angular velocity, computed as `2π/Prot☽` from the +sidereal rotation period. Because the Moon is tidally locked, this equals its +orbital mean motion. The unit is radians per second (`r/s`). [Reference 22](#reference-22) + ### ϵ☽ constant Moon axial tilt @@ -1547,6 +1578,13 @@ Measured. Mars's sidereal rotation period is the true time it takes to spin 360° on its axis. A Martian day (sol) is very similar in length to an Earth day. [Reference 22](#reference-22) +### ωrot♂ constant + +Mars rotation angular velocity + +Mars's sidereal rotation angular velocity, computed as `2π/Prot♂` from the +sidereal rotation period. The unit is radians per second (`r/s`). [Reference 22](#reference-22) + ### ϵ♂ constant Mars axial tilt @@ -1671,6 +1709,13 @@ Measured. Jupiter's sidereal rotation period is the true time it takes to spin 360° on its axis (System III, based on radio emissions from its magnetosphere). [Reference 22](#reference-22) +### ωrot♃ constant + +Jupiter rotation angular velocity + +Jupiter's sidereal rotation angular velocity, computed as `2π/Prot♃` from the +sidereal rotation period (System III). The unit is radians per second (`r/s`). [Reference 22](#reference-22) + ### ϵ♃ constant Jupiter axial tilt @@ -1796,6 +1841,13 @@ Measured. Saturn's sidereal rotation period is the true time it takes to spin 360° on its axis (System III, based on Cassini radio measurements). [Reference 22](#reference-22) +### ωrot♄ constant + +Saturn rotation angular velocity + +Saturn's sidereal rotation angular velocity, computed as `2π/Prot♄` from the +sidereal rotation period (System III). The unit is radians per second (`r/s`). [Reference 22](#reference-22) + ### ϵ♄ constant Saturn axial tilt @@ -1920,6 +1972,15 @@ Measured. Uranus's sidereal rotation period is the true time it takes to spin 360° on its axis. Uranus rotates retrograde relative to its orbital motion. [Reference 22](#reference-22) +### ωrot⛢ constant + +Uranus rotation angular velocity + +Uranus's sidereal rotation angular velocity, computed as `2π/Prot⛢` from the +sidereal rotation period. The value is negative because Uranus rotates retrograde +relative to its orbital motion; the uncertainty uses the positive magnitude. The +unit is radians per second (`r/s`). [Reference 22](#reference-22) + ### ϵ⛢ constant Uranus axial tilt @@ -2046,6 +2107,13 @@ Measured. Neptune's sidereal rotation period is the true time it takes to spin 360° on its axis (System III, from Voyager 2 radio measurements). [Reference 22](#reference-22) +### ωrot♆ constant + +Neptune rotation angular velocity + +Neptune's sidereal rotation angular velocity, computed as `2π/Prot♆` from the +sidereal rotation period (System III). The unit is radians per second (`r/s`). [Reference 22](#reference-22) + ### ϵ♆ constant Neptune axial tilt @@ -2169,6 +2237,15 @@ Measured. Pluto's sidereal rotation period is the true time it takes to spin 360° on its axis. Pluto rotates retrograde and is tidally locked to its moon Charon. [Reference 26](#reference-26) +### ωrot♇ constant + +Pluto rotation angular velocity + +Pluto's sidereal rotation angular velocity, computed as `2π/Prot♇` from the +sidereal rotation period. The value is negative because Pluto rotates retrograde; +the uncertainty uses the positive magnitude. The unit is radians per second +(`r/s`). [Reference 26](#reference-26) + ### ϵ♇ constant Pluto axial tilt @@ -2300,6 +2377,14 @@ by tracking surface features using Doppler techniques. It is the true time it takes to spin 360° on its axis. [Reference 20](#reference-20) [Reference 21](#reference-21) +### ωrot☉ constant + +Solar rotation angular velocity + +The Sun's sidereal rotation angular velocity at the equator (System I), computed +as `2π/Prot☉` from the sidereal rotation period. The unit is radians per second +(`r/s`). [Reference 20](#reference-20) [Reference 21](#reference-21) + ## Cosmology constants ### Λ constant diff --git a/src/constants.cc b/src/constants.cc index f051ab9a..0980722f 100644 --- a/src/constants.cc +++ b/src/constants.cc @@ -1252,6 +1252,10 @@ static const cstring basic_constants[] = " 0.1_s " " 'ROUND(ⓈProt☿/ⒸProt☿;-2)' " " 5.067E6_s ]", + // *Mercury rotation angular velocity - Calculation from Prot + "ωrot☿", "[ 'ROUND(CONVERT(2*Ⓒπ/ⒸProt☿;1_r/s);XPON(UVAL(Ⓡωrot☿*2*Ⓒπ/ⒸProt☿))-XPON(UVAL(2*Ⓒπ/ⒸProt☿))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot☿*2*Ⓒπ/ⒸProt☿);-2);1_r/s)' " + " 'ⓇProt☿' ]", // *Mercury axial tilt - Measurement [22] "ϵ☿", "[ 0.034_° " " 0.001_° " @@ -1332,6 +1336,10 @@ static const cstring basic_constants[] = " 8.64_s " " 'ROUND(ⓈProt♀/ⒸProt♀;-2)' " " 2.100E7_s ]", + // *Venus rotation angular velocity - Calculation from Prot [retrograde] + "ωrot♀", "[ 'ROUND(CONVERT(-2*Ⓒπ/ⒸProt♀;1_r/s);XPON(UVAL(Ⓡωrot♀*2*Ⓒπ/ⒸProt♀))-XPON(UVAL(2*Ⓒπ/ⒸProt♀))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot♀*2*Ⓒπ/ⒸProt♀);-2);1_r/s)' " + " 'ⓇProt♀' ]", // *Venus axial tilt - Measurement [22] "ϵ♀", "[ 177.36_° " " 0.01_° " @@ -1410,6 +1418,10 @@ static const cstring basic_constants[] = " 0.0001_s " " 'ROUND(ⓈProt♁/ⒸProt♁;-2)' " " 8.616E4_s ]", + // *Earth rotation angular velocity - Calculation from Prot + "ωrot♁", "[ 'ROUND(CONVERT(2*Ⓒπ/ⒸProt♁;1_r/s);XPON(UVAL(Ⓡωrot♁*2*Ⓒπ/ⒸProt♁))-XPON(UVAL(2*Ⓒπ/ⒸProt♁))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot♁*2*Ⓒπ/ⒸProt♁);-2);1_r/s)' " + " 'ⓇProt♁' ]", // *Earth axial tilt - Measurement [24] "ϵ♁", "[ 23.4393_° " " 0.0001_° " @@ -1491,6 +1503,10 @@ static const cstring basic_constants[] = " 0.1_s " " 'ROUND(ⓈProt☽/ⒸProt☽;-2)' " " 2.361E6_s ]", + // *Moon rotation angular velocity - Calculation from Prot + "ωrot☽", "[ 'ROUND(CONVERT(2*Ⓒπ/ⒸProt☽;1_r/s);XPON(UVAL(Ⓡωrot☽*2*Ⓒπ/ⒸProt☽))-XPON(UVAL(2*Ⓒπ/ⒸProt☽))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot☽*2*Ⓒπ/ⒸProt☽);-2);1_r/s)' " + " 'ⓇProt☽' ]", // *Moon axial tilt - Measurement [22] "ϵ☽", "[ 1.5424_° " " 0.0001_° " @@ -1571,6 +1587,10 @@ static const cstring basic_constants[] = " 0.1_s " " 'ROUND(ⓈProt♂/ⒸProt♂;-2)' " " 8.864E4_s ]", + // *Mars rotation angular velocity - Calculation from Prot + "ωrot♂", "[ 'ROUND(CONVERT(2*Ⓒπ/ⒸProt♂;1_r/s);XPON(UVAL(Ⓡωrot♂*2*Ⓒπ/ⒸProt♂))-XPON(UVAL(2*Ⓒπ/ⒸProt♂))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot♂*2*Ⓒπ/ⒸProt♂);-2);1_r/s)' " + " 'ⓇProt♂' ]", // *Mars axial tilt - Measurement [22] "ϵ♂", "[ 25.19_° " " 0.01_° " @@ -1646,6 +1666,10 @@ static const cstring basic_constants[] = "Prot♃", "[ 35730_s " " 1_s " " 'ROUND(ⓈProt♃/ⒸProt♃;-2)' ]", + // *Jupiter rotation angular velocity - Calculation from Prot + "ωrot♃", "[ 'ROUND(CONVERT(2*Ⓒπ/ⒸProt♃;1_r/s);XPON(UVAL(Ⓡωrot♃*2*Ⓒπ/ⒸProt♃))-XPON(UVAL(2*Ⓒπ/ⒸProt♃))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot♃*2*Ⓒπ/ⒸProt♃);-2);1_r/s)' " + " 'ⓇProt♃' ]", // *Jupiter axial tilt - Measurement [22] "ϵ♃", "[ 3.13_° " " 0.01_° " @@ -1725,6 +1749,10 @@ static const cstring basic_constants[] = " 50_s " " 'ROUND(ⓈProt♄/ⒸProt♄;-2)' " " 3.836E4_s ]", + // *Saturn rotation angular velocity - Calculation from Prot + "ωrot♄", "[ 'ROUND(CONVERT(2*Ⓒπ/ⒸProt♄;1_r/s);XPON(UVAL(Ⓡωrot♄*2*Ⓒπ/ⒸProt♄))-XPON(UVAL(2*Ⓒπ/ⒸProt♄))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot♄*2*Ⓒπ/ⒸProt♄);-2);1_r/s)' " + " 'ⓇProt♄' ]", // *Saturn axial tilt - Measurement [22] "ϵ♄", "[ 26.73_° " " 0.01_° " @@ -1804,6 +1832,10 @@ static const cstring basic_constants[] = " 10_s " " 'ROUND(ⓈProt⛢/ⒸProt⛢;-2)' " " 6.206E4_s ]", + // *Uranus rotation angular velocity - Calculation from Prot [retrograde] + "ωrot⛢", "[ 'ROUND(CONVERT(-2*Ⓒπ/ⒸProt⛢;1_r/s);XPON(UVAL(Ⓡωrot⛢*2*Ⓒπ/ⒸProt⛢))-XPON(UVAL(2*Ⓒπ/ⒸProt⛢))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot⛢*2*Ⓒπ/ⒸProt⛢);-2);1_r/s)' " + " 'ⓇProt⛢' ]", // *Uranus axial tilt - Measurement [22] "ϵ⛢", "[ 97.77_° " " 0.01_° " @@ -1882,6 +1914,10 @@ static const cstring basic_constants[] = "Prot♆", "[ 58000_s " " 100_s " " 'ROUND(ⓈProt♆/ⒸProt♆;-2)' ]", + // *Neptune rotation angular velocity - Calculation from Prot + "ωrot♆", "[ 'ROUND(CONVERT(2*Ⓒπ/ⒸProt♆;1_r/s);XPON(UVAL(Ⓡωrot♆*2*Ⓒπ/ⒸProt♆))-XPON(UVAL(2*Ⓒπ/ⒸProt♆))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot♆*2*Ⓒπ/ⒸProt♆);-2);1_r/s)' " + " 'ⓇProt♆' ]", // *Neptune axial tilt - Measurement [22] "ϵ♆", "[ 28.32_° " " 0.01_° " @@ -1960,6 +1996,10 @@ static const cstring basic_constants[] = " 0.1_s " " 'ROUND(ⓈProt♇/ⒸProt♇;-2)' " " 5.519E5_s ]", + // *Pluto rotation angular velocity - Calculation from Prot [retrograde] + "ωrot♇", "[ 'ROUND(CONVERT(-2*Ⓒπ/ⒸProt♇;1_r/s);XPON(UVAL(Ⓡωrot♇*2*Ⓒπ/ⒸProt♇))-XPON(UVAL(2*Ⓒπ/ⒸProt♇))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot♇*2*Ⓒπ/ⒸProt♇);-2);1_r/s)' " + " 'ⓇProt♇' ]", // *Pluto axial tilt - Measurement [26] "ϵ♇", "[ 119.591_° " " 0.001_° " @@ -2042,6 +2082,10 @@ static const cstring basic_constants[] = " 864_s " " 'ROUND(ⓈProt☉/ⒸProt☉;-2)' " " 2.193E6_s ]", + // *Sun rotation angular velocity - Calculation from Prot + "ωrot☉", "[ 'ROUND(CONVERT(2*Ⓒπ/ⒸProt☉;1_r/s);XPON(UVAL(Ⓡωrot☉*2*Ⓒπ/ⒸProt☉))-XPON(UVAL(2*Ⓒπ/ⒸProt☉))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot☉*2*Ⓒπ/ⒸProt☉);-2);1_r/s)' " + " 'ⓇProt☉' ]", "Astronomy/Cosmology", nullptr, From b26601844d394b8167357e8449e00547527d46a3 Mon Sep 17 00:00:00 2001 From: Wiljea <143950411+Wiljea@users.noreply.github.com> Date: Mon, 1 Jun 2026 18:23:27 -0400 Subject: [PATCH 3/5] constants: Add WGS-84/GPS Earth reference values and calendar years Append to the Astronomy/Earth section: - the WGS-84 / GPS defining constants of the reference ellipsoid used by GPS (equatorial radius, flattening, nominal angular velocity, gravitational parameter including the atmosphere) plus the first and second eccentricities squared computed from the flattening. All exact by definition (uncertainty 0). - the three years: tropical (seasonal), Julian (exact, defines the light-year) and Gregorian mean (exact). Documentation (constants.md) travels with the code and explicitly distinguishes: - the WGS-84 ellipsoid eccentricities from the orbital eccentricity e; - the nominal WGS-84 angular velocity / GM from the sidereal wrot and IAU GM; - Porb (anomalistic year, used by T0) from the tropical/Julian/Gregorian years. References: a new named reference [WGS-84] (NGA standard) is added rather than a numbered one, to avoid colliding with numbered references introduced on other in-flight branches; the years cite the existing time-scales reference [24]. Note: the second-eccentricity constant name uses an ASCII apostrophe (e'GPS); to be confirmed against a build that the constant name parser accepts it. Co-Authored-By: Claude Opus 4.8 --- doc/calc-help/constants.md | 72 ++++++++++++++++++++++++++++++++++++++ src/constants.cc | 42 ++++++++++++++++++++++ 2 files changed, 114 insertions(+) diff --git a/doc/calc-help/constants.md b/doc/calc-help/constants.md index e3471746..e5a7a0df 100644 --- a/doc/calc-help/constants.md +++ b/doc/calc-help/constants.md @@ -1380,6 +1380,74 @@ year). Value in JDN. It is the most recent point in its orbit when it was closest to the Sun. [Materials 20](#materials-20) +### a♁GPS constant + +Earth equatorial radius (WGS-84) + +The semi-major axis of the WGS-84 reference ellipsoid, a defining constant of the +World Geodetic System 1984 used by GPS. Exact by definition. [WGS-84](#wgs-84) + +### f♁GPS constant + +Earth flattening (WGS-84) + +The flattening of the WGS-84 reference ellipsoid, `1/298.257223563`, a defining +constant. Exact by definition. [WGS-84](#wgs-84) + +### ω♁GPS constant + +Earth nominal mean angular velocity (WGS-84) + +The nominal mean angular velocity of the Earth in the WGS-84 system. Exact by +definition, and distinct from the sidereal value `ωrot♁` derived from `Prot♁`. [WGS-84](#wgs-84) + +### GM♁GPS constant + +Earth gravitational parameter (WGS-84) + +The geocentric gravitational constant of the WGS-84 system, including the mass of +the Earth's atmosphere. Exact by definition, and distinct from the IAU nominal +`GM♁`. [WGS-84](#wgs-84) + +### e²♁GPS constant + +Earth first eccentricity squared (WGS-84) + +The square of the first eccentricity of the WGS-84 reference ellipsoid, computed +from the flattening as `2·f♁GPS−f♁GPS²`. This is an ellipsoid (shape) eccentricity, +not the orbital eccentricity `e♁`. [WGS-84](#wgs-84) + +### e'²♁GPS constant + +Earth second eccentricity squared (WGS-84) + +The square of the second eccentricity of the WGS-84 reference ellipsoid, computed +from the first as `e²♁GPS/(1−e²♁GPS)`. An ellipsoid eccentricity, distinct from the +orbital eccentricity `e♁`. [WGS-84](#wgs-84) + +### Ytrop♁ constant + +Tropical year + +The tropical (seasonal) year, equinox to equinox, about 365.24219 days at J2000. +It is distinct from `Porb♁` (the anomalistic year, perihelion to perihelion, used +by `T₀♁`) and from the calendar years `YJul♁` and `YGreg♁`. [Reference 24](#reference-24) + +### YJul♁ constant + +Julian year + +The Julian year, exactly 365.25 days. It is the year used to define the +light-year. [Reference 24](#reference-24) + +### YGreg♁ constant + +Gregorian mean year + +The mean year of the Gregorian calendar, exactly 365.2425 days +(365 + 1/4 − 1/100 + 1/400). [Reference 24](#reference-24) + + ## Moon constants ### GM☽ constant @@ -3484,6 +3552,10 @@ Particle Data Group (2024). "Review of Particle Physics — Astrophysical Consta Particle Data Group 2023 Prša, A., et al. (2016). "Nominal values for selected solar and planetary quantities: IAU 2015 Resolution B3". The Astronomical Journal, 152(2), 41. arXiv:1605.09788 — DOI: 10.3847/0004-6256/152/2/41 +### WGS-84 + +National Geospatial-Intelligence Agency (2014). Department of Defense World Geodetic System 1984: Its Definition and Relationships with Local Geodetic Systems, NGA.STND.0036_1.0.0_WGS84, 3rd ed. (Defining parameters of the WGS-84 reference ellipsoid used by GPS.) + ### Reference 4 Park, R.S., et al. (2021). "The JPL Planetary and Lunar Ephemerides DE440 and DE441". The Astronomical Journal, 161(3), 105. DOI: 10.3847/1538-3881/abd414 diff --git a/src/constants.cc b/src/constants.cc index 0980722f..7ace9f10 100644 --- a/src/constants.cc +++ b/src/constants.cc @@ -1458,6 +1458,48 @@ static const cstring basic_constants[] = " 0_date " " 0 ]", + // ------------------------------------------------------------------------ + // WGS-84 / GPS reference ellipsoid (defining constants, exact) + // *Earth equatorial radius - WGS-84 defining constant [WGS-84] + "a♁GPS", "[ 6378137_m " + " 0_m " + " 0 ]", + // *Earth flattening - WGS-84 defining constant 1/298.257223563 [WGS-84] + "f♁GPS", "[ '1/298.257223563' " + " 0 " + " 0 ]", + // *Earth nominal mean angular velocity - WGS-84 [WGS-84] + "ω♁GPS", "[ 7.2921150E-5_r/s " + " 0_r/s " + " 0 ]", + // *Earth gravitational parameter (incl. atmosphere) - WGS-84 [WGS-84] + "GM♁GPS", "[ 3.986004418E14_m³/s² " + " 0_m³/s² " + " 0 ]", + // *Earth first eccentricity squared - WGS-84 ellipsoid, from flattening [WGS-84] + "e²♁GPS", "[ '2*Ⓒf♁GPS-Ⓒf♁GPS²' " + " 0 " + " 0 ]", + // *Earth second eccentricity squared - WGS-84 ellipsoid, from first [WGS-84] + "e'²♁GPS", "[ 'Ⓒe²♁GPS/(1-Ⓒe²♁GPS)' " + " 0 " + " 0 ]", + + // ------------------------------------------------------------------------ + // Calendar and astronomical years + // *Tropical year (equinox to equinox, J2000) - seasonal year [24] + "Ytrop♁", "[ 365.24219_d " + " 0_d " + " 0 ]", + // *Julian year - exact, defines the light-year [24] + "YJul♁", "[ 365.25_d " + " 0_d " + " 0 ]", + // *Gregorian mean year - exact: 365 + 1/4 - 1/100 + 1/400 [24] + "YGreg♁", "[ 365.2425_d " + " 0_d " + " 0 ]", + "Astronomy/Moon", nullptr, // *Moon gravitational parameter - Measurement [4] From aa3d5ce90de0ac457968315b6b1b19bfda17ce0e Mon Sep 17 00:00:00 2001 From: Wiljea <143950411+Wiljea@users.noreply.github.com> Date: Mon, 1 Jun 2026 19:34:29 -0400 Subject: [PATCH 4/5] constants: Fix wrot radian units and WGS-84 eccentricity names Building the simulator surfaced two issues in the previous two commits: - wrot evaluated to "Inconsistent units": 2*pi/Prot is dimensionless per second (1/s), which does not convert to r/s because the radian is a distinct unit in DB48x. Multiply by 1_r, parenthesised as (2*pi*1_r)/Prot so the radian is not absorbed into a compound "r/..." unit, yielding r/s. Affects all 11 wrot entries (planets, Moon, Sun); retrograde bodies keep the leading minus. - The WGS-84 eccentricity constants could not be referenced: the superscript in the names parses as the square operator (and an apostrophe as an algebraic quote). Rename to e12GPS (first eccentricity squared) and e22GPS (second), and update the internal reference. The superscript used as a postfix operator on a value (e.g. f^2) is unchanged. Verified on the simulator: M (5.972e24 kg), wrot (Earth +7.292e-5 r/s, Venus negative = retrograde), e12 (0.0066944) and e22 (0.0067395), the rest of the WGS-84 block and the calendar years all evaluate correctly. Co-Authored-By: Claude Opus 4.8 --- doc/calc-help/constants.md | 8 +++---- src/constants.cc | 48 +++++++++++++++++++------------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/doc/calc-help/constants.md b/doc/calc-help/constants.md index e5a7a0df..c5a11cab 100644 --- a/doc/calc-help/constants.md +++ b/doc/calc-help/constants.md @@ -1409,7 +1409,7 @@ The geocentric gravitational constant of the WGS-84 system, including the mass o the Earth's atmosphere. Exact by definition, and distinct from the IAU nominal `GM♁`. [WGS-84](#wgs-84) -### e²♁GPS constant +### e12♁GPS constant Earth first eccentricity squared (WGS-84) @@ -1417,13 +1417,13 @@ The square of the first eccentricity of the WGS-84 reference ellipsoid, computed from the flattening as `2·f♁GPS−f♁GPS²`. This is an ellipsoid (shape) eccentricity, not the orbital eccentricity `e♁`. [WGS-84](#wgs-84) -### e'²♁GPS constant +### e22♁GPS constant Earth second eccentricity squared (WGS-84) The square of the second eccentricity of the WGS-84 reference ellipsoid, computed -from the first as `e²♁GPS/(1−e²♁GPS)`. An ellipsoid eccentricity, distinct from the -orbital eccentricity `e♁`. [WGS-84](#wgs-84) +from the first as `e12♁GPS/(1−e12♁GPS)`. An ellipsoid eccentricity, distinct from +the orbital eccentricity `e♁`. [WGS-84](#wgs-84) ### Ytrop♁ constant diff --git a/src/constants.cc b/src/constants.cc index 7ace9f10..00abfa06 100644 --- a/src/constants.cc +++ b/src/constants.cc @@ -1253,8 +1253,8 @@ static const cstring basic_constants[] = " 'ROUND(ⓈProt☿/ⒸProt☿;-2)' " " 5.067E6_s ]", // *Mercury rotation angular velocity - Calculation from Prot - "ωrot☿", "[ 'ROUND(CONVERT(2*Ⓒπ/ⒸProt☿;1_r/s);XPON(UVAL(Ⓡωrot☿*2*Ⓒπ/ⒸProt☿))-XPON(UVAL(2*Ⓒπ/ⒸProt☿))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot☿*2*Ⓒπ/ⒸProt☿);-2);1_r/s)' " + "ωrot☿", "[ 'ROUND(CONVERT((2*Ⓒπ*1_r)/ⒸProt☿;1_r/s);XPON(UVAL(Ⓡωrot☿*(2*Ⓒπ*1_r)/ⒸProt☿))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt☿))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot☿*(2*Ⓒπ*1_r)/ⒸProt☿);-2);1_r/s)' " " 'ⓇProt☿' ]", // *Mercury axial tilt - Measurement [22] "ϵ☿", "[ 0.034_° " @@ -1337,8 +1337,8 @@ static const cstring basic_constants[] = " 'ROUND(ⓈProt♀/ⒸProt♀;-2)' " " 2.100E7_s ]", // *Venus rotation angular velocity - Calculation from Prot [retrograde] - "ωrot♀", "[ 'ROUND(CONVERT(-2*Ⓒπ/ⒸProt♀;1_r/s);XPON(UVAL(Ⓡωrot♀*2*Ⓒπ/ⒸProt♀))-XPON(UVAL(2*Ⓒπ/ⒸProt♀))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot♀*2*Ⓒπ/ⒸProt♀);-2);1_r/s)' " + "ωrot♀", "[ 'ROUND(CONVERT(-(2*Ⓒπ*1_r)/ⒸProt♀;1_r/s);XPON(UVAL(Ⓡωrot♀*(2*Ⓒπ*1_r)/ⒸProt♀))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt♀))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot♀*(2*Ⓒπ*1_r)/ⒸProt♀);-2);1_r/s)' " " 'ⓇProt♀' ]", // *Venus axial tilt - Measurement [22] "ϵ♀", "[ 177.36_° " @@ -1419,8 +1419,8 @@ static const cstring basic_constants[] = " 'ROUND(ⓈProt♁/ⒸProt♁;-2)' " " 8.616E4_s ]", // *Earth rotation angular velocity - Calculation from Prot - "ωrot♁", "[ 'ROUND(CONVERT(2*Ⓒπ/ⒸProt♁;1_r/s);XPON(UVAL(Ⓡωrot♁*2*Ⓒπ/ⒸProt♁))-XPON(UVAL(2*Ⓒπ/ⒸProt♁))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot♁*2*Ⓒπ/ⒸProt♁);-2);1_r/s)' " + "ωrot♁", "[ 'ROUND(CONVERT((2*Ⓒπ*1_r)/ⒸProt♁;1_r/s);XPON(UVAL(Ⓡωrot♁*(2*Ⓒπ*1_r)/ⒸProt♁))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt♁))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot♁*(2*Ⓒπ*1_r)/ⒸProt♁);-2);1_r/s)' " " 'ⓇProt♁' ]", // *Earth axial tilt - Measurement [24] "ϵ♁", "[ 23.4393_° " @@ -1477,11 +1477,11 @@ static const cstring basic_constants[] = " 0_m³/s² " " 0 ]", // *Earth first eccentricity squared - WGS-84 ellipsoid, from flattening [WGS-84] - "e²♁GPS", "[ '2*Ⓒf♁GPS-Ⓒf♁GPS²' " + "e12♁GPS", "[ '2*Ⓒf♁GPS-Ⓒf♁GPS²' " " 0 " " 0 ]", // *Earth second eccentricity squared - WGS-84 ellipsoid, from first [WGS-84] - "e'²♁GPS", "[ 'Ⓒe²♁GPS/(1-Ⓒe²♁GPS)' " + "e22♁GPS", "[ 'Ⓒe12♁GPS/(1-Ⓒe12♁GPS)' " " 0 " " 0 ]", @@ -1546,8 +1546,8 @@ static const cstring basic_constants[] = " 'ROUND(ⓈProt☽/ⒸProt☽;-2)' " " 2.361E6_s ]", // *Moon rotation angular velocity - Calculation from Prot - "ωrot☽", "[ 'ROUND(CONVERT(2*Ⓒπ/ⒸProt☽;1_r/s);XPON(UVAL(Ⓡωrot☽*2*Ⓒπ/ⒸProt☽))-XPON(UVAL(2*Ⓒπ/ⒸProt☽))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot☽*2*Ⓒπ/ⒸProt☽);-2);1_r/s)' " + "ωrot☽", "[ 'ROUND(CONVERT((2*Ⓒπ*1_r)/ⒸProt☽;1_r/s);XPON(UVAL(Ⓡωrot☽*(2*Ⓒπ*1_r)/ⒸProt☽))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt☽))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot☽*(2*Ⓒπ*1_r)/ⒸProt☽);-2);1_r/s)' " " 'ⓇProt☽' ]", // *Moon axial tilt - Measurement [22] "ϵ☽", "[ 1.5424_° " @@ -1630,8 +1630,8 @@ static const cstring basic_constants[] = " 'ROUND(ⓈProt♂/ⒸProt♂;-2)' " " 8.864E4_s ]", // *Mars rotation angular velocity - Calculation from Prot - "ωrot♂", "[ 'ROUND(CONVERT(2*Ⓒπ/ⒸProt♂;1_r/s);XPON(UVAL(Ⓡωrot♂*2*Ⓒπ/ⒸProt♂))-XPON(UVAL(2*Ⓒπ/ⒸProt♂))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot♂*2*Ⓒπ/ⒸProt♂);-2);1_r/s)' " + "ωrot♂", "[ 'ROUND(CONVERT((2*Ⓒπ*1_r)/ⒸProt♂;1_r/s);XPON(UVAL(Ⓡωrot♂*(2*Ⓒπ*1_r)/ⒸProt♂))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt♂))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot♂*(2*Ⓒπ*1_r)/ⒸProt♂);-2);1_r/s)' " " 'ⓇProt♂' ]", // *Mars axial tilt - Measurement [22] "ϵ♂", "[ 25.19_° " @@ -1709,8 +1709,8 @@ static const cstring basic_constants[] = " 1_s " " 'ROUND(ⓈProt♃/ⒸProt♃;-2)' ]", // *Jupiter rotation angular velocity - Calculation from Prot - "ωrot♃", "[ 'ROUND(CONVERT(2*Ⓒπ/ⒸProt♃;1_r/s);XPON(UVAL(Ⓡωrot♃*2*Ⓒπ/ⒸProt♃))-XPON(UVAL(2*Ⓒπ/ⒸProt♃))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot♃*2*Ⓒπ/ⒸProt♃);-2);1_r/s)' " + "ωrot♃", "[ 'ROUND(CONVERT((2*Ⓒπ*1_r)/ⒸProt♃;1_r/s);XPON(UVAL(Ⓡωrot♃*(2*Ⓒπ*1_r)/ⒸProt♃))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt♃))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot♃*(2*Ⓒπ*1_r)/ⒸProt♃);-2);1_r/s)' " " 'ⓇProt♃' ]", // *Jupiter axial tilt - Measurement [22] "ϵ♃", "[ 3.13_° " @@ -1792,8 +1792,8 @@ static const cstring basic_constants[] = " 'ROUND(ⓈProt♄/ⒸProt♄;-2)' " " 3.836E4_s ]", // *Saturn rotation angular velocity - Calculation from Prot - "ωrot♄", "[ 'ROUND(CONVERT(2*Ⓒπ/ⒸProt♄;1_r/s);XPON(UVAL(Ⓡωrot♄*2*Ⓒπ/ⒸProt♄))-XPON(UVAL(2*Ⓒπ/ⒸProt♄))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot♄*2*Ⓒπ/ⒸProt♄);-2);1_r/s)' " + "ωrot♄", "[ 'ROUND(CONVERT((2*Ⓒπ*1_r)/ⒸProt♄;1_r/s);XPON(UVAL(Ⓡωrot♄*(2*Ⓒπ*1_r)/ⒸProt♄))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt♄))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot♄*(2*Ⓒπ*1_r)/ⒸProt♄);-2);1_r/s)' " " 'ⓇProt♄' ]", // *Saturn axial tilt - Measurement [22] "ϵ♄", "[ 26.73_° " @@ -1875,8 +1875,8 @@ static const cstring basic_constants[] = " 'ROUND(ⓈProt⛢/ⒸProt⛢;-2)' " " 6.206E4_s ]", // *Uranus rotation angular velocity - Calculation from Prot [retrograde] - "ωrot⛢", "[ 'ROUND(CONVERT(-2*Ⓒπ/ⒸProt⛢;1_r/s);XPON(UVAL(Ⓡωrot⛢*2*Ⓒπ/ⒸProt⛢))-XPON(UVAL(2*Ⓒπ/ⒸProt⛢))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot⛢*2*Ⓒπ/ⒸProt⛢);-2);1_r/s)' " + "ωrot⛢", "[ 'ROUND(CONVERT(-(2*Ⓒπ*1_r)/ⒸProt⛢;1_r/s);XPON(UVAL(Ⓡωrot⛢*(2*Ⓒπ*1_r)/ⒸProt⛢))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt⛢))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot⛢*(2*Ⓒπ*1_r)/ⒸProt⛢);-2);1_r/s)' " " 'ⓇProt⛢' ]", // *Uranus axial tilt - Measurement [22] "ϵ⛢", "[ 97.77_° " @@ -1957,8 +1957,8 @@ static const cstring basic_constants[] = " 100_s " " 'ROUND(ⓈProt♆/ⒸProt♆;-2)' ]", // *Neptune rotation angular velocity - Calculation from Prot - "ωrot♆", "[ 'ROUND(CONVERT(2*Ⓒπ/ⒸProt♆;1_r/s);XPON(UVAL(Ⓡωrot♆*2*Ⓒπ/ⒸProt♆))-XPON(UVAL(2*Ⓒπ/ⒸProt♆))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot♆*2*Ⓒπ/ⒸProt♆);-2);1_r/s)' " + "ωrot♆", "[ 'ROUND(CONVERT((2*Ⓒπ*1_r)/ⒸProt♆;1_r/s);XPON(UVAL(Ⓡωrot♆*(2*Ⓒπ*1_r)/ⒸProt♆))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt♆))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot♆*(2*Ⓒπ*1_r)/ⒸProt♆);-2);1_r/s)' " " 'ⓇProt♆' ]", // *Neptune axial tilt - Measurement [22] "ϵ♆", "[ 28.32_° " @@ -2039,8 +2039,8 @@ static const cstring basic_constants[] = " 'ROUND(ⓈProt♇/ⒸProt♇;-2)' " " 5.519E5_s ]", // *Pluto rotation angular velocity - Calculation from Prot [retrograde] - "ωrot♇", "[ 'ROUND(CONVERT(-2*Ⓒπ/ⒸProt♇;1_r/s);XPON(UVAL(Ⓡωrot♇*2*Ⓒπ/ⒸProt♇))-XPON(UVAL(2*Ⓒπ/ⒸProt♇))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot♇*2*Ⓒπ/ⒸProt♇);-2);1_r/s)' " + "ωrot♇", "[ 'ROUND(CONVERT(-(2*Ⓒπ*1_r)/ⒸProt♇;1_r/s);XPON(UVAL(Ⓡωrot♇*(2*Ⓒπ*1_r)/ⒸProt♇))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt♇))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot♇*(2*Ⓒπ*1_r)/ⒸProt♇);-2);1_r/s)' " " 'ⓇProt♇' ]", // *Pluto axial tilt - Measurement [26] "ϵ♇", "[ 119.591_° " @@ -2125,8 +2125,8 @@ static const cstring basic_constants[] = " 'ROUND(ⓈProt☉/ⒸProt☉;-2)' " " 2.193E6_s ]", // *Sun rotation angular velocity - Calculation from Prot - "ωrot☉", "[ 'ROUND(CONVERT(2*Ⓒπ/ⒸProt☉;1_r/s);XPON(UVAL(Ⓡωrot☉*2*Ⓒπ/ⒸProt☉))-XPON(UVAL(2*Ⓒπ/ⒸProt☉))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot☉*2*Ⓒπ/ⒸProt☉);-2);1_r/s)' " + "ωrot☉", "[ 'ROUND(CONVERT((2*Ⓒπ*1_r)/ⒸProt☉;1_r/s);XPON(UVAL(Ⓡωrot☉*(2*Ⓒπ*1_r)/ⒸProt☉))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt☉))-2)' " + " 'CONVERT(ROUND(UBASE(Ⓡωrot☉*(2*Ⓒπ*1_r)/ⒸProt☉);-2);1_r/s)' " " 'ⓇProt☉' ]", "Astronomy/Cosmology", nullptr, From 3bbd48d933aa23f750fec5744e368f1851b2f334 Mon Sep 17 00:00:00 2001 From: Jean Wilson Date: Tue, 2 Jun 2026 23:23:16 -0400 Subject: [PATCH 5/5] constants: fix rounding of computed astronomy constants (wrot, f-earth/jupiter) Two rounding defects in computed Astronomy constants, both verified on the simulator (-Tcstlib "built-in constants parsing" = 0 failures): - wrot (all 11 bodies): the absolute uncertainty was rounded *after* UBASE, which expresses r/s in the angular base unit turn/s (x 1/2pi); converting the rounded value back to r/s multiplied by 2pi and destroyed the 2-significant- figure rounding. Round directly in r/s instead, keeping the positive magnitude (so retrograde bodies still get a positive uncertainty). Now e.g. wrot-earth absolute uncertainty = 8.8e-14 r/s (2 s.f.). - f-earth and f-jupiter (oblateness): computed from EXACT (IAU nominal) radii, so their relative uncertainty is 0; the uncertainty-driven rounding then degenerated (XPON(UVAL(0)) = -1 => round to 0 significant figures), collapsing f-earth to 0 and f-jupiter to 0.06. As the inputs are exact, round to a fixed 5 significant figures (the precision of the radii): f-earth = 0.0033396, f-jupiter = 0.064874. Co-Authored-By: Claude Opus 4.8 --- src/constants.cc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/constants.cc b/src/constants.cc index 00abfa06..132a350c 100644 --- a/src/constants.cc +++ b/src/constants.cc @@ -1254,7 +1254,7 @@ static const cstring basic_constants[] = " 5.067E6_s ]", // *Mercury rotation angular velocity - Calculation from Prot "ωrot☿", "[ 'ROUND(CONVERT((2*Ⓒπ*1_r)/ⒸProt☿;1_r/s);XPON(UVAL(Ⓡωrot☿*(2*Ⓒπ*1_r)/ⒸProt☿))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt☿))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot☿*(2*Ⓒπ*1_r)/ⒸProt☿);-2);1_r/s)' " + " 'CONVERT(ROUND(Ⓡωrot☿*(2*Ⓒπ*1_r)/ⒸProt☿;-2);1_r/s)' " " 'ⓇProt☿' ]", // *Mercury axial tilt - Measurement [22] "ϵ☿", "[ 0.034_° " @@ -1338,7 +1338,7 @@ static const cstring basic_constants[] = " 2.100E7_s ]", // *Venus rotation angular velocity - Calculation from Prot [retrograde] "ωrot♀", "[ 'ROUND(CONVERT(-(2*Ⓒπ*1_r)/ⒸProt♀;1_r/s);XPON(UVAL(Ⓡωrot♀*(2*Ⓒπ*1_r)/ⒸProt♀))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt♀))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot♀*(2*Ⓒπ*1_r)/ⒸProt♀);-2);1_r/s)' " + " 'CONVERT(ROUND(Ⓡωrot♀*(2*Ⓒπ*1_r)/ⒸProt♀;-2);1_r/s)' " " 'ⓇProt♀' ]", // *Venus axial tilt - Measurement [22] "ϵ♀", "[ 177.36_° " @@ -1396,7 +1396,7 @@ static const cstring basic_constants[] = " 0_km " " 0 ]", // *Earth oblateness - Calculation from nominal value [3] - "f♁", "[ 'ROUND(1-ⒸRp♁/ⒸReq♁;XPON(UVAL(Ⓡf♁*(1-ⒸRp♁/ⒸReq♁)))-XPON(1-ⒸRp♁/ⒸReq♁)-2)' " + "f♁", "[ 'ROUND(1-ⒸRp♁/ⒸReq♁;-5)' " " 'ROUND(Ⓡf♁*Ⓒf♁;-2)' " " 'ⓇRp♁+ⓇReq♁' ]", // *Earth mean density - Calculation from nominal value [3] @@ -1420,7 +1420,7 @@ static const cstring basic_constants[] = " 8.616E4_s ]", // *Earth rotation angular velocity - Calculation from Prot "ωrot♁", "[ 'ROUND(CONVERT((2*Ⓒπ*1_r)/ⒸProt♁;1_r/s);XPON(UVAL(Ⓡωrot♁*(2*Ⓒπ*1_r)/ⒸProt♁))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt♁))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot♁*(2*Ⓒπ*1_r)/ⒸProt♁);-2);1_r/s)' " + " 'CONVERT(ROUND(Ⓡωrot♁*(2*Ⓒπ*1_r)/ⒸProt♁;-2);1_r/s)' " " 'ⓇProt♁' ]", // *Earth axial tilt - Measurement [24] "ϵ♁", "[ 23.4393_° " @@ -1547,7 +1547,7 @@ static const cstring basic_constants[] = " 2.361E6_s ]", // *Moon rotation angular velocity - Calculation from Prot "ωrot☽", "[ 'ROUND(CONVERT((2*Ⓒπ*1_r)/ⒸProt☽;1_r/s);XPON(UVAL(Ⓡωrot☽*(2*Ⓒπ*1_r)/ⒸProt☽))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt☽))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot☽*(2*Ⓒπ*1_r)/ⒸProt☽);-2);1_r/s)' " + " 'CONVERT(ROUND(Ⓡωrot☽*(2*Ⓒπ*1_r)/ⒸProt☽;-2);1_r/s)' " " 'ⓇProt☽' ]", // *Moon axial tilt - Measurement [22] "ϵ☽", "[ 1.5424_° " @@ -1631,7 +1631,7 @@ static const cstring basic_constants[] = " 8.864E4_s ]", // *Mars rotation angular velocity - Calculation from Prot "ωrot♂", "[ 'ROUND(CONVERT((2*Ⓒπ*1_r)/ⒸProt♂;1_r/s);XPON(UVAL(Ⓡωrot♂*(2*Ⓒπ*1_r)/ⒸProt♂))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt♂))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot♂*(2*Ⓒπ*1_r)/ⒸProt♂);-2);1_r/s)' " + " 'CONVERT(ROUND(Ⓡωrot♂*(2*Ⓒπ*1_r)/ⒸProt♂;-2);1_r/s)' " " 'ⓇProt♂' ]", // *Mars axial tilt - Measurement [22] "ϵ♂", "[ 25.19_° " @@ -1687,7 +1687,7 @@ static const cstring basic_constants[] = " 0_km " " 0 ]", // *Jupiter oblateness - Calculation from nominal value [3] - "f♃", "[ 'ROUND(1-ⒸRp♃/ⒸReq♃;XPON(UVAL(Ⓡf♃*(1-ⒸRp♃/ⒸReq♃)))-XPON(1-ⒸRp♃/ⒸReq♃)-2)' " + "f♃", "[ 'ROUND(1-ⒸRp♃/ⒸReq♃;-5)' " " 'ROUND(Ⓡf♃*Ⓒf♃;-2)' " " 'ⓇRp♃+ⓇReq♃' ]", // *Jupiter mean density - Calculation from nominal value [3] @@ -1710,7 +1710,7 @@ static const cstring basic_constants[] = " 'ROUND(ⓈProt♃/ⒸProt♃;-2)' ]", // *Jupiter rotation angular velocity - Calculation from Prot "ωrot♃", "[ 'ROUND(CONVERT((2*Ⓒπ*1_r)/ⒸProt♃;1_r/s);XPON(UVAL(Ⓡωrot♃*(2*Ⓒπ*1_r)/ⒸProt♃))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt♃))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot♃*(2*Ⓒπ*1_r)/ⒸProt♃);-2);1_r/s)' " + " 'CONVERT(ROUND(Ⓡωrot♃*(2*Ⓒπ*1_r)/ⒸProt♃;-2);1_r/s)' " " 'ⓇProt♃' ]", // *Jupiter axial tilt - Measurement [22] "ϵ♃", "[ 3.13_° " @@ -1793,7 +1793,7 @@ static const cstring basic_constants[] = " 3.836E4_s ]", // *Saturn rotation angular velocity - Calculation from Prot "ωrot♄", "[ 'ROUND(CONVERT((2*Ⓒπ*1_r)/ⒸProt♄;1_r/s);XPON(UVAL(Ⓡωrot♄*(2*Ⓒπ*1_r)/ⒸProt♄))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt♄))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot♄*(2*Ⓒπ*1_r)/ⒸProt♄);-2);1_r/s)' " + " 'CONVERT(ROUND(Ⓡωrot♄*(2*Ⓒπ*1_r)/ⒸProt♄;-2);1_r/s)' " " 'ⓇProt♄' ]", // *Saturn axial tilt - Measurement [22] "ϵ♄", "[ 26.73_° " @@ -1876,7 +1876,7 @@ static const cstring basic_constants[] = " 6.206E4_s ]", // *Uranus rotation angular velocity - Calculation from Prot [retrograde] "ωrot⛢", "[ 'ROUND(CONVERT(-(2*Ⓒπ*1_r)/ⒸProt⛢;1_r/s);XPON(UVAL(Ⓡωrot⛢*(2*Ⓒπ*1_r)/ⒸProt⛢))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt⛢))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot⛢*(2*Ⓒπ*1_r)/ⒸProt⛢);-2);1_r/s)' " + " 'CONVERT(ROUND(Ⓡωrot⛢*(2*Ⓒπ*1_r)/ⒸProt⛢;-2);1_r/s)' " " 'ⓇProt⛢' ]", // *Uranus axial tilt - Measurement [22] "ϵ⛢", "[ 97.77_° " @@ -1958,7 +1958,7 @@ static const cstring basic_constants[] = " 'ROUND(ⓈProt♆/ⒸProt♆;-2)' ]", // *Neptune rotation angular velocity - Calculation from Prot "ωrot♆", "[ 'ROUND(CONVERT((2*Ⓒπ*1_r)/ⒸProt♆;1_r/s);XPON(UVAL(Ⓡωrot♆*(2*Ⓒπ*1_r)/ⒸProt♆))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt♆))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot♆*(2*Ⓒπ*1_r)/ⒸProt♆);-2);1_r/s)' " + " 'CONVERT(ROUND(Ⓡωrot♆*(2*Ⓒπ*1_r)/ⒸProt♆;-2);1_r/s)' " " 'ⓇProt♆' ]", // *Neptune axial tilt - Measurement [22] "ϵ♆", "[ 28.32_° " @@ -2040,7 +2040,7 @@ static const cstring basic_constants[] = " 5.519E5_s ]", // *Pluto rotation angular velocity - Calculation from Prot [retrograde] "ωrot♇", "[ 'ROUND(CONVERT(-(2*Ⓒπ*1_r)/ⒸProt♇;1_r/s);XPON(UVAL(Ⓡωrot♇*(2*Ⓒπ*1_r)/ⒸProt♇))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt♇))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot♇*(2*Ⓒπ*1_r)/ⒸProt♇);-2);1_r/s)' " + " 'CONVERT(ROUND(Ⓡωrot♇*(2*Ⓒπ*1_r)/ⒸProt♇;-2);1_r/s)' " " 'ⓇProt♇' ]", // *Pluto axial tilt - Measurement [26] "ϵ♇", "[ 119.591_° " @@ -2126,7 +2126,7 @@ static const cstring basic_constants[] = " 2.193E6_s ]", // *Sun rotation angular velocity - Calculation from Prot "ωrot☉", "[ 'ROUND(CONVERT((2*Ⓒπ*1_r)/ⒸProt☉;1_r/s);XPON(UVAL(Ⓡωrot☉*(2*Ⓒπ*1_r)/ⒸProt☉))-XPON(UVAL((2*Ⓒπ*1_r)/ⒸProt☉))-2)' " - " 'CONVERT(ROUND(UBASE(Ⓡωrot☉*(2*Ⓒπ*1_r)/ⒸProt☉);-2);1_r/s)' " + " 'CONVERT(ROUND(Ⓡωrot☉*(2*Ⓒπ*1_r)/ⒸProt☉;-2);1_r/s)' " " 'ⓇProt☉' ]", "Astronomy/Cosmology", nullptr,