diff --git a/demo/browser/astronomy.browser.js b/demo/browser/astronomy.browser.js index bfd77d5c..f820a19a 100644 --- a/demo/browser/astronomy.browser.js +++ b/demo/browser/astronomy.browser.js @@ -2670,8 +2670,13 @@ function Ecliptic(equ) { } exports.Ecliptic = Ecliptic; /** - * @brief Calculates the geocentric Cartesian coordinates for the Moon in the J2000 equatorial system. + * @brief Calculates equatorial geocentric Cartesian coordinates for the Moon. * + * Given a time of observation, calculates the Moon's position as a vector. + * The vector gives the location of the Moon's center relative to the Earth's center + * with x-, y-, and z-components measured in astronomical units. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * Based on the Nautical Almanac Office's Improved Lunar Ephemeris of 1954, * which in turn derives from E. W. Brown's lunar theories. * Adapted from Turbo Pascal code from the book @@ -2701,12 +2706,14 @@ function GeoMoon(date) { } exports.GeoMoon = GeoMoon; /** - * @brief Calculates the geocentric position and velocity of the Moon at a given time. + * @brief Calculates equatorial geocentric position and velocity of the Moon at a given time. * * Given a time of observation, calculates the Moon's position and velocity vectors. * The position and velocity are of the Moon's center relative to the Earth's center. * The position (x, y, z) components are expressed in AU (astronomical units). * The velocity (vx, vy, vz) components are expressed in AU/day. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * If you need the Moon's position only, and not its velocity, * it is much more efficient to use {@link GeoMoon} instead. * diff --git a/demo/nodejs/astronomy.js b/demo/nodejs/astronomy.js index 1f7134a0..cbf61245 100644 --- a/demo/nodejs/astronomy.js +++ b/demo/nodejs/astronomy.js @@ -2669,8 +2669,13 @@ function Ecliptic(equ) { } exports.Ecliptic = Ecliptic; /** - * @brief Calculates the geocentric Cartesian coordinates for the Moon in the J2000 equatorial system. + * @brief Calculates equatorial geocentric Cartesian coordinates for the Moon. * + * Given a time of observation, calculates the Moon's position as a vector. + * The vector gives the location of the Moon's center relative to the Earth's center + * with x-, y-, and z-components measured in astronomical units. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * Based on the Nautical Almanac Office's Improved Lunar Ephemeris of 1954, * which in turn derives from E. W. Brown's lunar theories. * Adapted from Turbo Pascal code from the book @@ -2700,12 +2705,14 @@ function GeoMoon(date) { } exports.GeoMoon = GeoMoon; /** - * @brief Calculates the geocentric position and velocity of the Moon at a given time. + * @brief Calculates equatorial geocentric position and velocity of the Moon at a given time. * * Given a time of observation, calculates the Moon's position and velocity vectors. * The position and velocity are of the Moon's center relative to the Earth's center. * The position (x, y, z) components are expressed in AU (astronomical units). * The velocity (vx, vy, vz) components are expressed in AU/day. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * If you need the Moon's position only, and not its velocity, * it is much more efficient to use {@link GeoMoon} instead. * diff --git a/demo/nodejs/calendar/astronomy.ts b/demo/nodejs/calendar/astronomy.ts index ef02035a..ab79536e 100644 --- a/demo/nodejs/calendar/astronomy.ts +++ b/demo/nodejs/calendar/astronomy.ts @@ -2890,8 +2890,13 @@ export function Ecliptic(equ: Vector): EclipticCoordinates { } /** - * @brief Calculates the geocentric Cartesian coordinates for the Moon in the J2000 equatorial system. + * @brief Calculates equatorial geocentric Cartesian coordinates for the Moon. * + * Given a time of observation, calculates the Moon's position as a vector. + * The vector gives the location of the Moon's center relative to the Earth's center + * with x-, y-, and z-components measured in astronomical units. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * Based on the Nautical Almanac Office's Improved Lunar Ephemeris of 1954, * which in turn derives from E. W. Brown's lunar theories. * Adapted from Turbo Pascal code from the book @@ -2925,12 +2930,14 @@ export function GeoMoon(date: FlexibleDateTime): Vector { } /** - * @brief Calculates the geocentric position and velocity of the Moon at a given time. + * @brief Calculates equatorial geocentric position and velocity of the Moon at a given time. * * Given a time of observation, calculates the Moon's position and velocity vectors. * The position and velocity are of the Moon's center relative to the Earth's center. * The position (x, y, z) components are expressed in AU (astronomical units). * The velocity (vx, vy, vz) components are expressed in AU/day. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * If you need the Moon's position only, and not its velocity, * it is much more efficient to use {@link GeoMoon} instead. * diff --git a/demo/python/astronomy.py b/demo/python/astronomy.py index fa815f4f..2735ae43 100644 --- a/demo/python/astronomy.py +++ b/demo/python/astronomy.py @@ -2485,11 +2485,13 @@ def _CalcMoon(time): ) def GeoMoon(time): - """Calculates the geocentric position of the Moon at a given time. + """Calculates equatorial geocentric position of the Moon at a given time. Given a time of observation, calculates the Moon's position as a vector. The vector gives the location of the Moon's center relative to the Earth's center with x-, y-, and z-components measured in astronomical units. + The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + In Astronomy Engine, this orientation is called EQJ. This algorithm is based on Nautical Almanac Office's *Improved Lunar Ephemeris* of 1954, which in turn derives from E. W. Brown's lunar theories from the early twentieth century. @@ -2505,7 +2507,7 @@ def GeoMoon(time): Returns ------- Vector - The Moon's position as a vector in J2000 Cartesian equatorial coordinates. + The Moon's position as a vector in J2000 Cartesian equatorial coordinates (EQJ). """ m = _CalcMoon(time) @@ -2526,12 +2528,14 @@ def GeoMoon(time): def GeoMoonState(time): - """Calculates the geocentric position and velocity of the Moon at a given time. + """Calculates equatorial geocentric position and velocity of the Moon at a given time. Given a time of observation, calculates the Moon's position and velocity vectors. The position and velocity are of the Moon's center relative to the Earth's center. The position (x, y, z) components are expressed in AU (astronomical units). The velocity (vx, vy, vz) components are expressed in AU/day. + The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + In Astronomy Engine, this orientation is called EQJ. If you need the Moon's position only, and not its velocity, it is much more efficient to use #GeoMoon instead. @@ -2543,7 +2547,7 @@ def GeoMoonState(time): Returns ------- StateVector - The Moon's position and velocity vectors in J2000 equatorial coordinates. + The Moon's position and velocity vectors in J2000 equatorial coordinates (EQJ). """ # This is a hack, because trying to figure out how to derive a time # derivative for CalcMoon() would be extremely painful! diff --git a/generate/template/astronomy.c b/generate/template/astronomy.c index 83e92c3d..da657653 100644 --- a/generate/template/astronomy.c +++ b/generate/template/astronomy.c @@ -1879,20 +1879,22 @@ $ASTRO_ADDSOL() /** @endcond */ /** - * @brief Calculates the geocentric position of the Moon at a given time. + * @brief Calculates equatorial geocentric position of the Moon at a given time. * * Given a time of observation, calculates the Moon's position as a vector. * The vector gives the location of the Moon's center relative to the Earth's center * with x-, y-, and z-components measured in astronomical units. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * - * This algorithm is based on Nautical Almanac Office's *Improved Lunar Ephemeris* of 1954, + * This algorithm is based on the Nautical Almanac Office's *Improved Lunar Ephemeris* of 1954, * which in turn derives from E. W. Brown's lunar theories from the early twentieth century. * It is adapted from Turbo Pascal code from the book * [Astronomy on the Personal Computer](https://www.springer.com/us/book/9783540672210) * by Montenbruck and Pfleger. * * @param time The date and time for which to calculate the Moon's position. - * @return The Moon's position as a vector in J2000 Cartesian equatorial coordinates. + * @return The Moon's position as a vector in J2000 Cartesian equatorial (EQJ) coordinates. */ astro_vector_t Astronomy_GeoMoon(astro_time_t time) { @@ -1927,18 +1929,20 @@ astro_vector_t Astronomy_GeoMoon(astro_time_t time) /** - * @brief Calculates the geocentric position and velocity of the Moon at a given time. + * @brief Calculates equatorial geocentric position and velocity of the Moon at a given time. * * Given a time of observation, calculates the Moon's position and velocity vectors. * The position and velocity are of the Moon's center relative to the Earth's center. * The position (x, y, z) components are expressed in AU (astronomical units). * The velocity (vx, vy, vz) components are expressed in AU/day. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * * If you need the Moon's position only, and not its velocity, * it is much more efficient to use #Astronomy_GeoMoon instead. * * @param time The date and time for which to calculate the Moon's position and velocity. - * @return The Moon's position and velocity vectors in J2000 equatorial coordinates. + * @return The Moon's position and velocity vectors in J2000 equatorial coordinates (EQJ). */ astro_state_vector_t Astronomy_GeoMoonState(astro_time_t time) { @@ -1982,6 +1986,8 @@ astro_state_vector_t Astronomy_GeoMoonState(astro_time_t time) * of the Earth/Moon barycenter (EMB). * The position (x, y, z) components are expressed in AU (astronomical units). * The velocity (vx, vy, vz) components are expressed in AU/day. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * * @param time The date and time for which to calculate the EMB vectors. * @return The EMB's position and velocity vectors in geocentric J2000 equatorial coordinates. diff --git a/generate/template/astronomy.cs b/generate/template/astronomy.cs index 34d15e03..f80eaa5e 100644 --- a/generate/template/astronomy.cs +++ b/generate/template/astronomy.cs @@ -3450,7 +3450,19 @@ $ASTRO_IAU_DATA() ); } - private static AstroVector GeoMoon(AstroTime time) + /// + /// Calculates equatorial geocentric position of the Moon at a given time. + /// + /// + /// Given a time of observation, calculates the Moon's position vector. + /// The vector indicates the Moon's center relative to the Earth's center. + /// The vector components are expressed in AU (astronomical units). + /// The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + /// In Astronomy Engine, this orientation is called EQJ. + /// + /// The date and time for which to calculate the Moon's position. + /// The Moon's position vector in J2000 equatorial coordinates (EQJ). + public static AstroVector GeoMoon(AstroTime time) { var context = new MoonContext(time.tt / 36525.0); MoonResult moon = context.CalcMoon(); @@ -3475,18 +3487,20 @@ $ASTRO_IAU_DATA() } /// - /// Calculates the geocentric position and velocity of the Moon at a given time. + /// Calculates equatorial geocentric position and velocity of the Moon at a given time. /// /// /// Given a time of observation, calculates the Moon's position and velocity vectors. /// The position and velocity are of the Moon's center relative to the Earth's center. /// The position (x, y, z) components are expressed in AU (astronomical units). /// The velocity (vx, vy, vz) components are expressed in AU/day. + /// The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + /// In Astronomy Engine, this orientation is called EQJ. /// If you need the Moon's position only, and not its velocity, - /// it is much more efficient to use #Astronomy.GeoVector instead. + /// it is much more efficient to use #Astronomy.GeoMoon instead. /// /// The date and time for which to calculate the Moon's position and velocity. - /// The Moon's position and velocity vectors in J2000 equatorial coordinates. + /// The Moon's position and velocity vectors in J2000 equatorial coordinates (EQJ). public static StateVector GeoMoonState(AstroTime time) { // This is a hack, because trying to figure out how to derive a time diff --git a/generate/template/astronomy.py b/generate/template/astronomy.py index 6a796a41..c37de948 100644 --- a/generate/template/astronomy.py +++ b/generate/template/astronomy.py @@ -1262,11 +1262,13 @@ $ASTRO_ADDSOL() ) def GeoMoon(time): - """Calculates the geocentric position of the Moon at a given time. + """Calculates equatorial geocentric position of the Moon at a given time. Given a time of observation, calculates the Moon's position as a vector. The vector gives the location of the Moon's center relative to the Earth's center with x-, y-, and z-components measured in astronomical units. + The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + In Astronomy Engine, this orientation is called EQJ. This algorithm is based on Nautical Almanac Office's *Improved Lunar Ephemeris* of 1954, which in turn derives from E. W. Brown's lunar theories from the early twentieth century. @@ -1282,7 +1284,7 @@ def GeoMoon(time): Returns ------- Vector - The Moon's position as a vector in J2000 Cartesian equatorial coordinates. + The Moon's position as a vector in J2000 Cartesian equatorial coordinates (EQJ). """ m = _CalcMoon(time) @@ -1303,12 +1305,14 @@ def GeoMoon(time): def GeoMoonState(time): - """Calculates the geocentric position and velocity of the Moon at a given time. + """Calculates equatorial geocentric position and velocity of the Moon at a given time. Given a time of observation, calculates the Moon's position and velocity vectors. The position and velocity are of the Moon's center relative to the Earth's center. The position (x, y, z) components are expressed in AU (astronomical units). The velocity (vx, vy, vz) components are expressed in AU/day. + The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + In Astronomy Engine, this orientation is called EQJ. If you need the Moon's position only, and not its velocity, it is much more efficient to use #GeoMoon instead. @@ -1320,7 +1324,7 @@ def GeoMoonState(time): Returns ------- StateVector - The Moon's position and velocity vectors in J2000 equatorial coordinates. + The Moon's position and velocity vectors in J2000 equatorial coordinates (EQJ). """ # This is a hack, because trying to figure out how to derive a time # derivative for CalcMoon() would be extremely painful! diff --git a/generate/template/astronomy.ts b/generate/template/astronomy.ts index 2280043c..e0739c0e 100644 --- a/generate/template/astronomy.ts +++ b/generate/template/astronomy.ts @@ -2079,8 +2079,13 @@ export function Ecliptic(equ: Vector): EclipticCoordinates { } /** - * @brief Calculates the geocentric Cartesian coordinates for the Moon in the J2000 equatorial system. + * @brief Calculates equatorial geocentric Cartesian coordinates for the Moon. * + * Given a time of observation, calculates the Moon's position as a vector. + * The vector gives the location of the Moon's center relative to the Earth's center + * with x-, y-, and z-components measured in astronomical units. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * Based on the Nautical Almanac Office's Improved Lunar Ephemeris of 1954, * which in turn derives from E. W. Brown's lunar theories. * Adapted from Turbo Pascal code from the book @@ -2114,12 +2119,14 @@ export function GeoMoon(date: FlexibleDateTime): Vector { } /** - * @brief Calculates the geocentric position and velocity of the Moon at a given time. + * @brief Calculates equatorial geocentric position and velocity of the Moon at a given time. * * Given a time of observation, calculates the Moon's position and velocity vectors. * The position and velocity are of the Moon's center relative to the Earth's center. * The position (x, y, z) components are expressed in AU (astronomical units). * The velocity (vx, vy, vz) components are expressed in AU/day. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * If you need the Moon's position only, and not its velocity, * it is much more efficient to use {@link GeoMoon} instead. * diff --git a/source/c/README.md b/source/c/README.md index b680ff6d..96ed855d 100644 --- a/source/c/README.md +++ b/source/c/README.md @@ -615,7 +615,7 @@ Given an [`astro_time_t`](#astro_time_t) value `time`, formats it as an ISO 8601 -Given a time of observation, calculates the geocentric position and velocity vectors of the Earth/Moon barycenter (EMB). The position (x, y, z) components are expressed in AU (astronomical units). The velocity (vx, vy, vz) components are expressed in AU/day. +Given a time of observation, calculates the geocentric position and velocity vectors of the Earth/Moon barycenter (EMB). The position (x, y, z) components are expressed in AU (astronomical units). The velocity (vx, vy, vz) components are expressed in AU/day. The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. In Astronomy Engine, this orientation is called EQJ. @@ -635,17 +635,17 @@ Given a time of observation, calculates the geocentric position and velocity vec ### Astronomy_GeoMoon(time) ⇒ [`astro_vector_t`](#astro_vector_t) -**Calculates the geocentric position of the Moon at a given time.** +**Calculates equatorial geocentric position of the Moon at a given time.** -Given a time of observation, calculates the Moon's position as a vector. The vector gives the location of the Moon's center relative to the Earth's center with x-, y-, and z-components measured in astronomical units. +Given a time of observation, calculates the Moon's position as a vector. The vector gives the location of the Moon's center relative to the Earth's center with x-, y-, and z-components measured in astronomical units. The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. In Astronomy Engine, this orientation is called EQJ. -This algorithm is based on Nautical Almanac Office's *Improved Lunar Ephemeris* of 1954, which in turn derives from E. W. Brown's lunar theories from the early twentieth century. It is adapted from Turbo Pascal code from the book [Astronomy on the Personal Computer](https://www.springer.com/us/book/9783540672210) by Montenbruck and Pfleger. +This algorithm is based on the Nautical Almanac Office's *Improved Lunar Ephemeris* of 1954, which in turn derives from E. W. Brown's lunar theories from the early twentieth century. It is adapted from Turbo Pascal code from the book [Astronomy on the Personal Computer](https://www.springer.com/us/book/9783540672210) by Montenbruck and Pfleger. -**Returns:** The Moon's position as a vector in J2000 Cartesian equatorial coordinates. +**Returns:** The Moon's position as a vector in J2000 Cartesian equatorial (EQJ) coordinates. @@ -661,17 +661,17 @@ This algorithm is based on Nautical Almanac Office's *Improved Lunar Ephemeris* ### Astronomy_GeoMoonState(time) ⇒ [`astro_state_vector_t`](#astro_state_vector_t) -**Calculates the geocentric position and velocity of the Moon at a given time.** +**Calculates equatorial geocentric position and velocity of the Moon at a given time.** -Given a time of observation, calculates the Moon's position and velocity vectors. The position and velocity are of the Moon's center relative to the Earth's center. The position (x, y, z) components are expressed in AU (astronomical units). The velocity (vx, vy, vz) components are expressed in AU/day. +Given a time of observation, calculates the Moon's position and velocity vectors. The position and velocity are of the Moon's center relative to the Earth's center. The position (x, y, z) components are expressed in AU (astronomical units). The velocity (vx, vy, vz) components are expressed in AU/day. The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. In Astronomy Engine, this orientation is called EQJ. If you need the Moon's position only, and not its velocity, it is much more efficient to use [`Astronomy_GeoMoon`](#Astronomy_GeoMoon) instead. -**Returns:** The Moon's position and velocity vectors in J2000 equatorial coordinates. +**Returns:** The Moon's position and velocity vectors in J2000 equatorial coordinates (EQJ). diff --git a/source/c/astronomy.c b/source/c/astronomy.c index ced3b987..6a5c76ac 100644 --- a/source/c/astronomy.c +++ b/source/c/astronomy.c @@ -2068,20 +2068,22 @@ static void CalcMoon( /** @endcond */ /** - * @brief Calculates the geocentric position of the Moon at a given time. + * @brief Calculates equatorial geocentric position of the Moon at a given time. * * Given a time of observation, calculates the Moon's position as a vector. * The vector gives the location of the Moon's center relative to the Earth's center * with x-, y-, and z-components measured in astronomical units. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * - * This algorithm is based on Nautical Almanac Office's *Improved Lunar Ephemeris* of 1954, + * This algorithm is based on the Nautical Almanac Office's *Improved Lunar Ephemeris* of 1954, * which in turn derives from E. W. Brown's lunar theories from the early twentieth century. * It is adapted from Turbo Pascal code from the book * [Astronomy on the Personal Computer](https://www.springer.com/us/book/9783540672210) * by Montenbruck and Pfleger. * * @param time The date and time for which to calculate the Moon's position. - * @return The Moon's position as a vector in J2000 Cartesian equatorial coordinates. + * @return The Moon's position as a vector in J2000 Cartesian equatorial (EQJ) coordinates. */ astro_vector_t Astronomy_GeoMoon(astro_time_t time) { @@ -2116,18 +2118,20 @@ astro_vector_t Astronomy_GeoMoon(astro_time_t time) /** - * @brief Calculates the geocentric position and velocity of the Moon at a given time. + * @brief Calculates equatorial geocentric position and velocity of the Moon at a given time. * * Given a time of observation, calculates the Moon's position and velocity vectors. * The position and velocity are of the Moon's center relative to the Earth's center. * The position (x, y, z) components are expressed in AU (astronomical units). * The velocity (vx, vy, vz) components are expressed in AU/day. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * * If you need the Moon's position only, and not its velocity, * it is much more efficient to use #Astronomy_GeoMoon instead. * * @param time The date and time for which to calculate the Moon's position and velocity. - * @return The Moon's position and velocity vectors in J2000 equatorial coordinates. + * @return The Moon's position and velocity vectors in J2000 equatorial coordinates (EQJ). */ astro_state_vector_t Astronomy_GeoMoonState(astro_time_t time) { @@ -2171,6 +2175,8 @@ astro_state_vector_t Astronomy_GeoMoonState(astro_time_t time) * of the Earth/Moon barycenter (EMB). * The position (x, y, z) components are expressed in AU (astronomical units). * The velocity (vx, vy, vz) components are expressed in AU/day. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * * @param time The date and time for which to calculate the EMB vectors. * @return The EMB's position and velocity vectors in geocentric J2000 equatorial coordinates. diff --git a/source/csharp/README.md b/source/csharp/README.md index 17ee53c7..701b6496 100644 --- a/source/csharp/README.md +++ b/source/csharp/README.md @@ -480,23 +480,42 @@ The velocity (vx, vy, vz) components are expressed in AU/day. **Returns:** The EMB's position and velocity vectors in geocentric J2000 equatorial coordinates. + +### Astronomy.GeoMoon(time) ⇒ [`AstroVector`](#AstroVector) + +**Calculates equatorial geocentric position of the Moon at a given time.** + +Given a time of observation, calculates the Moon's position vector. +The vector indicates the Moon's center relative to the Earth's center. +The vector components are expressed in AU (astronomical units). +The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. +In Astronomy Engine, this orientation is called EQJ. + +| Type | Parameter | Description | +| --- | --- | --- | +| [`AstroTime`](#AstroTime) | `time` | The date and time for which to calculate the Moon's position. | + +**Returns:** The Moon's position vector in J2000 equatorial coordinates (EQJ). + ### Astronomy.GeoMoonState(time) ⇒ [`StateVector`](#StateVector) -**Calculates the geocentric position and velocity of the Moon at a given time.** +**Calculates equatorial geocentric position and velocity of the Moon at a given time.** Given a time of observation, calculates the Moon's position and velocity vectors. The position and velocity are of the Moon's center relative to the Earth's center. The position (x, y, z) components are expressed in AU (astronomical units). The velocity (vx, vy, vz) components are expressed in AU/day. +The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. +In Astronomy Engine, this orientation is called EQJ. If you need the Moon's position only, and not its velocity, -it is much more efficient to use [`Astronomy.GeoVector`](#Astronomy.GeoVector) instead. +it is much more efficient to use [`Astronomy.GeoMoon`](#Astronomy.GeoMoon) instead. | Type | Parameter | Description | | --- | --- | --- | | [`AstroTime`](#AstroTime) | `time` | The date and time for which to calculate the Moon's position and velocity. | -**Returns:** The Moon's position and velocity vectors in J2000 equatorial coordinates. +**Returns:** The Moon's position and velocity vectors in J2000 equatorial coordinates (EQJ). ### Astronomy.GeoVector(body, time, aberration) ⇒ [`AstroVector`](#AstroVector) diff --git a/source/csharp/astronomy.cs b/source/csharp/astronomy.cs index 360c5115..1f1efb94 100644 --- a/source/csharp/astronomy.cs +++ b/source/csharp/astronomy.cs @@ -4662,7 +4662,19 @@ namespace CosineKitty ); } - private static AstroVector GeoMoon(AstroTime time) + /// + /// Calculates equatorial geocentric position of the Moon at a given time. + /// + /// + /// Given a time of observation, calculates the Moon's position vector. + /// The vector indicates the Moon's center relative to the Earth's center. + /// The vector components are expressed in AU (astronomical units). + /// The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + /// In Astronomy Engine, this orientation is called EQJ. + /// + /// The date and time for which to calculate the Moon's position. + /// The Moon's position vector in J2000 equatorial coordinates (EQJ). + public static AstroVector GeoMoon(AstroTime time) { var context = new MoonContext(time.tt / 36525.0); MoonResult moon = context.CalcMoon(); @@ -4687,18 +4699,20 @@ namespace CosineKitty } /// - /// Calculates the geocentric position and velocity of the Moon at a given time. + /// Calculates equatorial geocentric position and velocity of the Moon at a given time. /// /// /// Given a time of observation, calculates the Moon's position and velocity vectors. /// The position and velocity are of the Moon's center relative to the Earth's center. /// The position (x, y, z) components are expressed in AU (astronomical units). /// The velocity (vx, vy, vz) components are expressed in AU/day. + /// The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + /// In Astronomy Engine, this orientation is called EQJ. /// If you need the Moon's position only, and not its velocity, - /// it is much more efficient to use #Astronomy.GeoVector instead. + /// it is much more efficient to use #Astronomy.GeoMoon instead. /// /// The date and time for which to calculate the Moon's position and velocity. - /// The Moon's position and velocity vectors in J2000 equatorial coordinates. + /// The Moon's position and velocity vectors in J2000 equatorial coordinates (EQJ). public static StateVector GeoMoonState(AstroTime time) { // This is a hack, because trying to figure out how to derive a time diff --git a/source/js/README.md b/source/js/README.md index 666de578..bba3af61 100644 --- a/source/js/README.md +++ b/source/js/README.md @@ -1202,8 +1202,13 @@ You can call [GeoVector](#GeoVector) and pass the resulting vector to this funct ## GeoMoon(date) ⇒ [Vector](#Vector) **Kind**: global function -**Brief**: Calculates the geocentric Cartesian coordinates for the Moon in the J2000 equatorial system. +**Brief**: Calculates equatorial geocentric Cartesian coordinates for the Moon. +Given a time of observation, calculates the Moon's position as a vector. +The vector gives the location of the Moon's center relative to the Earth's center +with x-, y-, and z-components measured in astronomical units. +The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. +In Astronomy Engine, this orientation is called EQJ. Based on the Nautical Almanac Office's Improved Lunar Ephemeris of 1954, which in turn derives from E. W. Brown's lunar theories. Adapted from Turbo Pascal code from the book @@ -1221,12 +1226,14 @@ by Montenbruck and Pfleger. ## GeoMoonState(date) ⇒ [StateVector](#StateVector) **Kind**: global function -**Brief**: Calculates the geocentric position and velocity of the Moon at a given time. +**Brief**: Calculates equatorial geocentric position and velocity of the Moon at a given time. Given a time of observation, calculates the Moon's position and velocity vectors. The position and velocity are of the Moon's center relative to the Earth's center. The position (x, y, z) components are expressed in AU (astronomical units). The velocity (vx, vy, vz) components are expressed in AU/day. +The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. +In Astronomy Engine, this orientation is called EQJ. If you need the Moon's position only, and not its velocity, it is much more efficient to use [GeoMoon](#GeoMoon) instead. diff --git a/source/js/astronomy.browser.js b/source/js/astronomy.browser.js index bfd77d5c..f820a19a 100644 --- a/source/js/astronomy.browser.js +++ b/source/js/astronomy.browser.js @@ -2670,8 +2670,13 @@ function Ecliptic(equ) { } exports.Ecliptic = Ecliptic; /** - * @brief Calculates the geocentric Cartesian coordinates for the Moon in the J2000 equatorial system. + * @brief Calculates equatorial geocentric Cartesian coordinates for the Moon. * + * Given a time of observation, calculates the Moon's position as a vector. + * The vector gives the location of the Moon's center relative to the Earth's center + * with x-, y-, and z-components measured in astronomical units. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * Based on the Nautical Almanac Office's Improved Lunar Ephemeris of 1954, * which in turn derives from E. W. Brown's lunar theories. * Adapted from Turbo Pascal code from the book @@ -2701,12 +2706,14 @@ function GeoMoon(date) { } exports.GeoMoon = GeoMoon; /** - * @brief Calculates the geocentric position and velocity of the Moon at a given time. + * @brief Calculates equatorial geocentric position and velocity of the Moon at a given time. * * Given a time of observation, calculates the Moon's position and velocity vectors. * The position and velocity are of the Moon's center relative to the Earth's center. * The position (x, y, z) components are expressed in AU (astronomical units). * The velocity (vx, vy, vz) components are expressed in AU/day. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * If you need the Moon's position only, and not its velocity, * it is much more efficient to use {@link GeoMoon} instead. * diff --git a/source/js/astronomy.d.ts b/source/js/astronomy.d.ts index 09008378..5818ebbe 100644 --- a/source/js/astronomy.d.ts +++ b/source/js/astronomy.d.ts @@ -744,8 +744,13 @@ export declare function ObserverGravity(latitude: number, height: number): numbe */ export declare function Ecliptic(equ: Vector): EclipticCoordinates; /** - * @brief Calculates the geocentric Cartesian coordinates for the Moon in the J2000 equatorial system. + * @brief Calculates equatorial geocentric Cartesian coordinates for the Moon. * + * Given a time of observation, calculates the Moon's position as a vector. + * The vector gives the location of the Moon's center relative to the Earth's center + * with x-, y-, and z-components measured in astronomical units. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * Based on the Nautical Almanac Office's Improved Lunar Ephemeris of 1954, * which in turn derives from E. W. Brown's lunar theories. * Adapted from Turbo Pascal code from the book @@ -759,12 +764,14 @@ export declare function Ecliptic(equ: Vector): EclipticCoordinates; */ export declare function GeoMoon(date: FlexibleDateTime): Vector; /** - * @brief Calculates the geocentric position and velocity of the Moon at a given time. + * @brief Calculates equatorial geocentric position and velocity of the Moon at a given time. * * Given a time of observation, calculates the Moon's position and velocity vectors. * The position and velocity are of the Moon's center relative to the Earth's center. * The position (x, y, z) components are expressed in AU (astronomical units). * The velocity (vx, vy, vz) components are expressed in AU/day. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * If you need the Moon's position only, and not its velocity, * it is much more efficient to use {@link GeoMoon} instead. * diff --git a/source/js/astronomy.js b/source/js/astronomy.js index 1f7134a0..cbf61245 100644 --- a/source/js/astronomy.js +++ b/source/js/astronomy.js @@ -2669,8 +2669,13 @@ function Ecliptic(equ) { } exports.Ecliptic = Ecliptic; /** - * @brief Calculates the geocentric Cartesian coordinates for the Moon in the J2000 equatorial system. + * @brief Calculates equatorial geocentric Cartesian coordinates for the Moon. * + * Given a time of observation, calculates the Moon's position as a vector. + * The vector gives the location of the Moon's center relative to the Earth's center + * with x-, y-, and z-components measured in astronomical units. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * Based on the Nautical Almanac Office's Improved Lunar Ephemeris of 1954, * which in turn derives from E. W. Brown's lunar theories. * Adapted from Turbo Pascal code from the book @@ -2700,12 +2705,14 @@ function GeoMoon(date) { } exports.GeoMoon = GeoMoon; /** - * @brief Calculates the geocentric position and velocity of the Moon at a given time. + * @brief Calculates equatorial geocentric position and velocity of the Moon at a given time. * * Given a time of observation, calculates the Moon's position and velocity vectors. * The position and velocity are of the Moon's center relative to the Earth's center. * The position (x, y, z) components are expressed in AU (astronomical units). * The velocity (vx, vy, vz) components are expressed in AU/day. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * If you need the Moon's position only, and not its velocity, * it is much more efficient to use {@link GeoMoon} instead. * diff --git a/source/js/astronomy.ts b/source/js/astronomy.ts index ef02035a..ab79536e 100644 --- a/source/js/astronomy.ts +++ b/source/js/astronomy.ts @@ -2890,8 +2890,13 @@ export function Ecliptic(equ: Vector): EclipticCoordinates { } /** - * @brief Calculates the geocentric Cartesian coordinates for the Moon in the J2000 equatorial system. + * @brief Calculates equatorial geocentric Cartesian coordinates for the Moon. * + * Given a time of observation, calculates the Moon's position as a vector. + * The vector gives the location of the Moon's center relative to the Earth's center + * with x-, y-, and z-components measured in astronomical units. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * Based on the Nautical Almanac Office's Improved Lunar Ephemeris of 1954, * which in turn derives from E. W. Brown's lunar theories. * Adapted from Turbo Pascal code from the book @@ -2925,12 +2930,14 @@ export function GeoMoon(date: FlexibleDateTime): Vector { } /** - * @brief Calculates the geocentric position and velocity of the Moon at a given time. + * @brief Calculates equatorial geocentric position and velocity of the Moon at a given time. * * Given a time of observation, calculates the Moon's position and velocity vectors. * The position and velocity are of the Moon's center relative to the Earth's center. * The position (x, y, z) components are expressed in AU (astronomical units). * The velocity (vx, vy, vz) components are expressed in AU/day. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * If you need the Moon's position only, and not its velocity, * it is much more efficient to use {@link GeoMoon} instead. * diff --git a/source/js/esm/astronomy.js b/source/js/esm/astronomy.js index 44eb6421..84f63570 100644 --- a/source/js/esm/astronomy.js +++ b/source/js/esm/astronomy.js @@ -2640,8 +2640,13 @@ export function Ecliptic(equ) { return RotateEquatorialToEcliptic(equ, cos_ob2000, sin_ob2000); } /** - * @brief Calculates the geocentric Cartesian coordinates for the Moon in the J2000 equatorial system. + * @brief Calculates equatorial geocentric Cartesian coordinates for the Moon. * + * Given a time of observation, calculates the Moon's position as a vector. + * The vector gives the location of the Moon's center relative to the Earth's center + * with x-, y-, and z-components measured in astronomical units. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * Based on the Nautical Almanac Office's Improved Lunar Ephemeris of 1954, * which in turn derives from E. W. Brown's lunar theories. * Adapted from Turbo Pascal code from the book @@ -2670,12 +2675,14 @@ export function GeoMoon(date) { return new Vector(mpos2[0], mpos2[1], mpos2[2], time); } /** - * @brief Calculates the geocentric position and velocity of the Moon at a given time. + * @brief Calculates equatorial geocentric position and velocity of the Moon at a given time. * * Given a time of observation, calculates the Moon's position and velocity vectors. * The position and velocity are of the Moon's center relative to the Earth's center. * The position (x, y, z) components are expressed in AU (astronomical units). * The velocity (vx, vy, vz) components are expressed in AU/day. + * The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + * In Astronomy Engine, this orientation is called EQJ. * If you need the Moon's position only, and not its velocity, * it is much more efficient to use {@link GeoMoon} instead. * diff --git a/source/python/README.md b/source/python/README.md index e836026c..d3f1a81c 100644 --- a/source/python/README.md +++ b/source/python/README.md @@ -1288,11 +1288,13 @@ The EMB's position and velocity vectors in J2000 equatorial coordinates. ### GeoMoon(time) -**Calculates the geocentric position of the Moon at a given time.** +**Calculates equatorial geocentric position of the Moon at a given time.** Given a time of observation, calculates the Moon's position as a vector. The vector gives the location of the Moon's center relative to the Earth's center with x-, y-, and z-components measured in astronomical units. +The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. +In Astronomy Engine, this orientation is called EQJ. This algorithm is based on Nautical Almanac Office's *Improved Lunar Ephemeris* of 1954, which in turn derives from E. W. Brown's lunar theories from the early twentieth century. It is adapted from Turbo Pascal code from the book @@ -1304,19 +1306,21 @@ by Montenbruck and Pfleger. | [`Time`](#Time) | `time` | The date and time for which to calculate the Moon's position. | ### Returns: [`Vector`](#Vector) -The Moon's position as a vector in J2000 Cartesian equatorial coordinates. +The Moon's position as a vector in J2000 Cartesian equatorial coordinates (EQJ). --- ### GeoMoonState(time) -**Calculates the geocentric position and velocity of the Moon at a given time.** +**Calculates equatorial geocentric position and velocity of the Moon at a given time.** Given a time of observation, calculates the Moon's position and velocity vectors. The position and velocity are of the Moon's center relative to the Earth's center. The position (x, y, z) components are expressed in AU (astronomical units). The velocity (vx, vy, vz) components are expressed in AU/day. +The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. +In Astronomy Engine, this orientation is called EQJ. If you need the Moon's position only, and not its velocity, it is much more efficient to use [`GeoMoon`](#GeoMoon) instead. @@ -1325,7 +1329,7 @@ it is much more efficient to use [`GeoMoon`](#GeoMoon) instead. | [`Time`](#Time) | `time` | The date and time for which to calculate the Moon's position and velocity. | ### Returns: [`StateVector`](#StateVector) -The Moon's position and velocity vectors in J2000 equatorial coordinates. +The Moon's position and velocity vectors in J2000 equatorial coordinates (EQJ). --- diff --git a/source/python/astronomy.py b/source/python/astronomy.py index fa815f4f..2735ae43 100644 --- a/source/python/astronomy.py +++ b/source/python/astronomy.py @@ -2485,11 +2485,13 @@ def _CalcMoon(time): ) def GeoMoon(time): - """Calculates the geocentric position of the Moon at a given time. + """Calculates equatorial geocentric position of the Moon at a given time. Given a time of observation, calculates the Moon's position as a vector. The vector gives the location of the Moon's center relative to the Earth's center with x-, y-, and z-components measured in astronomical units. + The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + In Astronomy Engine, this orientation is called EQJ. This algorithm is based on Nautical Almanac Office's *Improved Lunar Ephemeris* of 1954, which in turn derives from E. W. Brown's lunar theories from the early twentieth century. @@ -2505,7 +2507,7 @@ def GeoMoon(time): Returns ------- Vector - The Moon's position as a vector in J2000 Cartesian equatorial coordinates. + The Moon's position as a vector in J2000 Cartesian equatorial coordinates (EQJ). """ m = _CalcMoon(time) @@ -2526,12 +2528,14 @@ def GeoMoon(time): def GeoMoonState(time): - """Calculates the geocentric position and velocity of the Moon at a given time. + """Calculates equatorial geocentric position and velocity of the Moon at a given time. Given a time of observation, calculates the Moon's position and velocity vectors. The position and velocity are of the Moon's center relative to the Earth's center. The position (x, y, z) components are expressed in AU (astronomical units). The velocity (vx, vy, vz) components are expressed in AU/day. + The coordinates are oriented with respect to the Earth's equator at the J2000 epoch. + In Astronomy Engine, this orientation is called EQJ. If you need the Moon's position only, and not its velocity, it is much more efficient to use #GeoMoon instead. @@ -2543,7 +2547,7 @@ def GeoMoonState(time): Returns ------- StateVector - The Moon's position and velocity vectors in J2000 equatorial coordinates. + The Moon's position and velocity vectors in J2000 equatorial coordinates (EQJ). """ # This is a hack, because trying to figure out how to derive a time # derivative for CalcMoon() would be extremely painful!