kotlin: Turn calculation functions to top level declaration

This commit is contained in:
Ebrahim Byagowi
2022-04-09 03:49:58 +04:30
parent b754925e80
commit 086a1f602d
69 changed files with 5235 additions and 5216 deletions

View File

File diff suppressed because it is too large Load Diff

View File

@@ -64,7 +64,6 @@ these are used in function and type names.
| [Aberration](doc/-aberration/index.md) | [jvm]<br>enum [Aberration](doc/-aberration/index.md) : [Enum](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html)&lt;[Aberration](doc/-aberration/index.md)&gt; <br>Aberration calculation options. |
| [ApsisInfo](doc/-apsis-info/index.md) | [jvm]<br>class [ApsisInfo](doc/-apsis-info/index.md)(time: [AstroTime](doc/-astro-time/index.md), kind: [ApsisKind](doc/-apsis-kind/index.md), distAu: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), distKm: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html))<br>An apsis event: pericenter (closest approach) or apocenter (farthest distance). |
| [ApsisKind](doc/-apsis-kind/index.md) | [jvm]<br>enum [ApsisKind](doc/-apsis-kind/index.md) : [Enum](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html)&lt;[ApsisKind](doc/-apsis-kind/index.md)&gt; <br>The type of apsis: pericenter (closest approach) or apocenter (farthest distance). |
| [Astronomy](doc/-astronomy/index.md) | [jvm]<br>object [Astronomy](doc/-astronomy/index.md)<br>The main container of astronomy calculation functions. |
| [AstroTime](doc/-astro-time/index.md) | [jvm]<br>class [AstroTime](doc/-astro-time/index.md)<br>A date and time used for astronomical calculations. |
| [AstroVector](doc/-astro-vector/index.md) | [jvm]<br>data class [AstroVector](doc/-astro-vector/index.md)(x: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), y: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), z: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), t: [AstroTime](doc/-astro-time/index.md))<br>A 3D Cartesian vector whose components are expressed in Astronomical Units (AU). |
| [AxisInfo](doc/-axis-info/index.md) | [jvm]<br>class [AxisInfo](doc/-axis-info/index.md)(ra: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), dec: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), spin: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), north: [AstroVector](doc/-astro-vector/index.md))<br>Information about a body's rotation axis at a given time. |
@@ -84,7 +83,7 @@ these are used in function and type names.
| [InternalError](doc/-internal-error/index.md) | [jvm]<br>class [InternalError](doc/-internal-error/index.md)(message: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)) : [Exception](https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html)<br>An unexpected internal error occurred in Astronomy Engine |
| [InvalidBodyException](doc/-invalid-body-exception/index.md) | [jvm]<br>class [InvalidBodyException](doc/-invalid-body-exception/index.md)(body: [Body](doc/-body/index.md)) : [Exception](https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html)<br>An invalid body was specified for the given function. |
| [JupiterMoonsInfo](doc/-jupiter-moons-info/index.md) | [jvm]<br>class [JupiterMoonsInfo](doc/-jupiter-moons-info/index.md)(moon: [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)&lt;[StateVector](doc/-state-vector/index.md)&gt;)<br>Holds the positions and velocities of Jupiter's major 4 moons. |
| [LibrationInfo](doc/-libration-info/index.md) | [jvm]<br>data class [LibrationInfo](doc/-libration-info/index.md)(elat: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), elon: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), mlat: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), mlon: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), distKm: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), diamDeg: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html))<br>Lunar libration angles, returned by Astronomy.libration. |
| [LibrationInfo](doc/-libration-info/index.md) | [jvm]<br>data class [LibrationInfo](doc/-libration-info/index.md)(elat: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), elon: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), mlat: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), mlon: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), distKm: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), diamDeg: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html))<br>Lunar libration angles, returned by libration. |
| [LocalSolarEclipseInfo](doc/-local-solar-eclipse-info/index.md) | [jvm]<br>class [LocalSolarEclipseInfo](doc/-local-solar-eclipse-info/index.md)(kind: [EclipseKind](doc/-eclipse-kind/index.md), partialBegin: [EclipseEvent](doc/-eclipse-event/index.md), totalBegin: [EclipseEvent](doc/-eclipse-event/index.md), peak: [EclipseEvent](doc/-eclipse-event/index.md), totalEnd: [EclipseEvent](doc/-eclipse-event/index.md), partialEnd: [EclipseEvent](doc/-eclipse-event/index.md))<br>Information about a solar eclipse as seen by an observer at a given time and geographic location. |
| [LunarEclipseInfo](doc/-lunar-eclipse-info/index.md) | [jvm]<br>class [LunarEclipseInfo](doc/-lunar-eclipse-info/index.md)(kind: [EclipseKind](doc/-eclipse-kind/index.md), peak: [AstroTime](doc/-astro-time/index.md), sdPenum: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), sdPartial: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), sdTotal: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html))<br>Information about a lunar eclipse. |
| [MoonQuarterInfo](doc/-moon-quarter-info/index.md) | [jvm]<br>class [MoonQuarterInfo](doc/-moon-quarter-info/index.md)(quarter: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html), time: [AstroTime](doc/-astro-time/index.md))<br>A lunar quarter event (new moon, first quarter, full moon, or third quarter) along with its date and time. |
@@ -105,8 +104,52 @@ these are used in function and type names.
| Name | Summary |
|---|---|
| [constellation](doc/constellation.md) | [jvm]<br>fun [constellation](doc/constellation.md)(ra: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), dec: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [ConstellationInfo](doc/-constellation-info/index.md)<br>Determines the constellation that contains the given point in the sky. |
| [degreesToRadians](doc/degrees-to-radians.md) | [jvm]<br>fun [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html).[degreesToRadians](doc/degrees-to-radians.md)(): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Convert an angle expressed in degrees to an angle expressed in radians. |
| [eclipticGeoMoon](doc/ecliptic-geo-moon.md) | [jvm]<br>fun [eclipticGeoMoon](doc/ecliptic-geo-moon.md)(time: [AstroTime](doc/-astro-time/index.md)): [Spherical](doc/-spherical/index.md)<br>Calculates spherical ecliptic geocentric position of the Moon. |
| [equator](doc/equator.md) | [jvm]<br>fun [equator](doc/equator.md)(body: [Body](doc/-body/index.md), time: [AstroTime](doc/-astro-time/index.md), observer: [Observer](doc/-observer/index.md), equdate: [EquatorEpoch](doc/-equator-epoch/index.md), aberration: [Aberration](doc/-aberration/index.md)): [Equatorial](doc/-equatorial/index.md)<br>Calculates equatorial coordinates of a celestial body as seen by an observer on the Earth's surface. |
| [equatorFromVector](doc/equator-from-vector.md) | [jvm]<br>fun [equatorFromVector](doc/equator-from-vector.md)(vector: [AstroVector](doc/-astro-vector/index.md)): [Equatorial](doc/-equatorial/index.md)<br>Given an equatorial vector, calculates equatorial angular coordinates. |
| [equatorialToEcliptic](doc/equatorial-to-ecliptic.md) | [jvm]<br>fun [equatorialToEcliptic](doc/equatorial-to-ecliptic.md)(equ: [AstroVector](doc/-astro-vector/index.md)): [Ecliptic](doc/-ecliptic/index.md)<br>Converts J2000 equatorial Cartesian coordinates to J2000 ecliptic coordinates. |
| [geoMoon](doc/geo-moon.md) | [jvm]<br>fun [geoMoon](doc/geo-moon.md)(time: [AstroTime](doc/-astro-time/index.md)): [AstroVector](doc/-astro-vector/index.md)<br>Calculates equatorial geocentric position of the Moon at a given time. |
| [geoMoonState](doc/geo-moon-state.md) | [jvm]<br>fun [geoMoonState](doc/geo-moon-state.md)(time: [AstroTime](doc/-astro-time/index.md)): [StateVector](doc/-state-vector/index.md)<br>Calculates equatorial geocentric position and velocity of the Moon at a given time. |
| [geoVector](doc/geo-vector.md) | [jvm]<br>fun [geoVector](doc/geo-vector.md)(body: [Body](doc/-body/index.md), time: [AstroTime](doc/-astro-time/index.md), aberration: [Aberration](doc/-aberration/index.md)): [AstroVector](doc/-astro-vector/index.md)<br>Calculates geocentric Cartesian coordinates of a body in the J2000 equatorial system. |
| [helioDistance](doc/helio-distance.md) | [jvm]<br>fun [helioDistance](doc/helio-distance.md)(body: [Body](doc/-body/index.md), time: [AstroTime](doc/-astro-time/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Calculates the distance between a body and the Sun at a given time. |
| [helioState](doc/helio-state.md) | [jvm]<br>fun [helioState](doc/helio-state.md)(body: [Body](doc/-body/index.md), time: [AstroTime](doc/-astro-time/index.md)): [StateVector](doc/-state-vector/index.md)<br>Calculates heliocentric position and velocity vectors for the given body. |
| [helioVector](doc/helio-vector.md) | [jvm]<br>fun [helioVector](doc/helio-vector.md)(body: [Body](doc/-body/index.md), time: [AstroTime](doc/-astro-time/index.md)): [AstroVector](doc/-astro-vector/index.md)<br>Calculates heliocentric Cartesian coordinates of a body in the J2000 equatorial system. |
| [horizon](doc/horizon.md) | [jvm]<br>fun [horizon](doc/horizon.md)(time: [AstroTime](doc/-astro-time/index.md), observer: [Observer](doc/-observer/index.md), ra: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), dec: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), refraction: [Refraction](doc/-refraction/index.md)): [Topocentric](doc/-topocentric/index.md)<br>Calculates the apparent location of a body relative to the local horizon of an observer on the Earth. |
| [inverseRefractionAngle](doc/inverse-refraction-angle.md) | [jvm]<br>fun [inverseRefractionAngle](doc/inverse-refraction-angle.md)(refraction: [Refraction](doc/-refraction/index.md), bentAltitude: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Calculates the inverse of an atmospheric refraction angle. |
| [jupiterMoons](doc/jupiter-moons.md) | [jvm]<br>fun [jupiterMoons](doc/jupiter-moons.md)(time: [AstroTime](doc/-astro-time/index.md)): [JupiterMoonsInfo](doc/-jupiter-moons-info/index.md)<br>Calculates jovicentric positions and velocities of Jupiter's largest 4 moons. |
| [massProduct](doc/mass-product.md) | [jvm]<br>fun [massProduct](doc/mass-product.md)(body: [Body](doc/-body/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Returns the product of mass and universal gravitational constant of a Solar System body. |
| [moonPhase](doc/moon-phase.md) | [jvm]<br>fun [moonPhase](doc/moon-phase.md)(time: [AstroTime](doc/-astro-time/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Returns the Moon's phase as an angle from 0 to 360 degrees. |
| [nextMoonQuarter](doc/next-moon-quarter.md) | [jvm]<br>fun [nextMoonQuarter](doc/next-moon-quarter.md)(mq: [MoonQuarterInfo](doc/-moon-quarter-info/index.md)): [MoonQuarterInfo](doc/-moon-quarter-info/index.md)<br>Continues searching for lunar quarters from a previous search. |
| [pairLongitude](doc/pair-longitude.md) | [jvm]<br>fun [pairLongitude](doc/pair-longitude.md)(body1: [Body](doc/-body/index.md), body2: [Body](doc/-body/index.md), time: [AstroTime](doc/-astro-time/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Returns one body's ecliptic longitude with respect to another, as seen from the Earth. |
| [radiansToDegrees](doc/radians-to-degrees.md) | [jvm]<br>fun [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html).[radiansToDegrees](doc/radians-to-degrees.md)(): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Convert an angle expressed in radians to an angle expressed in degrees. |
| [refractionAngle](doc/refraction-angle.md) | [jvm]<br>fun [refractionAngle](doc/refraction-angle.md)(refraction: [Refraction](doc/-refraction/index.md), altitude: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Calculates the amount of "lift" to an altitude angle caused by atmospheric refraction. |
| [rotationAxis](doc/rotation-axis.md) | [jvm]<br>fun [rotationAxis](doc/rotation-axis.md)(body: [Body](doc/-body/index.md), time: [AstroTime](doc/-astro-time/index.md)): [AxisInfo](doc/-axis-info/index.md)<br>Calculates information about a body's rotation axis at a given time. |
| [rotationEclEqd](doc/rotation-ecl-eqd.md) | [jvm]<br>fun [rotationEclEqd](doc/rotation-ecl-eqd.md)(time: [AstroTime](doc/-astro-time/index.md)): [RotationMatrix](doc/-rotation-matrix/index.md)<br>Calculates a rotation matrix from ecliptic J2000 (ECL) to equatorial of-date (EQD). |
| [rotationEclEqj](doc/rotation-ecl-eqj.md) | [jvm]<br>fun [rotationEclEqj](doc/rotation-ecl-eqj.md)(): [RotationMatrix](doc/-rotation-matrix/index.md)<br>Calculates a rotation matrix from ecliptic J2000 (ECL) to equatorial J2000 (EQJ). |
| [rotationEclHor](doc/rotation-ecl-hor.md) | [jvm]<br>fun [rotationEclHor](doc/rotation-ecl-hor.md)(time: [AstroTime](doc/-astro-time/index.md), observer: [Observer](doc/-observer/index.md)): [RotationMatrix](doc/-rotation-matrix/index.md)<br>Calculates a rotation matrix from ecliptic J2000 (ECL) to horizontal (HOR). |
| [rotationEqdEcl](doc/rotation-eqd-ecl.md) | [jvm]<br>fun [rotationEqdEcl](doc/rotation-eqd-ecl.md)(time: [AstroTime](doc/-astro-time/index.md)): [RotationMatrix](doc/-rotation-matrix/index.md)<br>Calculates a rotation matrix from equatorial of-date (EQD) to ecliptic J2000 (ECL). |
| [rotationEqdEqj](doc/rotation-eqd-eqj.md) | [jvm]<br>fun [rotationEqdEqj](doc/rotation-eqd-eqj.md)(time: [AstroTime](doc/-astro-time/index.md)): [RotationMatrix](doc/-rotation-matrix/index.md)<br>Calculates a rotation matrix from equatorial of-date (EQD) to equatorial J2000 (EQJ). |
| [rotationEqdHor](doc/rotation-eqd-hor.md) | [jvm]<br>fun [rotationEqdHor](doc/rotation-eqd-hor.md)(time: [AstroTime](doc/-astro-time/index.md), observer: [Observer](doc/-observer/index.md)): [RotationMatrix](doc/-rotation-matrix/index.md)<br>Calculates a rotation matrix from equatorial of-date (EQD) to horizontal (HOR). |
| [rotationEqjEcl](doc/rotation-eqj-ecl.md) | [jvm]<br>fun [rotationEqjEcl](doc/rotation-eqj-ecl.md)(): [RotationMatrix](doc/-rotation-matrix/index.md)<br>Calculates a rotation matrix from equatorial J2000 (EQJ) to ecliptic J2000 (ECL). |
| [rotationEqjEqd](doc/rotation-eqj-eqd.md) | [jvm]<br>fun [rotationEqjEqd](doc/rotation-eqj-eqd.md)(time: [AstroTime](doc/-astro-time/index.md)): [RotationMatrix](doc/-rotation-matrix/index.md)<br>Calculates a rotation matrix from equatorial J2000 (EQJ) to equatorial of-date (EQD). |
| [rotationEqjGal](doc/rotation-eqj-gal.md) | [jvm]<br>fun [rotationEqjGal](doc/rotation-eqj-gal.md)(): [RotationMatrix](doc/-rotation-matrix/index.md)<br>Calculates a rotation matrix from galactic (GAL) to equatorial J2000 (EQJ). |
| [rotationEqjHor](doc/rotation-eqj-hor.md) | [jvm]<br>fun [rotationEqjHor](doc/rotation-eqj-hor.md)(time: [AstroTime](doc/-astro-time/index.md), observer: [Observer](doc/-observer/index.md)): [RotationMatrix](doc/-rotation-matrix/index.md)<br>Calculates a rotation matrix from equatorial J2000 (EQJ) to horizontal (HOR). |
| [rotationGalEqj](doc/rotation-gal-eqj.md) | [jvm]<br>fun [rotationGalEqj](doc/rotation-gal-eqj.md)(): [RotationMatrix](doc/-rotation-matrix/index.md)<br>Calculates a rotation matrix from galactic (GAL) to equatorial J2000 (EQJ). |
| [rotationHorEcl](doc/rotation-hor-ecl.md) | [jvm]<br>fun [rotationHorEcl](doc/rotation-hor-ecl.md)(time: [AstroTime](doc/-astro-time/index.md), observer: [Observer](doc/-observer/index.md)): [RotationMatrix](doc/-rotation-matrix/index.md)<br>Calculates a rotation matrix from horizontal (HOR) to ecliptic J2000 (ECL). |
| [rotationHorEqd](doc/rotation-hor-eqd.md) | [jvm]<br>fun [rotationHorEqd](doc/rotation-hor-eqd.md)(time: [AstroTime](doc/-astro-time/index.md), observer: [Observer](doc/-observer/index.md)): [RotationMatrix](doc/-rotation-matrix/index.md)<br>Calculates a rotation matrix from horizontal (HOR) to equatorial of-date (EQD). |
| [rotationHorEqj](doc/rotation-hor-eqj.md) | [jvm]<br>fun [rotationHorEqj](doc/rotation-hor-eqj.md)(time: [AstroTime](doc/-astro-time/index.md), observer: [Observer](doc/-observer/index.md)): [RotationMatrix](doc/-rotation-matrix/index.md)<br>Calculates a rotation matrix from horizontal (HOR) to J2000 equatorial (EQJ). This is one of the family of functions that returns a rotation matrix for converting from one orientation to another. Source: HOR = horizontal system (x=North, y=West, z=Zenith). Target: EQJ = equatorial system, using equator at the J2000 epoch. |
| [search](doc/search.md) | [jvm]<br>fun [search](doc/search.md)(func: [SearchContext](doc/-search-context/index.md), time1: [AstroTime](doc/-astro-time/index.md), time2: [AstroTime](doc/-astro-time/index.md), toleranceSeconds: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](doc/-astro-time/index.md)?<br>Searches for a time at which a function's value increases through zero. |
| [searchAltitude](doc/search-altitude.md) | [jvm]<br>fun [searchAltitude](doc/search-altitude.md)(body: [Body](doc/-body/index.md), observer: [Observer](doc/-observer/index.md), direction: [Direction](doc/-direction/index.md), startTime: [AstroTime](doc/-astro-time/index.md), limitDays: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), altitude: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](doc/-astro-time/index.md)?<br>Finds the next time a body reaches a given altitude. |
| [searchHourAngle](doc/search-hour-angle.md) | [jvm]<br>fun [searchHourAngle](doc/search-hour-angle.md)(body: [Body](doc/-body/index.md), observer: [Observer](doc/-observer/index.md), hourAngle: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), startTime: [AstroTime](doc/-astro-time/index.md)): [HourAngleInfo](doc/-hour-angle-info/index.md)<br>Searches for the time when a celestial body reaches a specified hour angle as seen by an observer on the Earth. |
| [searchMoonPhase](doc/search-moon-phase.md) | [jvm]<br>fun [searchMoonPhase](doc/search-moon-phase.md)(targetLon: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), startTime: [AstroTime](doc/-astro-time/index.md), limitDays: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](doc/-astro-time/index.md)?<br>Searches for the time that the Moon reaches a specified phase. |
| [searchMoonQuarter](doc/search-moon-quarter.md) | [jvm]<br>fun [searchMoonQuarter](doc/search-moon-quarter.md)(startTime: [AstroTime](doc/-astro-time/index.md)): [MoonQuarterInfo](doc/-moon-quarter-info/index.md)<br>Finds the first lunar quarter after the specified date and time. A lunar quarter is one of the following four lunar phase events: new moon, first quarter, full moon, third quarter. This function finds the lunar quarter that happens soonest after the specified date and time. |
| [searchRiseSet](doc/search-rise-set.md) | [jvm]<br>fun [searchRiseSet](doc/search-rise-set.md)(body: [Body](doc/-body/index.md), observer: [Observer](doc/-observer/index.md), direction: [Direction](doc/-direction/index.md), startTime: [AstroTime](doc/-astro-time/index.md), limitDays: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](doc/-astro-time/index.md)?<br>Searches for the next time a celestial body rises or sets as seen by an observer on the Earth. |
| [searchSunLongitude](doc/search-sun-longitude.md) | [jvm]<br>fun [searchSunLongitude](doc/search-sun-longitude.md)(targetLon: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), startTime: [AstroTime](doc/-astro-time/index.md), limitDays: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](doc/-astro-time/index.md)?<br>Searches for the time when the Sun reaches an apparent ecliptic longitude as seen from the Earth. |
| [seasons](doc/seasons.md) | [jvm]<br>fun [seasons](doc/seasons.md)(year: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)): [SeasonsInfo](doc/-seasons-info/index.md)<br>Finds both equinoxes and both solstices for a given calendar year. |
| [siderealTime](doc/sidereal-time.md) | [jvm]<br>fun [siderealTime](doc/sidereal-time.md)(time: [AstroTime](doc/-astro-time/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Calculates Greenwich Apparent Sidereal Time (GAST). |
| [sunPosition](doc/sun-position.md) | [jvm]<br>fun [sunPosition](doc/sun-position.md)(time: [AstroTime](doc/-astro-time/index.md)): [Ecliptic](doc/-ecliptic/index.md)<br>Calculates geocentric ecliptic coordinates for the Sun. |
| [times](doc/times.md) | [jvm]<br>operator fun [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html).[times](doc/times.md)(vec: [AstroVector](doc/-astro-vector/index.md)): [AstroVector](doc/-astro-vector/index.md)<br>Multiply a scalar by a vector, yielding another vector. |
## Properties

View File

@@ -11,7 +11,7 @@ For the Moon orbiting the Earth, or a planet orbiting the Sun, an *apsis* is an
More specific terminology is common for particular orbiting bodies. The Moon's closest approach to the Earth is called *perigee* and its farthest point is called *apogee*. The closest approach of a planet to the Sun is called *perihelion* and the furthest point is called *aphelion*.
This data structure is returned by Astronomy.searchLunarApsis and Astronomy.nextLunarApsis to iterate through consecutive alternating perigees and apogees.
This data structure is returned by searchLunarApsis and nextLunarApsis to iterate through consecutive alternating perigees and apogees.
## Constructors

View File

@@ -1,30 +0,0 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[horizon](horizon.md)
# horizon
[jvm]\
fun [horizon](horizon.md)(time: [AstroTime](../-astro-time/index.md), observer: [Observer](../-observer/index.md), ra: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), dec: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), refraction: [Refraction](../-refraction/index.md)): [Topocentric](../-topocentric/index.md)
Calculates the apparent location of a body relative to the local horizon of an observer on the Earth.
Given a date and time, the geographic location of an observer on the Earth, and equatorial coordinates (right ascension and declination) of a celestial body, this function returns horizontal coordinates (azimuth and altitude angles) for the body relative to the horizon at the geographic location.
The right ascension ra and declination dec passed in must be *equator of date* coordinates, based on the Earth's true equator at the date and time of the observation. Otherwise the resulting horizontal coordinates will be inaccurate. Equator of date coordinates can be obtained by calling [Astronomy.equator](equator.md), passing in [EquatorEpoch.OfDate](../-equator-epoch/-of-date/index.md) as its equdate parameter. It is also recommended to enable aberration correction by passing in [Aberration.Corrected](../-aberration/-corrected/index.md) as the aberration parameter.
This function optionally corrects for atmospheric refraction. For most uses, it is recommended to pass [Refraction.Normal](../-refraction/-normal/index.md) in the refraction parameter to correct for optical lensing of the Earth's atmosphere that causes objects to appear somewhat higher above the horizon than they actually are. However, callers may choose to avoid this correction by passing in [Refraction.None](../-refraction/-none/index.md). If refraction correction is enabled, the azimuth, altitude, right ascension, and declination in the [Topocentric](../-topocentric/index.md) object returned by this function will all be corrected for refraction. If refraction is disabled, none of these four coordinates will be corrected; in that case, the right ascension and declination in the returned structure will be numerically identical to the respective ra and dec values passed in.
#### Return
The body's apparent horizontal coordinates and equatorial coordinates, both optionally corrected for refraction.
## Parameters
jvm
| | |
|---|---|
| time | The date and time of the observation. |
| observer | The geographic location of the observer. |
| ra | The right ascension of the body in sidereal hours. See remarks above for more details. |
| dec | The declination of the body in degrees. See remarks above for more details. |
| refraction | Selects whether to correct for atmospheric refraction, and if so, which model to use. The recommended value for most uses is `Refraction.Normal`. See remarks above for more details. |

View File

@@ -1,57 +0,0 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)
# Astronomy
[jvm]\
object [Astronomy](index.md)
The main container of astronomy calculation functions.
## Functions
| Name | Summary |
|---|---|
| [constellation](constellation.md) | [jvm]<br>fun [constellation](constellation.md)(ra: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), dec: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [ConstellationInfo](../-constellation-info/index.md)<br>Determines the constellation that contains the given point in the sky. |
| [eclipticGeoMoon](ecliptic-geo-moon.md) | [jvm]<br>fun [eclipticGeoMoon](ecliptic-geo-moon.md)(time: [AstroTime](../-astro-time/index.md)): [Spherical](../-spherical/index.md)<br>Calculates spherical ecliptic geocentric position of the Moon. |
| [equator](equator.md) | [jvm]<br>fun [equator](equator.md)(body: [Body](../-body/index.md), time: [AstroTime](../-astro-time/index.md), observer: [Observer](../-observer/index.md), equdate: [EquatorEpoch](../-equator-epoch/index.md), aberration: [Aberration](../-aberration/index.md)): [Equatorial](../-equatorial/index.md)<br>Calculates equatorial coordinates of a celestial body as seen by an observer on the Earth's surface. |
| [equatorFromVector](equator-from-vector.md) | [jvm]<br>fun [equatorFromVector](equator-from-vector.md)(vector: [AstroVector](../-astro-vector/index.md)): [Equatorial](../-equatorial/index.md)<br>Given an equatorial vector, calculates equatorial angular coordinates. |
| [equatorialToEcliptic](equatorial-to-ecliptic.md) | [jvm]<br>fun [equatorialToEcliptic](equatorial-to-ecliptic.md)(equ: [AstroVector](../-astro-vector/index.md)): [Ecliptic](../-ecliptic/index.md)<br>Converts J2000 equatorial Cartesian coordinates to J2000 ecliptic coordinates. |
| [geoMoon](geo-moon.md) | [jvm]<br>fun [geoMoon](geo-moon.md)(time: [AstroTime](../-astro-time/index.md)): [AstroVector](../-astro-vector/index.md)<br>Calculates equatorial geocentric position of the Moon at a given time. |
| [geoMoonState](geo-moon-state.md) | [jvm]<br>fun [geoMoonState](geo-moon-state.md)(time: [AstroTime](../-astro-time/index.md)): [StateVector](../-state-vector/index.md)<br>Calculates equatorial geocentric position and velocity of the Moon at a given time. |
| [geoVector](geo-vector.md) | [jvm]<br>fun [geoVector](geo-vector.md)(body: [Body](../-body/index.md), time: [AstroTime](../-astro-time/index.md), aberration: [Aberration](../-aberration/index.md)): [AstroVector](../-astro-vector/index.md)<br>Calculates geocentric Cartesian coordinates of a body in the J2000 equatorial system. |
| [helioDistance](helio-distance.md) | [jvm]<br>fun [helioDistance](helio-distance.md)(body: [Body](../-body/index.md), time: [AstroTime](../-astro-time/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Calculates the distance between a body and the Sun at a given time. |
| [helioState](helio-state.md) | [jvm]<br>fun [helioState](helio-state.md)(body: [Body](../-body/index.md), time: [AstroTime](../-astro-time/index.md)): [StateVector](../-state-vector/index.md)<br>Calculates heliocentric position and velocity vectors for the given body. |
| [helioVector](helio-vector.md) | [jvm]<br>fun [helioVector](helio-vector.md)(body: [Body](../-body/index.md), time: [AstroTime](../-astro-time/index.md)): [AstroVector](../-astro-vector/index.md)<br>Calculates heliocentric Cartesian coordinates of a body in the J2000 equatorial system. |
| [horizon](horizon.md) | [jvm]<br>fun [horizon](horizon.md)(time: [AstroTime](../-astro-time/index.md), observer: [Observer](../-observer/index.md), ra: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), dec: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), refraction: [Refraction](../-refraction/index.md)): [Topocentric](../-topocentric/index.md)<br>Calculates the apparent location of a body relative to the local horizon of an observer on the Earth. |
| [inverseRefractionAngle](inverse-refraction-angle.md) | [jvm]<br>fun [inverseRefractionAngle](inverse-refraction-angle.md)(refraction: [Refraction](../-refraction/index.md), bentAltitude: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Calculates the inverse of an atmospheric refraction angle. |
| [jupiterMoons](jupiter-moons.md) | [jvm]<br>fun [jupiterMoons](jupiter-moons.md)(time: [AstroTime](../-astro-time/index.md)): [JupiterMoonsInfo](../-jupiter-moons-info/index.md)<br>Calculates jovicentric positions and velocities of Jupiter's largest 4 moons. |
| [massProduct](mass-product.md) | [jvm]<br>fun [massProduct](mass-product.md)(body: [Body](../-body/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Returns the product of mass and universal gravitational constant of a Solar System body. |
| [moonPhase](moon-phase.md) | [jvm]<br>fun [moonPhase](moon-phase.md)(time: [AstroTime](../-astro-time/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Returns the Moon's phase as an angle from 0 to 360 degrees. |
| [nextMoonQuarter](next-moon-quarter.md) | [jvm]<br>fun [nextMoonQuarter](next-moon-quarter.md)(mq: [MoonQuarterInfo](../-moon-quarter-info/index.md)): [MoonQuarterInfo](../-moon-quarter-info/index.md)<br>Continues searching for lunar quarters from a previous search. |
| [pairLongitude](pair-longitude.md) | [jvm]<br>fun [pairLongitude](pair-longitude.md)(body1: [Body](../-body/index.md), body2: [Body](../-body/index.md), time: [AstroTime](../-astro-time/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Returns one body's ecliptic longitude with respect to another, as seen from the Earth. |
| [refractionAngle](refraction-angle.md) | [jvm]<br>fun [refractionAngle](refraction-angle.md)(refraction: [Refraction](../-refraction/index.md), altitude: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Calculates the amount of "lift" to an altitude angle caused by atmospheric refraction. |
| [rotationAxis](rotation-axis.md) | [jvm]<br>fun [rotationAxis](rotation-axis.md)(body: [Body](../-body/index.md), time: [AstroTime](../-astro-time/index.md)): [AxisInfo](../-axis-info/index.md)<br>Calculates information about a body's rotation axis at a given time. |
| [rotationEclEqd](rotation-ecl-eqd.md) | [jvm]<br>fun [rotationEclEqd](rotation-ecl-eqd.md)(time: [AstroTime](../-astro-time/index.md)): [RotationMatrix](../-rotation-matrix/index.md)<br>Calculates a rotation matrix from ecliptic J2000 (ECL) to equatorial of-date (EQD). |
| [rotationEclEqj](rotation-ecl-eqj.md) | [jvm]<br>fun [rotationEclEqj](rotation-ecl-eqj.md)(): [RotationMatrix](../-rotation-matrix/index.md)<br>Calculates a rotation matrix from ecliptic J2000 (ECL) to equatorial J2000 (EQJ). |
| [rotationEclHor](rotation-ecl-hor.md) | [jvm]<br>fun [rotationEclHor](rotation-ecl-hor.md)(time: [AstroTime](../-astro-time/index.md), observer: [Observer](../-observer/index.md)): [RotationMatrix](../-rotation-matrix/index.md)<br>Calculates a rotation matrix from ecliptic J2000 (ECL) to horizontal (HOR). |
| [rotationEqdEcl](rotation-eqd-ecl.md) | [jvm]<br>fun [rotationEqdEcl](rotation-eqd-ecl.md)(time: [AstroTime](../-astro-time/index.md)): [RotationMatrix](../-rotation-matrix/index.md)<br>Calculates a rotation matrix from equatorial of-date (EQD) to ecliptic J2000 (ECL). |
| [rotationEqdEqj](rotation-eqd-eqj.md) | [jvm]<br>fun [rotationEqdEqj](rotation-eqd-eqj.md)(time: [AstroTime](../-astro-time/index.md)): [RotationMatrix](../-rotation-matrix/index.md)<br>Calculates a rotation matrix from equatorial of-date (EQD) to equatorial J2000 (EQJ). |
| [rotationEqdHor](rotation-eqd-hor.md) | [jvm]<br>fun [rotationEqdHor](rotation-eqd-hor.md)(time: [AstroTime](../-astro-time/index.md), observer: [Observer](../-observer/index.md)): [RotationMatrix](../-rotation-matrix/index.md)<br>Calculates a rotation matrix from equatorial of-date (EQD) to horizontal (HOR). |
| [rotationEqjEcl](rotation-eqj-ecl.md) | [jvm]<br>fun [rotationEqjEcl](rotation-eqj-ecl.md)(): [RotationMatrix](../-rotation-matrix/index.md)<br>Calculates a rotation matrix from equatorial J2000 (EQJ) to ecliptic J2000 (ECL). |
| [rotationEqjEqd](rotation-eqj-eqd.md) | [jvm]<br>fun [rotationEqjEqd](rotation-eqj-eqd.md)(time: [AstroTime](../-astro-time/index.md)): [RotationMatrix](../-rotation-matrix/index.md)<br>Calculates a rotation matrix from equatorial J2000 (EQJ) to equatorial of-date (EQD). |
| [rotationEqjGal](rotation-eqj-gal.md) | [jvm]<br>fun [rotationEqjGal](rotation-eqj-gal.md)(): [RotationMatrix](../-rotation-matrix/index.md)<br>Calculates a rotation matrix from galactic (GAL) to equatorial J2000 (EQJ). |
| [rotationEqjHor](rotation-eqj-hor.md) | [jvm]<br>fun [rotationEqjHor](rotation-eqj-hor.md)(time: [AstroTime](../-astro-time/index.md), observer: [Observer](../-observer/index.md)): [RotationMatrix](../-rotation-matrix/index.md)<br>Calculates a rotation matrix from equatorial J2000 (EQJ) to horizontal (HOR). |
| [rotationGalEqj](rotation-gal-eqj.md) | [jvm]<br>fun [rotationGalEqj](rotation-gal-eqj.md)(): [RotationMatrix](../-rotation-matrix/index.md)<br>Calculates a rotation matrix from galactic (GAL) to equatorial J2000 (EQJ). |
| [rotationHorEcl](rotation-hor-ecl.md) | [jvm]<br>fun [rotationHorEcl](rotation-hor-ecl.md)(time: [AstroTime](../-astro-time/index.md), observer: [Observer](../-observer/index.md)): [RotationMatrix](../-rotation-matrix/index.md)<br>Calculates a rotation matrix from horizontal (HOR) to ecliptic J2000 (ECL). |
| [rotationHorEqd](rotation-hor-eqd.md) | [jvm]<br>fun [rotationHorEqd](rotation-hor-eqd.md)(time: [AstroTime](../-astro-time/index.md), observer: [Observer](../-observer/index.md)): [RotationMatrix](../-rotation-matrix/index.md)<br>Calculates a rotation matrix from horizontal (HOR) to equatorial of-date (EQD). |
| [rotationHorEqj](rotation-hor-eqj.md) | [jvm]<br>fun [rotationHorEqj](rotation-hor-eqj.md)(time: [AstroTime](../-astro-time/index.md), observer: [Observer](../-observer/index.md)): [RotationMatrix](../-rotation-matrix/index.md)<br>Calculates a rotation matrix from horizontal (HOR) to J2000 equatorial (EQJ). This is one of the family of functions that returns a rotation matrix for converting from one orientation to another. Source: HOR = horizontal system (x=North, y=West, z=Zenith). Target: EQJ = equatorial system, using equator at the J2000 epoch. |
| [search](search.md) | [jvm]<br>fun [search](search.md)(func: [SearchContext](../-search-context/index.md), time1: [AstroTime](../-astro-time/index.md), time2: [AstroTime](../-astro-time/index.md), toleranceSeconds: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](../-astro-time/index.md)?<br>Searches for a time at which a function's value increases through zero. |
| [searchAltitude](search-altitude.md) | [jvm]<br>fun [searchAltitude](search-altitude.md)(body: [Body](../-body/index.md), observer: [Observer](../-observer/index.md), direction: [Direction](../-direction/index.md), startTime: [AstroTime](../-astro-time/index.md), limitDays: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), altitude: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](../-astro-time/index.md)?<br>Finds the next time a body reaches a given altitude. |
| [searchHourAngle](search-hour-angle.md) | [jvm]<br>fun [searchHourAngle](search-hour-angle.md)(body: [Body](../-body/index.md), observer: [Observer](../-observer/index.md), hourAngle: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), startTime: [AstroTime](../-astro-time/index.md)): [HourAngleInfo](../-hour-angle-info/index.md)<br>Searches for the time when a celestial body reaches a specified hour angle as seen by an observer on the Earth. |
| [searchMoonPhase](search-moon-phase.md) | [jvm]<br>fun [searchMoonPhase](search-moon-phase.md)(targetLon: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), startTime: [AstroTime](../-astro-time/index.md), limitDays: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](../-astro-time/index.md)?<br>Searches for the time that the Moon reaches a specified phase. |
| [searchMoonQuarter](search-moon-quarter.md) | [jvm]<br>fun [searchMoonQuarter](search-moon-quarter.md)(startTime: [AstroTime](../-astro-time/index.md)): [MoonQuarterInfo](../-moon-quarter-info/index.md)<br>Finds the first lunar quarter after the specified date and time. A lunar quarter is one of the following four lunar phase events: new moon, first quarter, full moon, third quarter. This function finds the lunar quarter that happens soonest after the specified date and time. |
| [searchRiseSet](search-rise-set.md) | [jvm]<br>fun [searchRiseSet](search-rise-set.md)(body: [Body](../-body/index.md), observer: [Observer](../-observer/index.md), direction: [Direction](../-direction/index.md), startTime: [AstroTime](../-astro-time/index.md), limitDays: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](../-astro-time/index.md)?<br>Searches for the next time a celestial body rises or sets as seen by an observer on the Earth. |
| [searchSunLongitude](search-sun-longitude.md) | [jvm]<br>fun [searchSunLongitude](search-sun-longitude.md)(targetLon: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), startTime: [AstroTime](../-astro-time/index.md), limitDays: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](../-astro-time/index.md)?<br>Searches for the time when the Sun reaches an apparent ecliptic longitude as seen from the Earth. |
| [seasons](seasons.md) | [jvm]<br>fun [seasons](seasons.md)(year: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)): [SeasonsInfo](../-seasons-info/index.md)<br>Finds both equinoxes and both solstices for a given calendar year. |
| [siderealTime](sidereal-time.md) | [jvm]<br>fun [siderealTime](sidereal-time.md)(time: [AstroTime](../-astro-time/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Calculates Greenwich Apparent Sidereal Time (GAST). |
| [sunPosition](sun-position.md) | [jvm]<br>fun [sunPosition](sun-position.md)(time: [AstroTime](../-astro-time/index.md)): [Ecliptic](../-ecliptic/index.md)<br>Calculates geocentric ecliptic coordinates for the Sun. |

View File

@@ -1,12 +0,0 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[jupiterMoons](jupiter-moons.md)
# jupiterMoons
[jvm]\
fun [jupiterMoons](jupiter-moons.md)(time: [AstroTime](../-astro-time/index.md)): [JupiterMoonsInfo](../-jupiter-moons-info/index.md)
Calculates jovicentric positions and velocities of Jupiter's largest 4 moons.
Calculates position and velocity vectors for Jupiter's moons Io, Europa, Ganymede, and Callisto, at the given date and time. The vectors are jovicentric (relative to the center of Jupiter). Their orientation is the Earth's equatorial system at the J2000 epoch (EQJ). The position components are expressed in astronomical units (AU), and the velocity components are in AU/day.
To convert to heliocentric position vectors, call [Astronomy.helioVector](helio-vector.md) with Body.Jupiter to get Jupiter's heliocentric position, then add the jovicentric positions. Likewise, you can call [Astronomy.geoVector](geo-vector.md) to convert to geocentric positions; however, you will have to manually correct for light travel time from the Jupiter system to Earth to figure out what time to pass to jupiterMoons to get an accurate picture of how Jupiter and its moons look from Earth.

View File

@@ -1,22 +0,0 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[nextMoonQuarter](next-moon-quarter.md)
# nextMoonQuarter
[jvm]\
fun [nextMoonQuarter](next-moon-quarter.md)(mq: [MoonQuarterInfo](../-moon-quarter-info/index.md)): [MoonQuarterInfo](../-moon-quarter-info/index.md)
Continues searching for lunar quarters from a previous search.
After calling [Astronomy.searchMoonQuarter](search-moon-quarter.md), this function can be called one or more times to continue finding consecutive lunar quarters. This function finds the next consecutive moon quarter event after the one passed in as the parameter mq.
#### Return
The moon quarter that occurs next in time after the one passed in mq.
## Parameters
jvm
| | |
|---|---|
| The | previous moon quarter found by a call to [Astronomy.searchMoonQuarter](search-moon-quarter.md) or Astronomy.nextMoonQuarter. |

View File

@@ -7,7 +7,7 @@ class [AxisInfo](index.md)(ra: [Double](https://kotlinlang.org/api/latest/jvm/st
Information about a body's rotation axis at a given time.
This structure is returned by [Astronomy.rotationAxis](../-astronomy/rotation-axis.md) to report the orientation of a body's rotation axis at a given moment in time. The axis is specified by the direction in space that the body's north pole points, using angular equatorial coordinates in the J2000 system (EQJ).
This structure is returned by [rotationAxis](../rotation-axis.md) to report the orientation of a body's rotation axis at a given moment in time. The axis is specified by the direction in space that the body's north pole points, using angular equatorial coordinates in the J2000 system (EQJ).
Thus ra is the right ascension, and dec is the declination, of the body's north pole vector at the given moment in time. The north pole of a body is defined as the pole that lies on the north side of the [Solar System's invariable plane](https://en.wikipedia.org/wiki/Invariable_plane), regardless of the body's direction of rotation.

View File

@@ -7,7 +7,7 @@ class [ConstellationInfo](index.md)(symbol: [String](https://kotlinlang.org/api/
Reports the constellation that a given celestial point lies within.
The [Astronomy.constellation](../-astronomy/constellation.md) function returns this object to report which constellation corresponds with a given point in the sky. Constellations are defined with respect to the B1875 equatorial system per IAU standard. Although Astronomy.constellation requires J2000 equatorial coordinates, ConstellationInfo contains converted B1875 coordinates for reference.
The [constellation](../constellation.md) function returns this object to report which constellation corresponds with a given point in the sky. Constellations are defined with respect to the B1875 equatorial system per IAU standard. Although constellation requires J2000 equatorial coordinates, ConstellationInfo contains converted B1875 coordinates for reference.
## Constructors

View File

@@ -7,7 +7,7 @@ class [ElongationInfo](index.md)(time: [AstroTime](../-astro-time/index.md), vis
Contains information about the visibility of a celestial body at a given date and time.
See Astronomy.elongation for more detailed information about the members of this class. See also Astronomy.searchMaxElongation for how to search for maximum elongation events.
See [elongation](elongation.md) for more detailed information about the members of this class. See also searchMaxElongation for how to search for maximum elongation events.
## Constructors

View File

@@ -7,7 +7,7 @@ class [GlobalSolarEclipseInfo](index.md)(kind: [EclipseKind](../-eclipse-kind/in
Reports the time and geographic location of the peak of a solar eclipse.
Returned by Astronomy.searchGlobalSolarEclipse or Astronomy.nextGlobalSolarEclipse to report information about a solar eclipse event.
Returned by searchGlobalSolarEclipse or nextGlobalSolarEclipse to report information about a solar eclipse event.
The eclipse is classified as partial, annular, or total, depending on the maximum amount of the Sun's disc obscured, as seen at the peak location on the surface of the Earth.

View File

@@ -7,7 +7,7 @@ class [HourAngleInfo](index.md)(time: [AstroTime](../-astro-time/index.md), hor:
Information about a celestial body crossing a specific hour angle.
Returned by the function [Astronomy.searchHourAngle](../-astronomy/search-hour-angle.md) to report information about a celestial body crossing a certain hour angle as seen by a specified topocentric observer.
Returned by the function [searchHourAngle](../search-hour-angle.md) to report information about a celestial body crossing a certain hour angle as seen by a specified topocentric observer.
## Constructors

View File

@@ -7,7 +7,7 @@ class [IlluminationInfo](index.md)(time: [AstroTime](../-astro-time/index.md), m
Information about the brightness and illuminated shape of a celestial body.
Returned by the functions Astronomy.illumination and Astronomy.searchPeakMagnitude to report the visual magnitude and illuminated fraction of a celestial body at a given date and time.
Returned by the functions illumination and searchPeakMagnitude to report the visual magnitude and illuminated fraction of a celestial body at a given date and time.
## Constructors

View File

@@ -7,7 +7,7 @@ class [JupiterMoonsInfo](index.md)(moon: [Array](https://kotlinlang.org/api/late
Holds the positions and velocities of Jupiter's major 4 moons.
The [Astronomy.jupiterMoons](../-astronomy/jupiter-moons.md) function returns an object of this type to report position and velocity vectors for Jupiter's largest 4 moons Io, Europa, Ganymede, and Callisto. Each position vector is relative to the center of Jupiter. Both position and velocity are oriented in the EQJ system (that is, using Earth's equator at the J2000 epoch). The positions are expressed in astronomical units (AU), and the velocities in AU/day.
The [jupiterMoons](../jupiter-moons.md) function returns an object of this type to report position and velocity vectors for Jupiter's largest 4 moons Io, Europa, Ganymede, and Callisto. Each position vector is relative to the center of Jupiter. Both position and velocity are oriented in the EQJ system (that is, using Earth's equator at the J2000 epoch). The positions are expressed in astronomical units (AU), and the velocities in AU/day.
## Constructors

View File

@@ -5,7 +5,7 @@
[jvm]\
data class [LibrationInfo](index.md)(elat: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), elon: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), mlat: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), mlon: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), distKm: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), diamDeg: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html))
Lunar libration angles, returned by Astronomy.libration.
Lunar libration angles, returned by libration.
## Constructors

View File

@@ -7,7 +7,7 @@ class [LocalSolarEclipseInfo](index.md)(kind: [EclipseKind](../-eclipse-kind/ind
Information about a solar eclipse as seen by an observer at a given time and geographic location.
Returned by Astronomy.searchLocalSolarEclipse or Astronomy.nextLocalSolarEclipse to report information about a solar eclipse as seen at a given geographic location.
Returned by searchLocalSolarEclipse or nextLocalSolarEclipse to report information about a solar eclipse as seen at a given geographic location.
When a solar eclipse is found, it is classified as partial, annular, or total. The kind field thus holds EclipseKind.Partial, EclipseKind.Annular, or EclipseKind.Total. A partial solar eclipse is when the Moon does not line up directly enough with the Sun to completely block the Sun's light from reaching the observer. An annular eclipse occurs when the Moon's disc is completely visible against the Sun but the Moon is too far away to completely block the Sun's light; this leaves the Sun with a ring-like appearance. A total eclipse occurs when the Moon is close enough to the Earth and aligned with the Sun just right to completely block all sunlight from reaching the observer.

View File

@@ -7,7 +7,7 @@ class [LunarEclipseInfo](index.md)(kind: [EclipseKind](../-eclipse-kind/index.md
Information about a lunar eclipse.
Returned by Astronomy.searchLunarEclipse or Astronomy.nextLunarEclipse to report information about a lunar eclipse event. When a lunar eclipse is found, it is classified as penumbral, partial, or total. Penumbral eclipses are difficult to observe, because the Moon is only slightly dimmed by the Earth's penumbra; no part of the Moon touches the Earth's umbra. Partial eclipses occur when part, but not all, of the Moon touches the Earth's umbra. Total eclipses occur when the entire Moon passes into the Earth's umbra.
Returned by searchLunarEclipse or nextLunarEclipse to report information about a lunar eclipse event. When a lunar eclipse is found, it is classified as penumbral, partial, or total. Penumbral eclipses are difficult to observe, because the Moon is only slightly dimmed by the Earth's penumbra; no part of the Moon touches the Earth's umbra. Partial eclipses occur when part, but not all, of the Moon touches the Earth's umbra. Total eclipses occur when the entire Moon passes into the Earth's umbra.
The kind field thus holds EclipseKind.Penumbral, EclipseKind.Partial, or EclipseKind.Total, depending on the kind of lunar eclipse found.

View File

@@ -7,7 +7,7 @@ class [NodeEventInfo](index.md)(time: [AstroTime](../-astro-time/index.md), kind
Information about an ascending or descending node of a body.
This object is returned by Astronomy.searchMoonNode and Astronomy.nextMoonNode to report information about the center of the Moon passing through the ecliptic plane.
This object is returned by searchMoonNode and nextMoonNode to report information about the center of the Moon passing through the ecliptic plane.
## Constructors

View File

@@ -7,7 +7,7 @@ interface [SearchContext](index.md)
Represents a function whose ascending root is to be found.
This interface must be implemented for callers of [Astronomy.search](../-astronomy/search.md) in order to find the ascending root of a smooth function. A class that implements SearchContext can hold state information needed to evaluate the scalar function eval.
This interface must be implemented for callers of [search](../search.md) in order to find the ascending root of a smooth function. A class that implements SearchContext can hold state information needed to evaluate the scalar function eval.
## Functions

View File

@@ -7,7 +7,7 @@ class [SeasonsInfo](index.md)(marchEquinox: [AstroTime](../-astro-time/index.md)
The dates and times of changes of season for a given calendar year.
Call [Astronomy.seasons](../-astronomy/seasons.md) to calculate this data structure for a given year.
Call [seasons](../seasons.md) to calculate this data structure for a given year.
## Constructors

View File

@@ -20,4 +20,4 @@ jvm
| | |
|---|---|
| time | The date and time of the observation. This is needed because the returned [AstroVector] requires a valid time value when passed to certain other functions. |
| refraction | The refraction option used to model atmospheric lensing. See [Astronomy.refractionAngle]. This specifies how refraction is to be removed from the altitude stored in `this.lat`. |
| refraction | The refraction option used to model atmospheric lensing. See [refractionAngle]. This specifies how refraction is to be removed from the altitude stored in `this.lat`. |

View File

@@ -7,7 +7,7 @@ class [TransitInfo](index.md)(start: [AstroTime](../-astro-time/index.md), peak:
Information about a transit of Mercury or Venus, as seen from the Earth.
Returned by Astronomy.searchTransit or Astronomy.nextTransit to report information about a transit of Mercury or Venus. A transit is when Mercury or Venus passes between the Sun and Earth so that the other planet is seen in silhouette against the Sun.
Returned by searchTransit or nextTransit to report information about a transit of Mercury or Venus. A transit is when Mercury or Venus passes between the Sun and Earth so that the other planet is seen in silhouette against the Sun.
The start field reports the moment in time when the planet first becomes visible against the Sun in its background. The peak field reports when the planet is most aligned with the Sun, as seen from the Earth. The finish field reports the last moment when the planet is visible against the Sun in its background.

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[constellation](constellation.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[constellation](constellation.md)
# constellation
[jvm]\
fun [constellation](constellation.md)(ra: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), dec: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [ConstellationInfo](../-constellation-info/index.md)
fun [constellation](constellation.md)(ra: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), dec: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [ConstellationInfo](-constellation-info/index.md)
Determines the constellation that contains the given point in the sky.

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[eclipticGeoMoon](ecliptic-geo-moon.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[eclipticGeoMoon](ecliptic-geo-moon.md)
# eclipticGeoMoon
[jvm]\
fun [eclipticGeoMoon](ecliptic-geo-moon.md)(time: [AstroTime](../-astro-time/index.md)): [Spherical](../-spherical/index.md)
fun [eclipticGeoMoon](ecliptic-geo-moon.md)(time: [AstroTime](-astro-time/index.md)): [Spherical](-spherical/index.md)
Calculates spherical ecliptic geocentric position of the Moon.
@@ -11,4 +11,4 @@ Given a time of observation, calculates the Moon's geocentric position in eclipt
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.
To calculate an equatorial J2000 vector instead, use [Astronomy.geoMoon](geo-moon.md).
To calculate an equatorial J2000 vector instead, use [geoMoon](geo-moon.md).

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[equatorFromVector](equator-from-vector.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[equatorFromVector](equator-from-vector.md)
# equatorFromVector
[jvm]\
fun [equatorFromVector](equator-from-vector.md)(vector: [AstroVector](../-astro-vector/index.md)): [Equatorial](../-equatorial/index.md)
fun [equatorFromVector](equator-from-vector.md)(vector: [AstroVector](-astro-vector/index.md)): [Equatorial](-equatorial/index.md)
Given an equatorial vector, calculates equatorial angular coordinates.

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[equator](equator.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[equator](equator.md)
# equator
[jvm]\
fun [equator](equator.md)(body: [Body](../-body/index.md), time: [AstroTime](../-astro-time/index.md), observer: [Observer](../-observer/index.md), equdate: [EquatorEpoch](../-equator-epoch/index.md), aberration: [Aberration](../-aberration/index.md)): [Equatorial](../-equatorial/index.md)
fun [equator](equator.md)(body: [Body](-body/index.md), time: [AstroTime](-astro-time/index.md), observer: [Observer](-observer/index.md), equdate: [EquatorEpoch](-equator-epoch/index.md), aberration: [Aberration](-aberration/index.md)): [Equatorial](-equatorial/index.md)
Calculates equatorial coordinates of a celestial body as seen by an observer on the Earth's surface.

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[equatorialToEcliptic](equatorial-to-ecliptic.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[equatorialToEcliptic](equatorial-to-ecliptic.md)
# equatorialToEcliptic
[jvm]\
fun [equatorialToEcliptic](equatorial-to-ecliptic.md)(equ: [AstroVector](../-astro-vector/index.md)): [Ecliptic](../-ecliptic/index.md)
fun [equatorialToEcliptic](equatorial-to-ecliptic.md)(equ: [AstroVector](-astro-vector/index.md)): [Ecliptic](-ecliptic/index.md)
Converts J2000 equatorial Cartesian coordinates to J2000 ecliptic coordinates.
@@ -19,4 +19,4 @@ jvm
| | |
|---|---|
| equ | Equatorial coordinates in the J2000 frame of reference. You can call [Astronomy.geoVector] to obtain suitable equatorial coordinates. |
| equ | Equatorial coordinates in the J2000 frame of reference. You can call [geoVector] to obtain suitable equatorial coordinates. |

View File

@@ -1,13 +1,13 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[geoMoonState](geo-moon-state.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[geoMoonState](geo-moon-state.md)
# geoMoonState
[jvm]\
fun [geoMoonState](geo-moon-state.md)(time: [AstroTime](../-astro-time/index.md)): [StateVector](../-state-vector/index.md)
fun [geoMoonState](geo-moon-state.md)(time: [AstroTime](-astro-time/index.md)): [StateVector](-state-vector/index.md)
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](geo-moon.md) instead.
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](geo-moon.md) instead.
#### Return

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[geoMoon](geo-moon.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[geoMoon](geo-moon.md)
# geoMoon
[jvm]\
fun [geoMoon](geo-moon.md)(time: [AstroTime](../-astro-time/index.md)): [AstroVector](../-astro-vector/index.md)
fun [geoMoon](geo-moon.md)(time: [AstroTime](-astro-time/index.md)): [AstroVector](-astro-vector/index.md)
Calculates equatorial geocentric position of the Moon at a given time.

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[geoVector](geo-vector.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[geoVector](geo-vector.md)
# geoVector
[jvm]\
fun [geoVector](geo-vector.md)(body: [Body](../-body/index.md), time: [AstroTime](../-astro-time/index.md), aberration: [Aberration](../-aberration/index.md)): [AstroVector](../-astro-vector/index.md)
fun [geoVector](geo-vector.md)(body: [Body](-body/index.md), time: [AstroTime](-astro-time/index.md), aberration: [Aberration](-aberration/index.md)): [AstroVector](-astro-vector/index.md)
Calculates geocentric Cartesian coordinates of a body in the J2000 equatorial system.
@@ -11,7 +11,7 @@ This function calculates the position of the given celestial body as a vector, u
If given an invalid value for body, this function will throw an exception.
Unlike [Astronomy.helioVector](helio-vector.md), this function always corrects for light travel time. This means the position of the body is "back-dated" by the amount of time it takes light to travel from that body to an observer on the Earth.
Unlike [helioVector](helio-vector.md), this function always corrects for light travel time. This means the position of the body is "back-dated" by the amount of time it takes light to travel from that body to an observer on the Earth.
Also, the position can optionally be corrected for [aberration](https://en.wikipedia.org/wiki/Aberration_of_light), an effect causing the apparent direction of the body to be shifted due to transverse movement of the Earth with respect to the rays of light coming from that body.

View File

@@ -1,13 +1,13 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[helioDistance](helio-distance.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[helioDistance](helio-distance.md)
# helioDistance
[jvm]\
fun [helioDistance](helio-distance.md)(body: [Body](../-body/index.md), time: [AstroTime](../-astro-time/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)
fun [helioDistance](helio-distance.md)(body: [Body](-body/index.md), time: [AstroTime](-astro-time/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)
Calculates the distance between a body and the Sun at a given time.
Given a date and time, this function calculates the distance between the center of body and the center of the Sun, expressed in AU. For the planets Mercury through Neptune, this function is significantly more efficient than calling [Astronomy.helioVector](helio-vector.md) followed by taking the length of the resulting vector.
Given a date and time, this function calculates the distance between the center of body and the center of the Sun, expressed in AU. For the planets Mercury through Neptune, this function is significantly more efficient than calling [helioVector](helio-vector.md) followed by taking the length of the resulting vector.
#### Return

View File

@@ -1,13 +1,13 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[helioState](helio-state.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[helioState](helio-state.md)
# helioState
[jvm]\
fun [helioState](helio-state.md)(body: [Body](../-body/index.md), time: [AstroTime](../-astro-time/index.md)): [StateVector](../-state-vector/index.md)
fun [helioState](helio-state.md)(body: [Body](-body/index.md), time: [AstroTime](-astro-time/index.md)): [StateVector](-state-vector/index.md)
Calculates heliocentric position and velocity vectors for the given body.
Given a body and a time, calculates the position and velocity vectors for the center of that body at that time, relative to the center of the Sun. The vectors are expressed in equatorial J2000 coordinates (EQJ). If you need the position vector only, it is more efficient to call [Astronomy.helioVector](helio-vector.md). The Sun's center is a non-inertial frame of reference. In other words, the Sun experiences acceleration due to gravitational forces, mostly from the larger planets (Jupiter, Saturn, Uranus, and Neptune). If you want to calculate momentum, kinetic energy, or other quantities that require a non-accelerating frame of reference, consider using Astronomy.baryState instead.
Given a body and a time, calculates the position and velocity vectors for the center of that body at that time, relative to the center of the Sun. The vectors are expressed in equatorial J2000 coordinates (EQJ). If you need the position vector only, it is more efficient to call [helioVector](helio-vector.md). The Sun's center is a non-inertial frame of reference. In other words, the Sun experiences acceleration due to gravitational forces, mostly from the larger planets (Jupiter, Saturn, Uranus, and Neptune). If you want to calculate momentum, kinetic energy, or other quantities that require a non-accelerating frame of reference, consider using baryState instead.
#### Return

View File

@@ -1,17 +1,17 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[helioVector](helio-vector.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[helioVector](helio-vector.md)
# helioVector
[jvm]\
fun [helioVector](helio-vector.md)(body: [Body](../-body/index.md), time: [AstroTime](../-astro-time/index.md)): [AstroVector](../-astro-vector/index.md)
fun [helioVector](helio-vector.md)(body: [Body](-body/index.md), time: [AstroTime](-astro-time/index.md)): [AstroVector](-astro-vector/index.md)
Calculates heliocentric Cartesian coordinates of a body in the J2000 equatorial system.
This function calculates the position of the given celestial body as a vector, using the center of the Sun as the origin. The result is expressed as a Cartesian vector in the J2000 equatorial system: the coordinates are based on the mean equator of the Earth at noon UTC on 1 January 2000.
The position is not corrected for light travel time or aberration. This is different from the behavior of [Astronomy.geoVector](geo-vector.md).
The position is not corrected for light travel time or aberration. This is different from the behavior of [geoVector](geo-vector.md).
If given an invalid value for body, this function will throw an [InvalidBodyException](../-invalid-body-exception/index.md).
If given an invalid value for body, this function will throw an [InvalidBodyException](-invalid-body-exception/index.md).
#### Return

View File

@@ -0,0 +1,30 @@
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[horizon](horizon.md)
# horizon
[jvm]\
fun [horizon](horizon.md)(time: [AstroTime](-astro-time/index.md), observer: [Observer](-observer/index.md), ra: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), dec: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), refraction: [Refraction](-refraction/index.md)): [Topocentric](-topocentric/index.md)
Calculates the apparent location of a body relative to the local horizon of an observer on the Earth.
Given a date and time, the geographic location of an observer on the Earth, and equatorial coordinates (right ascension and declination) of a celestial body, this function returns horizontal coordinates (azimuth and altitude angles) for the body relative to the horizon at the geographic location.
The right ascension ra and declination dec passed in must be *equator of date* coordinates, based on the Earth's true equator at the date and time of the observation. Otherwise the resulting horizontal coordinates will be inaccurate. Equator of date coordinates can be obtained by calling [equator](equator.md), passing in [EquatorEpoch.OfDate](-equator-epoch/-of-date/index.md) as its equdate parameter. It is also recommended to enable aberration correction by passing in [Aberration.Corrected](-aberration/-corrected/index.md) as the aberration parameter.
This function optionally corrects for atmospheric refraction. For most uses, it is recommended to pass [Refraction.Normal](-refraction/-normal/index.md) in the refraction parameter to correct for optical lensing of the Earth's atmosphere that causes objects to appear somewhat higher above the horizon than they actually are. However, callers may choose to avoid this correction by passing in [Refraction.None](-refraction/-none/index.md). If refraction correction is enabled, the azimuth, altitude, right ascension, and declination in the [Topocentric](-topocentric/index.md) object returned by this function will all be corrected for refraction. If refraction is disabled, none of these four coordinates will be corrected; in that case, the right ascension and declination in the returned structure will be numerically identical to the respective ra and dec values passed in.
#### Return
The body's apparent horizontal coordinates and equatorial coordinates, both optionally corrected for refraction.
## Parameters
jvm
| | |
|---|---|
| time | The date and time of the observation. |
| observer | The geographic location of the observer. |
| ra | The right ascension of the body in sidereal hours. See remarks above for more details. |
| dec | The declination of the body in degrees. See remarks above for more details. |
| refraction | Selects whether to correct for atmospheric refraction, and if so, which model to use. The recommended value for most uses is `Refraction.Normal`. See remarks above for more details. |

View File

@@ -9,7 +9,6 @@
| [Aberration](-aberration/index.md) | [jvm]<br>enum [Aberration](-aberration/index.md) : [Enum](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html)&lt;[Aberration](-aberration/index.md)&gt; <br>Aberration calculation options. |
| [ApsisInfo](-apsis-info/index.md) | [jvm]<br>class [ApsisInfo](-apsis-info/index.md)(time: [AstroTime](-astro-time/index.md), kind: [ApsisKind](-apsis-kind/index.md), distAu: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), distKm: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html))<br>An apsis event: pericenter (closest approach) or apocenter (farthest distance). |
| [ApsisKind](-apsis-kind/index.md) | [jvm]<br>enum [ApsisKind](-apsis-kind/index.md) : [Enum](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html)&lt;[ApsisKind](-apsis-kind/index.md)&gt; <br>The type of apsis: pericenter (closest approach) or apocenter (farthest distance). |
| [Astronomy](-astronomy/index.md) | [jvm]<br>object [Astronomy](-astronomy/index.md)<br>The main container of astronomy calculation functions. |
| [AstroTime](-astro-time/index.md) | [jvm]<br>class [AstroTime](-astro-time/index.md)<br>A date and time used for astronomical calculations. |
| [AstroVector](-astro-vector/index.md) | [jvm]<br>data class [AstroVector](-astro-vector/index.md)(x: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), y: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), z: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), t: [AstroTime](-astro-time/index.md))<br>A 3D Cartesian vector whose components are expressed in Astronomical Units (AU). |
| [AxisInfo](-axis-info/index.md) | [jvm]<br>class [AxisInfo](-axis-info/index.md)(ra: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), dec: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), spin: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), north: [AstroVector](-astro-vector/index.md))<br>Information about a body's rotation axis at a given time. |
@@ -29,7 +28,7 @@
| [InternalError](-internal-error/index.md) | [jvm]<br>class [InternalError](-internal-error/index.md)(message: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)) : [Exception](https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html)<br>An unexpected internal error occurred in Astronomy Engine |
| [InvalidBodyException](-invalid-body-exception/index.md) | [jvm]<br>class [InvalidBodyException](-invalid-body-exception/index.md)(body: [Body](-body/index.md)) : [Exception](https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html)<br>An invalid body was specified for the given function. |
| [JupiterMoonsInfo](-jupiter-moons-info/index.md) | [jvm]<br>class [JupiterMoonsInfo](-jupiter-moons-info/index.md)(moon: [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)&lt;[StateVector](-state-vector/index.md)&gt;)<br>Holds the positions and velocities of Jupiter's major 4 moons. |
| [LibrationInfo](-libration-info/index.md) | [jvm]<br>data class [LibrationInfo](-libration-info/index.md)(elat: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), elon: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), mlat: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), mlon: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), distKm: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), diamDeg: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html))<br>Lunar libration angles, returned by Astronomy.libration. |
| [LibrationInfo](-libration-info/index.md) | [jvm]<br>data class [LibrationInfo](-libration-info/index.md)(elat: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), elon: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), mlat: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), mlon: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), distKm: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), diamDeg: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html))<br>Lunar libration angles, returned by libration. |
| [LocalSolarEclipseInfo](-local-solar-eclipse-info/index.md) | [jvm]<br>class [LocalSolarEclipseInfo](-local-solar-eclipse-info/index.md)(kind: [EclipseKind](-eclipse-kind/index.md), partialBegin: [EclipseEvent](-eclipse-event/index.md), totalBegin: [EclipseEvent](-eclipse-event/index.md), peak: [EclipseEvent](-eclipse-event/index.md), totalEnd: [EclipseEvent](-eclipse-event/index.md), partialEnd: [EclipseEvent](-eclipse-event/index.md))<br>Information about a solar eclipse as seen by an observer at a given time and geographic location. |
| [LunarEclipseInfo](-lunar-eclipse-info/index.md) | [jvm]<br>class [LunarEclipseInfo](-lunar-eclipse-info/index.md)(kind: [EclipseKind](-eclipse-kind/index.md), peak: [AstroTime](-astro-time/index.md), sdPenum: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), sdPartial: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), sdTotal: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html))<br>Information about a lunar eclipse. |
| [MoonQuarterInfo](-moon-quarter-info/index.md) | [jvm]<br>class [MoonQuarterInfo](-moon-quarter-info/index.md)(quarter: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html), time: [AstroTime](-astro-time/index.md))<br>A lunar quarter event (new moon, first quarter, full moon, or third quarter) along with its date and time. |
@@ -50,8 +49,52 @@
| Name | Summary |
|---|---|
| [constellation](constellation.md) | [jvm]<br>fun [constellation](constellation.md)(ra: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), dec: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [ConstellationInfo](-constellation-info/index.md)<br>Determines the constellation that contains the given point in the sky. |
| [degreesToRadians](degrees-to-radians.md) | [jvm]<br>fun [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html).[degreesToRadians](degrees-to-radians.md)(): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Convert an angle expressed in degrees to an angle expressed in radians. |
| [eclipticGeoMoon](ecliptic-geo-moon.md) | [jvm]<br>fun [eclipticGeoMoon](ecliptic-geo-moon.md)(time: [AstroTime](-astro-time/index.md)): [Spherical](-spherical/index.md)<br>Calculates spherical ecliptic geocentric position of the Moon. |
| [equator](equator.md) | [jvm]<br>fun [equator](equator.md)(body: [Body](-body/index.md), time: [AstroTime](-astro-time/index.md), observer: [Observer](-observer/index.md), equdate: [EquatorEpoch](-equator-epoch/index.md), aberration: [Aberration](-aberration/index.md)): [Equatorial](-equatorial/index.md)<br>Calculates equatorial coordinates of a celestial body as seen by an observer on the Earth's surface. |
| [equatorFromVector](equator-from-vector.md) | [jvm]<br>fun [equatorFromVector](equator-from-vector.md)(vector: [AstroVector](-astro-vector/index.md)): [Equatorial](-equatorial/index.md)<br>Given an equatorial vector, calculates equatorial angular coordinates. |
| [equatorialToEcliptic](equatorial-to-ecliptic.md) | [jvm]<br>fun [equatorialToEcliptic](equatorial-to-ecliptic.md)(equ: [AstroVector](-astro-vector/index.md)): [Ecliptic](-ecliptic/index.md)<br>Converts J2000 equatorial Cartesian coordinates to J2000 ecliptic coordinates. |
| [geoMoon](geo-moon.md) | [jvm]<br>fun [geoMoon](geo-moon.md)(time: [AstroTime](-astro-time/index.md)): [AstroVector](-astro-vector/index.md)<br>Calculates equatorial geocentric position of the Moon at a given time. |
| [geoMoonState](geo-moon-state.md) | [jvm]<br>fun [geoMoonState](geo-moon-state.md)(time: [AstroTime](-astro-time/index.md)): [StateVector](-state-vector/index.md)<br>Calculates equatorial geocentric position and velocity of the Moon at a given time. |
| [geoVector](geo-vector.md) | [jvm]<br>fun [geoVector](geo-vector.md)(body: [Body](-body/index.md), time: [AstroTime](-astro-time/index.md), aberration: [Aberration](-aberration/index.md)): [AstroVector](-astro-vector/index.md)<br>Calculates geocentric Cartesian coordinates of a body in the J2000 equatorial system. |
| [helioDistance](helio-distance.md) | [jvm]<br>fun [helioDistance](helio-distance.md)(body: [Body](-body/index.md), time: [AstroTime](-astro-time/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Calculates the distance between a body and the Sun at a given time. |
| [helioState](helio-state.md) | [jvm]<br>fun [helioState](helio-state.md)(body: [Body](-body/index.md), time: [AstroTime](-astro-time/index.md)): [StateVector](-state-vector/index.md)<br>Calculates heliocentric position and velocity vectors for the given body. |
| [helioVector](helio-vector.md) | [jvm]<br>fun [helioVector](helio-vector.md)(body: [Body](-body/index.md), time: [AstroTime](-astro-time/index.md)): [AstroVector](-astro-vector/index.md)<br>Calculates heliocentric Cartesian coordinates of a body in the J2000 equatorial system. |
| [horizon](horizon.md) | [jvm]<br>fun [horizon](horizon.md)(time: [AstroTime](-astro-time/index.md), observer: [Observer](-observer/index.md), ra: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), dec: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), refraction: [Refraction](-refraction/index.md)): [Topocentric](-topocentric/index.md)<br>Calculates the apparent location of a body relative to the local horizon of an observer on the Earth. |
| [inverseRefractionAngle](inverse-refraction-angle.md) | [jvm]<br>fun [inverseRefractionAngle](inverse-refraction-angle.md)(refraction: [Refraction](-refraction/index.md), bentAltitude: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Calculates the inverse of an atmospheric refraction angle. |
| [jupiterMoons](jupiter-moons.md) | [jvm]<br>fun [jupiterMoons](jupiter-moons.md)(time: [AstroTime](-astro-time/index.md)): [JupiterMoonsInfo](-jupiter-moons-info/index.md)<br>Calculates jovicentric positions and velocities of Jupiter's largest 4 moons. |
| [massProduct](mass-product.md) | [jvm]<br>fun [massProduct](mass-product.md)(body: [Body](-body/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Returns the product of mass and universal gravitational constant of a Solar System body. |
| [moonPhase](moon-phase.md) | [jvm]<br>fun [moonPhase](moon-phase.md)(time: [AstroTime](-astro-time/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Returns the Moon's phase as an angle from 0 to 360 degrees. |
| [nextMoonQuarter](next-moon-quarter.md) | [jvm]<br>fun [nextMoonQuarter](next-moon-quarter.md)(mq: [MoonQuarterInfo](-moon-quarter-info/index.md)): [MoonQuarterInfo](-moon-quarter-info/index.md)<br>Continues searching for lunar quarters from a previous search. |
| [pairLongitude](pair-longitude.md) | [jvm]<br>fun [pairLongitude](pair-longitude.md)(body1: [Body](-body/index.md), body2: [Body](-body/index.md), time: [AstroTime](-astro-time/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Returns one body's ecliptic longitude with respect to another, as seen from the Earth. |
| [radiansToDegrees](radians-to-degrees.md) | [jvm]<br>fun [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html).[radiansToDegrees](radians-to-degrees.md)(): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Convert an angle expressed in radians to an angle expressed in degrees. |
| [refractionAngle](refraction-angle.md) | [jvm]<br>fun [refractionAngle](refraction-angle.md)(refraction: [Refraction](-refraction/index.md), altitude: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Calculates the amount of "lift" to an altitude angle caused by atmospheric refraction. |
| [rotationAxis](rotation-axis.md) | [jvm]<br>fun [rotationAxis](rotation-axis.md)(body: [Body](-body/index.md), time: [AstroTime](-astro-time/index.md)): [AxisInfo](-axis-info/index.md)<br>Calculates information about a body's rotation axis at a given time. |
| [rotationEclEqd](rotation-ecl-eqd.md) | [jvm]<br>fun [rotationEclEqd](rotation-ecl-eqd.md)(time: [AstroTime](-astro-time/index.md)): [RotationMatrix](-rotation-matrix/index.md)<br>Calculates a rotation matrix from ecliptic J2000 (ECL) to equatorial of-date (EQD). |
| [rotationEclEqj](rotation-ecl-eqj.md) | [jvm]<br>fun [rotationEclEqj](rotation-ecl-eqj.md)(): [RotationMatrix](-rotation-matrix/index.md)<br>Calculates a rotation matrix from ecliptic J2000 (ECL) to equatorial J2000 (EQJ). |
| [rotationEclHor](rotation-ecl-hor.md) | [jvm]<br>fun [rotationEclHor](rotation-ecl-hor.md)(time: [AstroTime](-astro-time/index.md), observer: [Observer](-observer/index.md)): [RotationMatrix](-rotation-matrix/index.md)<br>Calculates a rotation matrix from ecliptic J2000 (ECL) to horizontal (HOR). |
| [rotationEqdEcl](rotation-eqd-ecl.md) | [jvm]<br>fun [rotationEqdEcl](rotation-eqd-ecl.md)(time: [AstroTime](-astro-time/index.md)): [RotationMatrix](-rotation-matrix/index.md)<br>Calculates a rotation matrix from equatorial of-date (EQD) to ecliptic J2000 (ECL). |
| [rotationEqdEqj](rotation-eqd-eqj.md) | [jvm]<br>fun [rotationEqdEqj](rotation-eqd-eqj.md)(time: [AstroTime](-astro-time/index.md)): [RotationMatrix](-rotation-matrix/index.md)<br>Calculates a rotation matrix from equatorial of-date (EQD) to equatorial J2000 (EQJ). |
| [rotationEqdHor](rotation-eqd-hor.md) | [jvm]<br>fun [rotationEqdHor](rotation-eqd-hor.md)(time: [AstroTime](-astro-time/index.md), observer: [Observer](-observer/index.md)): [RotationMatrix](-rotation-matrix/index.md)<br>Calculates a rotation matrix from equatorial of-date (EQD) to horizontal (HOR). |
| [rotationEqjEcl](rotation-eqj-ecl.md) | [jvm]<br>fun [rotationEqjEcl](rotation-eqj-ecl.md)(): [RotationMatrix](-rotation-matrix/index.md)<br>Calculates a rotation matrix from equatorial J2000 (EQJ) to ecliptic J2000 (ECL). |
| [rotationEqjEqd](rotation-eqj-eqd.md) | [jvm]<br>fun [rotationEqjEqd](rotation-eqj-eqd.md)(time: [AstroTime](-astro-time/index.md)): [RotationMatrix](-rotation-matrix/index.md)<br>Calculates a rotation matrix from equatorial J2000 (EQJ) to equatorial of-date (EQD). |
| [rotationEqjGal](rotation-eqj-gal.md) | [jvm]<br>fun [rotationEqjGal](rotation-eqj-gal.md)(): [RotationMatrix](-rotation-matrix/index.md)<br>Calculates a rotation matrix from galactic (GAL) to equatorial J2000 (EQJ). |
| [rotationEqjHor](rotation-eqj-hor.md) | [jvm]<br>fun [rotationEqjHor](rotation-eqj-hor.md)(time: [AstroTime](-astro-time/index.md), observer: [Observer](-observer/index.md)): [RotationMatrix](-rotation-matrix/index.md)<br>Calculates a rotation matrix from equatorial J2000 (EQJ) to horizontal (HOR). |
| [rotationGalEqj](rotation-gal-eqj.md) | [jvm]<br>fun [rotationGalEqj](rotation-gal-eqj.md)(): [RotationMatrix](-rotation-matrix/index.md)<br>Calculates a rotation matrix from galactic (GAL) to equatorial J2000 (EQJ). |
| [rotationHorEcl](rotation-hor-ecl.md) | [jvm]<br>fun [rotationHorEcl](rotation-hor-ecl.md)(time: [AstroTime](-astro-time/index.md), observer: [Observer](-observer/index.md)): [RotationMatrix](-rotation-matrix/index.md)<br>Calculates a rotation matrix from horizontal (HOR) to ecliptic J2000 (ECL). |
| [rotationHorEqd](rotation-hor-eqd.md) | [jvm]<br>fun [rotationHorEqd](rotation-hor-eqd.md)(time: [AstroTime](-astro-time/index.md), observer: [Observer](-observer/index.md)): [RotationMatrix](-rotation-matrix/index.md)<br>Calculates a rotation matrix from horizontal (HOR) to equatorial of-date (EQD). |
| [rotationHorEqj](rotation-hor-eqj.md) | [jvm]<br>fun [rotationHorEqj](rotation-hor-eqj.md)(time: [AstroTime](-astro-time/index.md), observer: [Observer](-observer/index.md)): [RotationMatrix](-rotation-matrix/index.md)<br>Calculates a rotation matrix from horizontal (HOR) to J2000 equatorial (EQJ). This is one of the family of functions that returns a rotation matrix for converting from one orientation to another. Source: HOR = horizontal system (x=North, y=West, z=Zenith). Target: EQJ = equatorial system, using equator at the J2000 epoch. |
| [search](search.md) | [jvm]<br>fun [search](search.md)(func: [SearchContext](-search-context/index.md), time1: [AstroTime](-astro-time/index.md), time2: [AstroTime](-astro-time/index.md), toleranceSeconds: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](-astro-time/index.md)?<br>Searches for a time at which a function's value increases through zero. |
| [searchAltitude](search-altitude.md) | [jvm]<br>fun [searchAltitude](search-altitude.md)(body: [Body](-body/index.md), observer: [Observer](-observer/index.md), direction: [Direction](-direction/index.md), startTime: [AstroTime](-astro-time/index.md), limitDays: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), altitude: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](-astro-time/index.md)?<br>Finds the next time a body reaches a given altitude. |
| [searchHourAngle](search-hour-angle.md) | [jvm]<br>fun [searchHourAngle](search-hour-angle.md)(body: [Body](-body/index.md), observer: [Observer](-observer/index.md), hourAngle: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), startTime: [AstroTime](-astro-time/index.md)): [HourAngleInfo](-hour-angle-info/index.md)<br>Searches for the time when a celestial body reaches a specified hour angle as seen by an observer on the Earth. |
| [searchMoonPhase](search-moon-phase.md) | [jvm]<br>fun [searchMoonPhase](search-moon-phase.md)(targetLon: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), startTime: [AstroTime](-astro-time/index.md), limitDays: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](-astro-time/index.md)?<br>Searches for the time that the Moon reaches a specified phase. |
| [searchMoonQuarter](search-moon-quarter.md) | [jvm]<br>fun [searchMoonQuarter](search-moon-quarter.md)(startTime: [AstroTime](-astro-time/index.md)): [MoonQuarterInfo](-moon-quarter-info/index.md)<br>Finds the first lunar quarter after the specified date and time. A lunar quarter is one of the following four lunar phase events: new moon, first quarter, full moon, third quarter. This function finds the lunar quarter that happens soonest after the specified date and time. |
| [searchRiseSet](search-rise-set.md) | [jvm]<br>fun [searchRiseSet](search-rise-set.md)(body: [Body](-body/index.md), observer: [Observer](-observer/index.md), direction: [Direction](-direction/index.md), startTime: [AstroTime](-astro-time/index.md), limitDays: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](-astro-time/index.md)?<br>Searches for the next time a celestial body rises or sets as seen by an observer on the Earth. |
| [searchSunLongitude](search-sun-longitude.md) | [jvm]<br>fun [searchSunLongitude](search-sun-longitude.md)(targetLon: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), startTime: [AstroTime](-astro-time/index.md), limitDays: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](-astro-time/index.md)?<br>Searches for the time when the Sun reaches an apparent ecliptic longitude as seen from the Earth. |
| [seasons](seasons.md) | [jvm]<br>fun [seasons](seasons.md)(year: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)): [SeasonsInfo](-seasons-info/index.md)<br>Finds both equinoxes and both solstices for a given calendar year. |
| [siderealTime](sidereal-time.md) | [jvm]<br>fun [siderealTime](sidereal-time.md)(time: [AstroTime](-astro-time/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Calculates Greenwich Apparent Sidereal Time (GAST). |
| [sunPosition](sun-position.md) | [jvm]<br>fun [sunPosition](sun-position.md)(time: [AstroTime](-astro-time/index.md)): [Ecliptic](-ecliptic/index.md)<br>Calculates geocentric ecliptic coordinates for the Sun. |
| [times](times.md) | [jvm]<br>operator fun [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html).[times](times.md)(vec: [AstroVector](-astro-vector/index.md)): [AstroVector](-astro-vector/index.md)<br>Multiply a scalar by a vector, yielding another vector. |
## Properties

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[inverseRefractionAngle](inverse-refraction-angle.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[inverseRefractionAngle](inverse-refraction-angle.md)
# inverseRefractionAngle
[jvm]\
fun [inverseRefractionAngle](inverse-refraction-angle.md)(refraction: [Refraction](../-refraction/index.md), bentAltitude: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)
fun [inverseRefractionAngle](inverse-refraction-angle.md)(refraction: [Refraction](-refraction/index.md), bentAltitude: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)
Calculates the inverse of an atmospheric refraction angle.

View File

@@ -0,0 +1,12 @@
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[jupiterMoons](jupiter-moons.md)
# jupiterMoons
[jvm]\
fun [jupiterMoons](jupiter-moons.md)(time: [AstroTime](-astro-time/index.md)): [JupiterMoonsInfo](-jupiter-moons-info/index.md)
Calculates jovicentric positions and velocities of Jupiter's largest 4 moons.
Calculates position and velocity vectors for Jupiter's moons Io, Europa, Ganymede, and Callisto, at the given date and time. The vectors are jovicentric (relative to the center of Jupiter). Their orientation is the Earth's equatorial system at the J2000 epoch (EQJ). The position components are expressed in astronomical units (AU), and the velocity components are in AU/day.
To convert to heliocentric position vectors, call [helioVector](helio-vector.md) with Body.Jupiter to get Jupiter's heliocentric position, then add the jovicentric positions. Likewise, you can call [geoVector](geo-vector.md) to convert to geocentric positions; however, you will have to manually correct for light travel time from the Jupiter system to Earth to figure out what time to pass to jupiterMoons to get an accurate picture of how Jupiter and its moons look from Earth.

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[massProduct](mass-product.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[massProduct](mass-product.md)
# massProduct
[jvm]\
fun [massProduct](mass-product.md)(body: [Body](../-body/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)
fun [massProduct](mass-product.md)(body: [Body](-body/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)
Returns the product of mass and universal gravitational constant of a Solar System body.

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[moonPhase](moon-phase.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[moonPhase](moon-phase.md)
# moonPhase
[jvm]\
fun [moonPhase](moon-phase.md)(time: [AstroTime](../-astro-time/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)
fun [moonPhase](moon-phase.md)(time: [AstroTime](-astro-time/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)
Returns the Moon's phase as an angle from 0 to 360 degrees.

View File

@@ -0,0 +1,22 @@
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[nextMoonQuarter](next-moon-quarter.md)
# nextMoonQuarter
[jvm]\
fun [nextMoonQuarter](next-moon-quarter.md)(mq: [MoonQuarterInfo](-moon-quarter-info/index.md)): [MoonQuarterInfo](-moon-quarter-info/index.md)
Continues searching for lunar quarters from a previous search.
After calling [searchMoonQuarter](search-moon-quarter.md), this function can be called one or more times to continue finding consecutive lunar quarters. This function finds the next consecutive moon quarter event after the one passed in as the parameter mq.
#### Return
The moon quarter that occurs next in time after the one passed in mq.
## Parameters
jvm
| | |
|---|---|
| The | previous moon quarter found by a call to [searchMoonQuarter](search-moon-quarter.md) or nextMoonQuarter. |

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[pairLongitude](pair-longitude.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[pairLongitude](pair-longitude.md)
# pairLongitude
[jvm]\
fun [pairLongitude](pair-longitude.md)(body1: [Body](../-body/index.md), body2: [Body](../-body/index.md), time: [AstroTime](../-astro-time/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)
fun [pairLongitude](pair-longitude.md)(body1: [Body](-body/index.md), body2: [Body](-body/index.md), time: [AstroTime](-astro-time/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)
Returns one body's ecliptic longitude with respect to another, as seen from the Earth.

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[refractionAngle](refraction-angle.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[refractionAngle](refraction-angle.md)
# refractionAngle
[jvm]\
fun [refractionAngle](refraction-angle.md)(refraction: [Refraction](../-refraction/index.md), altitude: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)
fun [refractionAngle](refraction-angle.md)(refraction: [Refraction](-refraction/index.md), altitude: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)
Calculates the amount of "lift" to an altitude angle caused by atmospheric refraction.

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[rotationAxis](rotation-axis.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[rotationAxis](rotation-axis.md)
# rotationAxis
[jvm]\
fun [rotationAxis](rotation-axis.md)(body: [Body](../-body/index.md), time: [AstroTime](../-astro-time/index.md)): [AxisInfo](../-axis-info/index.md)
fun [rotationAxis](rotation-axis.md)(body: [Body](-body/index.md), time: [AstroTime](-astro-time/index.md)): [AxisInfo](-axis-info/index.md)
Calculates information about a body's rotation axis at a given time.
@@ -13,7 +13,7 @@ This function uses formulas standardized by the IAU Working Group on Cartographi
https://astropedia.astrogeology.usgs.gov/download/Docs/WGCCRE/WGCCRE2015reprint.pdf
See [AxisInfo](../-axis-info/index.md) for more detailed information.
See [AxisInfo](-axis-info/index.md) for more detailed information.
#### Return

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[rotationEclEqd](rotation-ecl-eqd.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[rotationEclEqd](rotation-ecl-eqd.md)
# rotationEclEqd
[jvm]\
fun [rotationEclEqd](rotation-ecl-eqd.md)(time: [AstroTime](../-astro-time/index.md)): [RotationMatrix](../-rotation-matrix/index.md)
fun [rotationEclEqd](rotation-ecl-eqd.md)(time: [AstroTime](-astro-time/index.md)): [RotationMatrix](-rotation-matrix/index.md)
Calculates a rotation matrix from ecliptic J2000 (ECL) to equatorial of-date (EQD).

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[rotationEclEqj](rotation-ecl-eqj.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[rotationEclEqj](rotation-ecl-eqj.md)
# rotationEclEqj
[jvm]\
fun [rotationEclEqj](rotation-ecl-eqj.md)(): [RotationMatrix](../-rotation-matrix/index.md)
fun [rotationEclEqj](rotation-ecl-eqj.md)(): [RotationMatrix](-rotation-matrix/index.md)
Calculates a rotation matrix from ecliptic J2000 (ECL) to equatorial J2000 (EQJ).

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[rotationEclHor](rotation-ecl-hor.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[rotationEclHor](rotation-ecl-hor.md)
# rotationEclHor
[jvm]\
fun [rotationEclHor](rotation-ecl-hor.md)(time: [AstroTime](../-astro-time/index.md), observer: [Observer](../-observer/index.md)): [RotationMatrix](../-rotation-matrix/index.md)
fun [rotationEclHor](rotation-ecl-hor.md)(time: [AstroTime](-astro-time/index.md), observer: [Observer](-observer/index.md)): [RotationMatrix](-rotation-matrix/index.md)
Calculates a rotation matrix from ecliptic J2000 (ECL) to horizontal (HOR).

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[rotationEqdEcl](rotation-eqd-ecl.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[rotationEqdEcl](rotation-eqd-ecl.md)
# rotationEqdEcl
[jvm]\
fun [rotationEqdEcl](rotation-eqd-ecl.md)(time: [AstroTime](../-astro-time/index.md)): [RotationMatrix](../-rotation-matrix/index.md)
fun [rotationEqdEcl](rotation-eqd-ecl.md)(time: [AstroTime](-astro-time/index.md)): [RotationMatrix](-rotation-matrix/index.md)
Calculates a rotation matrix from equatorial of-date (EQD) to ecliptic J2000 (ECL).

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[rotationEqdEqj](rotation-eqd-eqj.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[rotationEqdEqj](rotation-eqd-eqj.md)
# rotationEqdEqj
[jvm]\
fun [rotationEqdEqj](rotation-eqd-eqj.md)(time: [AstroTime](../-astro-time/index.md)): [RotationMatrix](../-rotation-matrix/index.md)
fun [rotationEqdEqj](rotation-eqd-eqj.md)(time: [AstroTime](-astro-time/index.md)): [RotationMatrix](-rotation-matrix/index.md)
Calculates a rotation matrix from equatorial of-date (EQD) to equatorial J2000 (EQJ).

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[rotationEqdHor](rotation-eqd-hor.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[rotationEqdHor](rotation-eqd-hor.md)
# rotationEqdHor
[jvm]\
fun [rotationEqdHor](rotation-eqd-hor.md)(time: [AstroTime](../-astro-time/index.md), observer: [Observer](../-observer/index.md)): [RotationMatrix](../-rotation-matrix/index.md)
fun [rotationEqdHor](rotation-eqd-hor.md)(time: [AstroTime](-astro-time/index.md), observer: [Observer](-observer/index.md)): [RotationMatrix](-rotation-matrix/index.md)
Calculates a rotation matrix from equatorial of-date (EQD) to horizontal (HOR).

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[rotationEqjEcl](rotation-eqj-ecl.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[rotationEqjEcl](rotation-eqj-ecl.md)
# rotationEqjEcl
[jvm]\
fun [rotationEqjEcl](rotation-eqj-ecl.md)(): [RotationMatrix](../-rotation-matrix/index.md)
fun [rotationEqjEcl](rotation-eqj-ecl.md)(): [RotationMatrix](-rotation-matrix/index.md)
Calculates a rotation matrix from equatorial J2000 (EQJ) to ecliptic J2000 (ECL).

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[rotationEqjEqd](rotation-eqj-eqd.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[rotationEqjEqd](rotation-eqj-eqd.md)
# rotationEqjEqd
[jvm]\
fun [rotationEqjEqd](rotation-eqj-eqd.md)(time: [AstroTime](../-astro-time/index.md)): [RotationMatrix](../-rotation-matrix/index.md)
fun [rotationEqjEqd](rotation-eqj-eqd.md)(time: [AstroTime](-astro-time/index.md)): [RotationMatrix](-rotation-matrix/index.md)
Calculates a rotation matrix from equatorial J2000 (EQJ) to equatorial of-date (EQD).

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[rotationEqjGal](rotation-eqj-gal.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[rotationEqjGal](rotation-eqj-gal.md)
# rotationEqjGal
[jvm]\
fun [rotationEqjGal](rotation-eqj-gal.md)(): [RotationMatrix](../-rotation-matrix/index.md)
fun [rotationEqjGal](rotation-eqj-gal.md)(): [RotationMatrix](-rotation-matrix/index.md)
Calculates a rotation matrix from galactic (GAL) to equatorial J2000 (EQJ).

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[rotationEqjHor](rotation-eqj-hor.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[rotationEqjHor](rotation-eqj-hor.md)
# rotationEqjHor
[jvm]\
fun [rotationEqjHor](rotation-eqj-hor.md)(time: [AstroTime](../-astro-time/index.md), observer: [Observer](../-observer/index.md)): [RotationMatrix](../-rotation-matrix/index.md)
fun [rotationEqjHor](rotation-eqj-hor.md)(time: [AstroTime](-astro-time/index.md), observer: [Observer](-observer/index.md)): [RotationMatrix](-rotation-matrix/index.md)
Calculates a rotation matrix from equatorial J2000 (EQJ) to horizontal (HOR).

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[rotationGalEqj](rotation-gal-eqj.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[rotationGalEqj](rotation-gal-eqj.md)
# rotationGalEqj
[jvm]\
fun [rotationGalEqj](rotation-gal-eqj.md)(): [RotationMatrix](../-rotation-matrix/index.md)
fun [rotationGalEqj](rotation-gal-eqj.md)(): [RotationMatrix](-rotation-matrix/index.md)
Calculates a rotation matrix from galactic (GAL) to equatorial J2000 (EQJ).

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[rotationHorEcl](rotation-hor-ecl.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[rotationHorEcl](rotation-hor-ecl.md)
# rotationHorEcl
[jvm]\
fun [rotationHorEcl](rotation-hor-ecl.md)(time: [AstroTime](../-astro-time/index.md), observer: [Observer](../-observer/index.md)): [RotationMatrix](../-rotation-matrix/index.md)
fun [rotationHorEcl](rotation-hor-ecl.md)(time: [AstroTime](-astro-time/index.md), observer: [Observer](-observer/index.md)): [RotationMatrix](-rotation-matrix/index.md)
Calculates a rotation matrix from horizontal (HOR) to ecliptic J2000 (ECL).

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[rotationHorEqd](rotation-hor-eqd.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[rotationHorEqd](rotation-hor-eqd.md)
# rotationHorEqd
[jvm]\
fun [rotationHorEqd](rotation-hor-eqd.md)(time: [AstroTime](../-astro-time/index.md), observer: [Observer](../-observer/index.md)): [RotationMatrix](../-rotation-matrix/index.md)
fun [rotationHorEqd](rotation-hor-eqd.md)(time: [AstroTime](-astro-time/index.md), observer: [Observer](-observer/index.md)): [RotationMatrix](-rotation-matrix/index.md)
Calculates a rotation matrix from horizontal (HOR) to equatorial of-date (EQD).

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[rotationHorEqj](rotation-hor-eqj.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[rotationHorEqj](rotation-hor-eqj.md)
# rotationHorEqj
[jvm]\
fun [rotationHorEqj](rotation-hor-eqj.md)(time: [AstroTime](../-astro-time/index.md), observer: [Observer](../-observer/index.md)): [RotationMatrix](../-rotation-matrix/index.md)
fun [rotationHorEqj](rotation-hor-eqj.md)(time: [AstroTime](-astro-time/index.md), observer: [Observer](-observer/index.md)): [RotationMatrix](-rotation-matrix/index.md)
Calculates a rotation matrix from horizontal (HOR) to J2000 equatorial (EQJ). This is one of the family of functions that returns a rotation matrix for converting from one orientation to another. Source: HOR = horizontal system (x=North, y=West, z=Zenith). Target: EQJ = equatorial system, using equator at the J2000 epoch.

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[searchAltitude](search-altitude.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[searchAltitude](search-altitude.md)
# searchAltitude
[jvm]\
fun [searchAltitude](search-altitude.md)(body: [Body](../-body/index.md), observer: [Observer](../-observer/index.md), direction: [Direction](../-direction/index.md), startTime: [AstroTime](../-astro-time/index.md), limitDays: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), altitude: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](../-astro-time/index.md)?
fun [searchAltitude](search-altitude.md)(body: [Body](-body/index.md), observer: [Observer](-observer/index.md), direction: [Direction](-direction/index.md), startTime: [AstroTime](-astro-time/index.md), limitDays: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), altitude: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](-astro-time/index.md)?
Finds the next time a body reaches a given altitude.

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[searchHourAngle](search-hour-angle.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[searchHourAngle](search-hour-angle.md)
# searchHourAngle
[jvm]\
fun [searchHourAngle](search-hour-angle.md)(body: [Body](../-body/index.md), observer: [Observer](../-observer/index.md), hourAngle: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), startTime: [AstroTime](../-astro-time/index.md)): [HourAngleInfo](../-hour-angle-info/index.md)
fun [searchHourAngle](search-hour-angle.md)(body: [Body](-body/index.md), observer: [Observer](-observer/index.md), hourAngle: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), startTime: [AstroTime](-astro-time/index.md)): [HourAngleInfo](-hour-angle-info/index.md)
Searches for the time when a celestial body reaches a specified hour angle as seen by an observer on the Earth.

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[searchMoonPhase](search-moon-phase.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[searchMoonPhase](search-moon-phase.md)
# searchMoonPhase
[jvm]\
fun [searchMoonPhase](search-moon-phase.md)(targetLon: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), startTime: [AstroTime](../-astro-time/index.md), limitDays: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](../-astro-time/index.md)?
fun [searchMoonPhase](search-moon-phase.md)(targetLon: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), startTime: [AstroTime](-astro-time/index.md), limitDays: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](-astro-time/index.md)?
Searches for the time that the Moon reaches a specified phase.
@@ -11,7 +11,7 @@ Lunar phases are conventionally defined in terms of the Moon's geocentric eclipt
This function searches for any value of the lunar phase expressed as an angle in degrees in the range [0, 360).
If you want to iterate through lunar quarters (new moon, first quarter, full moon, third quarter) it is much easier to call the functions [Astronomy.searchMoonQuarter](search-moon-quarter.md) and [Astronomy.nextMoonQuarter](next-moon-quarter.md). This function is useful for finding general phase angles outside those four quarters.
If you want to iterate through lunar quarters (new moon, first quarter, full moon, third quarter) it is much easier to call the functions [searchMoonQuarter](search-moon-quarter.md) and [nextMoonQuarter](next-moon-quarter.md). This function is useful for finding general phase angles outside those four quarters.
#### Return

View File

@@ -1,17 +1,17 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[searchMoonQuarter](search-moon-quarter.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[searchMoonQuarter](search-moon-quarter.md)
# searchMoonQuarter
[jvm]\
fun [searchMoonQuarter](search-moon-quarter.md)(startTime: [AstroTime](../-astro-time/index.md)): [MoonQuarterInfo](../-moon-quarter-info/index.md)
fun [searchMoonQuarter](search-moon-quarter.md)(startTime: [AstroTime](-astro-time/index.md)): [MoonQuarterInfo](-moon-quarter-info/index.md)
Finds the first lunar quarter after the specified date and time. A lunar quarter is one of the following four lunar phase events: new moon, first quarter, full moon, third quarter. This function finds the lunar quarter that happens soonest after the specified date and time.
To continue iterating through consecutive lunar quarters, call this function once, followed by calls to #Astronomy.NextMoonQuarter as many times as desired.
To continue iterating through consecutive lunar quarters, call this function once, followed by calls to #NextMoonQuarter as many times as desired.
#### Return
A [MoonQuarterInfo](../-moon-quarter-info/index.md) object reporting the next quarter phase and the time it will occur.
A [MoonQuarterInfo](-moon-quarter-info/index.md) object reporting the next quarter phase and the time it will occur.
## Parameters

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[searchRiseSet](search-rise-set.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[searchRiseSet](search-rise-set.md)
# searchRiseSet
[jvm]\
fun [searchRiseSet](search-rise-set.md)(body: [Body](../-body/index.md), observer: [Observer](../-observer/index.md), direction: [Direction](../-direction/index.md), startTime: [AstroTime](../-astro-time/index.md), limitDays: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](../-astro-time/index.md)?
fun [searchRiseSet](search-rise-set.md)(body: [Body](-body/index.md), observer: [Observer](-observer/index.md), direction: [Direction](-direction/index.md), startTime: [AstroTime](-astro-time/index.md), limitDays: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](-astro-time/index.md)?
Searches for the next time a celestial body rises or sets as seen by an observer on the Earth.

View File

@@ -1,14 +1,14 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[searchSunLongitude](search-sun-longitude.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[searchSunLongitude](search-sun-longitude.md)
# searchSunLongitude
[jvm]\
fun [searchSunLongitude](search-sun-longitude.md)(targetLon: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), startTime: [AstroTime](../-astro-time/index.md), limitDays: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](../-astro-time/index.md)?
fun [searchSunLongitude](search-sun-longitude.md)(targetLon: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html), startTime: [AstroTime](-astro-time/index.md), limitDays: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](-astro-time/index.md)?
Searches for the time when the Sun reaches an apparent ecliptic longitude as seen from the Earth.
This function finds the moment in time, if any exists in the given time window, that the center of the Sun reaches a specific ecliptic longitude as seen from the center of the Earth.
This function can be used to determine equinoxes and solstices. However, it is usually more convenient and efficient to call [Astronomy.seasons](seasons.md) to calculate all equinoxes and solstices for a given calendar year.
This function can be used to determine equinoxes and solstices. However, it is usually more convenient and efficient to call [seasons](seasons.md) to calculate all equinoxes and solstices for a given calendar year.
The function searches the window of time specified by startTime and startTime+limitDays. The search will return null if the Sun never reaches the longitude targetLon or if the window is so large that the longitude ranges more than 180 degrees within it. It is recommended to keep the window smaller than 10 days when possible.

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[search](search.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[search](search.md)
# search
[jvm]\
fun [search](search.md)(func: [SearchContext](../-search-context/index.md), time1: [AstroTime](../-astro-time/index.md), time2: [AstroTime](../-astro-time/index.md), toleranceSeconds: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](../-astro-time/index.md)?
fun [search](search.md)(func: [SearchContext](-search-context/index.md), time1: [AstroTime](-astro-time/index.md), time2: [AstroTime](-astro-time/index.md), toleranceSeconds: [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)): [AstroTime](-astro-time/index.md)?
Searches for a time at which a function's value increases through zero.
@@ -11,7 +11,7 @@ Certain astronomy calculations involve finding a time when an event occurs. Ofte
search finds the *ascending root* of a function: the time at which the function's value becomes zero while having a positive slope. That is, as time increases, the function transitions from a negative value, through zero at a specific moment, to a positive value later. The goal of the search is to find that specific moment.
The func parameter is an instance of the interface [SearchContext](../-search-context/index.md). As an example, a caller may wish to find the moment a celestial body reaches a certain ecliptic longitude. In that case, the caller might derive a class that contains a [Body](../-body/index.md) member to specify the body and a Double to hold the target longitude. It could subtract the target longitude from the actual longitude at a given time; thus the difference would equal zero at the moment in time the planet reaches the desired longitude.
The func parameter is an instance of the interface [SearchContext](-search-context/index.md). As an example, a caller may wish to find the moment a celestial body reaches a certain ecliptic longitude. In that case, the caller might derive a class that contains a [Body](-body/index.md) member to specify the body and a Double to hold the target longitude. It could subtract the target longitude from the actual longitude at a given time; thus the difference would equal zero at the moment in time the planet reaches the desired longitude.
Every time it is called, func.eval returns a Double value or it throws an exception. If func.eval throws an exception, the search immediately fails and the exception is propagated to the caller. Otherwise, the search proceeds until it either finds the ascending root or fails for some reason.
@@ -25,7 +25,7 @@ If the search does not converge within 20 iterations, it will throw an exception
#### Return
If successful, returns an [AstroTime](../-astro-time/index.md) value indicating a date and time that is within toleranceSeconds of an ascending root. If no ascending root is found, or more than one root exists in the time window time1..time2, the function returns null.
If successful, returns an [AstroTime](-astro-time/index.md) value indicating a date and time that is within toleranceSeconds of an ascending root. If no ascending root is found, or more than one root exists in the time window time1..time2, the function returns null.
## Parameters

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[seasons](seasons.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[seasons](seasons.md)
# seasons
[jvm]\
fun [seasons](seasons.md)(year: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)): [SeasonsInfo](../-seasons-info/index.md)
fun [seasons](seasons.md)(year: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)): [SeasonsInfo](-seasons-info/index.md)
Finds both equinoxes and both solstices for a given calendar year.
@@ -15,7 +15,7 @@ The solstices are the moments twice each year when one of the Earth's poles is m
#### Return
A [SeasonsInfo](../-seasons-info/index.md) object that contains four [AstroTime](../-astro-time/index.md) values: the March and September equinoxes and the June and December solstices.
A [SeasonsInfo](-seasons-info/index.md) object that contains four [AstroTime](-astro-time/index.md) values: the March and September equinoxes and the June and December solstices.
## Parameters

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[siderealTime](sidereal-time.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[siderealTime](sidereal-time.md)
# siderealTime
[jvm]\
fun [siderealTime](sidereal-time.md)(time: [AstroTime](../-astro-time/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)
fun [siderealTime](sidereal-time.md)(time: [AstroTime](-astro-time/index.md)): [Double](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)
Calculates Greenwich Apparent Sidereal Time (GAST).

View File

@@ -1,9 +1,9 @@
//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Astronomy](index.md)/[sunPosition](sun-position.md)
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[sunPosition](sun-position.md)
# sunPosition
[jvm]\
fun [sunPosition](sun-position.md)(time: [AstroTime](../-astro-time/index.md)): [Ecliptic](../-ecliptic/index.md)
fun [sunPosition](sun-position.md)(time: [AstroTime](-astro-time/index.md)): [Ecliptic](-ecliptic/index.md)
Calculates geocentric ecliptic coordinates for the Sun.
@@ -11,7 +11,7 @@ This function calculates the position of the Sun as seen from the Earth. The ret
sunPosition corrects for precession and nutation of the Earth's axis in order to obtain the exact equatorial plane at the given time.
This function can be used for calculating changes of seasons: equinoxes and solstices. In fact, the function [Astronomy.seasons](seasons.md) does use this function for that purpose.
This function can be used for calculating changes of seasons: equinoxes and solstices. In fact, the function [seasons](seasons.md) does use this function for that purpose.
#### Return

View File

File diff suppressed because it is too large Load Diff

View File

@@ -236,7 +236,7 @@ class Tests {
// in sidereal time in case it is broken.
val correct = 9.398368460418821
val time = AstroTime(2022, 3, 15, 21, 50, 0.0)
val gast = Astronomy.siderealTime(time)
val gast = siderealTime(time)
assertTrue(gast.isFinite())
val diff = abs(gast - correct)
assertTrue(diff < 1.0e-15, "correct=$correct, gast=$gast, diff=$diff")
@@ -281,7 +281,7 @@ class Tests {
val ra = token[1].toDouble()
val dec = token[2].toDouble()
val time = AstroTime(jd - 2451545.0)
val axis = Astronomy.rotationAxis(body, time)
val axis = rotationAxis(body, time)
// Convert the reference angles to a reference north pole vector.
// tricky: `ra` is in degrees, not sidereal hours; so don't multiply by 15.
@@ -304,7 +304,7 @@ class Tests {
fun `Sanity check geocentric moon`() {
val time = AstroTime(2019, 6, 24, 15, 45, 37.0)
val eclSphere = Astronomy.eclipticGeoMoon(time)
val eclSphere = eclipticGeoMoon(time)
val dlat = eclSphere.lat - (-4.851798346972171)
val dlon = eclSphere.lon - (+354.5951298193645)
var drad = eclSphere.dist - 0.0026968810499258147
@@ -312,7 +312,7 @@ class Tests {
assertTrue(abs(dlon) < 1.0e-15, "eclipticGeoMoon: excessive longitude error $dlon")
assertTrue(abs(drad) < 1.0e-17, "eclipticGeoMoon: excessive distance error $drad")
val equVec = Astronomy.geoMoon(time)
val equVec = geoMoon(time)
checkVector(
equVec,
+0.002674037026701135, -0.0001531610316600666, -0.0003150159927069429,
@@ -439,7 +439,7 @@ class Tests {
fun `Venus horizontal coords`() {
val body = Body.Venus
val time = AstroTime.fromTerrestrialTime(10373.141119633277) // UT 2028-05-26T15:21:56.183Z
val pos = Astronomy.helioVector(body, time)
val pos = helioVector(body, time)
checkVector(
pos,
-0.34191041083994594, -0.5908265808125958, -0.24422546639998666,
@@ -449,12 +449,12 @@ class Tests {
val observer = Observer(29.0, -81.0, 10.0)
val ofdate = Astronomy.equator(body, time, observer, EquatorEpoch.OfDate, Aberration.Corrected)
val ofdate = equator(body, time, observer, EquatorEpoch.OfDate, Aberration.Corrected)
checkScalar(ofdate.ra, 4.893134408107621, 8.9e-16, "Venus EQD RA")
checkScalar(ofdate.dec, 24.6998405830952, 1.0e-16, "Venus EQD DEC")
checkScalar(ofdate.dist, 0.29355004763155124, 1.0e-16, "Venus EQD distance")
val hor = Astronomy.horizon(time, observer, ofdate.ra, ofdate.dec, Refraction.None)
val hor = horizon(time, observer, ofdate.ra, ofdate.dec, Refraction.None)
checkScalar(hor.azimuth, 87.5963687042015, 1.0e-16, "Venus azimuth")
checkScalar(hor.altitude, 54.929061963517746, 7.2e-15, "Venus altitude")
}
@@ -466,14 +466,14 @@ class Tests {
vx: Double, vy: Double, vz: Double
) {
val tolerance = 1.0e-11
val calcPos = Astronomy.helioVector(body, time)
val calcPos = helioVector(body, time)
checkVector(calcPos, x, y, z, tolerance, "helioVector($body)")
val calcDist = Astronomy.helioDistance(body, time)
val calcDist = helioDistance(body, time)
val expectedDist = sqrt(x*x + y*y + z*z)
checkScalar(calcDist, expectedDist, tolerance, "helioDistance($body)")
val calcState = Astronomy.helioState(body, time)
val calcState = helioState(body, time)
checkVector(calcState.position(), x, y, z, tolerance, "helioState($body).position")
checkVector(calcState.velocity(), vx, vy, vz, tolerance, "helioState($body).velocity")
}
@@ -520,23 +520,23 @@ class Tests {
outfile.println("o ${observer.latitude} ${observer.longitude} ${observer.height}")
while (time.tt < stop.tt) {
for (body in bodylist) {
pos = Astronomy.helioVector(body, time)
pos = helioVector(body, time)
outfile.println("v ${body} ${pos.t.tt} ${pos.x} ${pos.y} ${pos.z}")
if (body !in vectorOnlyList) {
j2000 = Astronomy.equator(body, time, observer, EquatorEpoch.J2000, Aberration.None)
ofdate = Astronomy.equator(body, time, observer, EquatorEpoch.OfDate, Aberration.Corrected)
hor = Astronomy.horizon(time, observer, ofdate.ra, ofdate.dec, Refraction.None)
j2000 = equator(body, time, observer, EquatorEpoch.J2000, Aberration.None)
ofdate = equator(body, time, observer, EquatorEpoch.OfDate, Aberration.Corrected)
hor = horizon(time, observer, ofdate.ra, ofdate.dec, Refraction.None)
outfile.println("s ${body} ${time.tt} ${time.ut} ${j2000.ra} ${j2000.dec} ${j2000.dist} ${hor.azimuth} ${hor.altitude}")
}
}
pos = Astronomy.geoVector(Body.Moon, time, Aberration.None)
pos = geoVector(Body.Moon, time, Aberration.None)
outfile.println("v GM ${pos.t.tt} ${pos.x} ${pos.y} ${pos.z}")
j2000 = Astronomy.equator(Body.Moon, time, observer, EquatorEpoch.J2000, Aberration.None)
ofdate = Astronomy.equator(Body.Moon, time, observer, EquatorEpoch.OfDate, Aberration.Corrected)
hor = Astronomy.horizon(time, observer, ofdate.ra, ofdate.dec, Refraction.None)
j2000 = equator(Body.Moon, time, observer, EquatorEpoch.J2000, Aberration.None)
ofdate = equator(Body.Moon, time, observer, EquatorEpoch.OfDate, Aberration.Corrected)
hor = horizon(time, observer, ofdate.ra, ofdate.dec, Refraction.None)
outfile.println("s GM ${time.tt} ${time.ut} ${j2000.ra} ${j2000.dec} ${j2000.dist} ${hor.azimuth} ${hor.altitude}")
val jm = Astronomy.jupiterMoons(time)
val jm = jupiterMoons(time)
var mindex = 0
for (moon in jm.moon) {
outfile.println("j ${mindex} ${time.tt} ${time.ut} ${moon.x} ${moon.y} ${moon.z} ${moon.vx} ${moon.vy} ${moon.vz}")
@@ -566,7 +566,7 @@ class Tests {
val observer = Observer(-30.0, +150.0, 200.0)
compareMatrices(
Astronomy.rotationEqjEcl(),
rotationEqjEcl(),
RotationMatrix(
1.0, 0.0, 0.0,
0.0, +0.9174821430670688, -0.3977769691083922,
@@ -576,7 +576,7 @@ class Tests {
)
compareMatrices(
Astronomy.rotationEclEqj(),
rotationEclEqj(),
RotationMatrix(
1.0, 0.0, 0.0,
0.0, +0.9174821430670688, +0.3977769691083922,
@@ -586,7 +586,7 @@ class Tests {
)
compareMatrices(
Astronomy.rotationEqjEqd(time),
rotationEqjEqd(time),
RotationMatrix(
0.9999856608656787, 0.004911515527973243, 0.002134262929010771,
-0.004911577234051216, 0.9999879378516134, 2.367175135753887e-05,
@@ -596,7 +596,7 @@ class Tests {
)
compareMatrices(
Astronomy.rotationEqdEqj(time),
rotationEqdEqj(time),
RotationMatrix(
0.9999856608656787, -0.004911577234051216, -0.002134120921040258,
0.004911515527973243, 0.9999879378516134, -3.4154009138639524e-05,
@@ -606,7 +606,7 @@ class Tests {
)
compareMatrices(
Astronomy.rotationEqdHor(time, observer),
rotationEqdHor(time, observer),
RotationMatrix(
0.3272894142412824, -0.7559937548038297, 0.5668818942453582,
-0.3779968774019148, -0.6545788284825649, -0.6547097967625005,
@@ -616,7 +616,7 @@ class Tests {
)
compareMatrices(
Astronomy.rotationHorEqd(time, observer),
rotationHorEqd(time, observer),
RotationMatrix(
0.3272894142412824, -0.3779968774019148, 0.8660254037844387,
-0.7559937548038297, -0.6545788284825649, 0.0,
@@ -626,7 +626,7 @@ class Tests {
)
compareMatrices(
Astronomy.rotationHorEqj(time, observer),
rotationHorEqj(time, observer),
RotationMatrix(
0.3272765095764035, -0.37957932484539564, 0.86533786605545,
-0.7591978885882081, -0.6508578111404256, 0.0016357385795925856,
@@ -636,7 +636,7 @@ class Tests {
)
compareMatrices(
Astronomy.rotationEqjHor(time, observer),
rotationEqjHor(time, observer),
RotationMatrix(
0.3272765095764035, -0.7591978885882081, 0.5625910168521117,
-0.37957932484539564, -0.6508578111404256, -0.657498019637632,
@@ -646,7 +646,7 @@ class Tests {
)
compareMatrices(
Astronomy.rotationEqdEcl(time),
rotationEqdEcl(time),
RotationMatrix(
0.9999856608656787, -0.00535518855821894, -4.305530497609837e-06,
0.004911515527973243, 0.917457490583079, -0.39780350675706494,
@@ -656,7 +656,7 @@ class Tests {
)
compareMatrices(
Astronomy.rotationEclEqd(time),
rotationEclEqd(time),
RotationMatrix(
0.9999856608656787, 0.004911515527973243, 0.002134262929010771,
-0.00535518855821894, 0.917457490583079, 0.39779778145246825,
@@ -666,7 +666,7 @@ class Tests {
)
compareMatrices(
Astronomy.rotationEclHor(time, observer),
rotationEclHor(time, observer),
RotationMatrix(
0.3272765095764035, -0.7591978885882081, 0.5625910168521117,
-0.004045778808843881, -0.5964997602626152, -0.8026030573580397,
@@ -676,7 +676,7 @@ class Tests {
)
compareMatrices(
Astronomy.rotationHorEcl(time, observer),
rotationHorEcl(time, observer),
RotationMatrix(
0.3272765095764035, -0.004045778808843881, 0.9449199531988498,
-0.7591978885882081, -0.5964997602626152, 0.26039700837346297,
@@ -686,7 +686,7 @@ class Tests {
)
compareMatrices(
Astronomy.rotationGalEqj(),
rotationGalEqj(),
RotationMatrix(
-0.0548624779711344, -0.8734572784246782, -0.483800052994852,
0.4941095946388765, -0.4447938112296831, 0.7470034631630423,
@@ -696,7 +696,7 @@ class Tests {
)
compareMatrices(
Astronomy.rotationEqjGal(),
rotationEqjGal(),
RotationMatrix(
-0.0548624779711344, 0.4941095946388765, -0.8676668813529025,
-0.8734572784246782, -0.4447938112296831, -0.1980677870294097,
@@ -720,7 +720,7 @@ class Tests {
val ra: Double = groupDouble(m, 2, filename, lnum)
val dec: Double = groupDouble(m, 3, filename, lnum)
val symbol: String = groupString(m, 4, filename, lnum)
val constel = Astronomy.constellation(ra, dec)
val constel = constellation(ra, dec)
assertTrue(constel.symbol == symbol, "$filename line $lnum: expected constellation $symbol, but found id=$id, symbol=${constel.symbol}")
++lnum;
@@ -740,7 +740,7 @@ class Tests {
val func = CosineIdentityFunc()
val time1 = AstroTime(0.0)
val time2 = AstroTime(1.0)
val tsolve = Astronomy.search(func, time1, time2, toleranceSeconds)
val tsolve = search(func, time1, time2, toleranceSeconds)
if (tsolve == null)
fail("Basic search failed")
@@ -782,7 +782,7 @@ class Tests {
val correctTime = AstroTime(year, month, day, hour, minute, 0.0)
if (year != currentYear) {
currentYear = year
seasons = Astronomy.seasons(year)
seasons = seasons(year)
}
if (seasons == null)
@@ -838,7 +838,7 @@ class Tests {
// https://github.com/cosinekitty/astronomy/issues/187
// For years far from the present, the seasons search was sometimes failing.
for (year in 1 .. 9999)
Astronomy.seasons(year)
seasons(year)
}
//----------------------------------------------------------------------------------------
@@ -870,7 +870,7 @@ class Tests {
val expectedTime = AstroTime(year, month, day, hour, minute, second)
val expectedElong = 90.0 * quarter
val calcElong = Astronomy.moonPhase(expectedTime)
val calcElong = moonPhase(expectedTime)
var degreeError = abs(calcElong - expectedElong)
if (degreeError > 180.0)
degreeError = 360.0 - degreeError
@@ -884,14 +884,14 @@ class Tests {
// Every time we see the year value change, it breaks continuity of the phases.
// Start the search over again.
val startTime = AstroTime(year, 1, 1, 0, 0, 0.0)
mq = Astronomy.searchMoonQuarter(startTime)
mq = searchMoonQuarter(startTime)
} else {
if (mq == null)
fail("mq == null") // should not be possible
// Yet another lunar quarter in the same year.
val expectedQuarter = (1 + mq.quarter) % 4
mq = Astronomy.nextMoonQuarter(mq)
mq = nextMoonQuarter(mq)
// Make sure we find the next expected quarter.
assertTrue(expectedQuarter == mq.quarter, "$filename line $lnum: expected quarter $expectedQuarter, but found ${mq.quarter}")
@@ -959,11 +959,11 @@ class Tests {
aDir = bDir
bEvt = null
} else {
rEvt = Astronomy.searchRiseSet(body, observer, Direction.Rise, rSearchDate!!, 366.0)
rEvt = searchRiseSet(body, observer, Direction.Rise, rSearchDate!!, 366.0)
if (rEvt == null)
fail("$filename line $lnum: did not find $body rise event.")
sEvt = Astronomy.searchRiseSet(body, observer, Direction.Set, sSearchDate!!, 366.0)
sEvt = searchRiseSet(body, observer, Direction.Set, sSearchDate!!, 366.0)
if (sEvt == null)
fail("$filename line $lnum: did not find $body set event.")
@@ -1014,12 +1014,12 @@ class Tests {
val searchDate = parseDate(tokens[2])
val correctTimes = tokens.drop(3).map { it -> parseDate(it) }
val calcTimes = arrayOf(
Astronomy.searchAltitude(Body.Sun, observer, Direction.Rise, searchDate, 1.0, -18.0), // astronomical dawn
Astronomy.searchAltitude(Body.Sun, observer, Direction.Rise, searchDate, 1.0, -12.0), // nautical dawn
Astronomy.searchAltitude(Body.Sun, observer, Direction.Rise, searchDate, 1.0, -6.0), // civil dawn
Astronomy.searchAltitude(Body.Sun, observer, Direction.Set, searchDate, 1.0, -6.0), // civil dawn
Astronomy.searchAltitude(Body.Sun, observer, Direction.Set, searchDate, 1.0, -12.0), // nautical dawn
Astronomy.searchAltitude(Body.Sun, observer, Direction.Set, searchDate, 1.0, -18.0), // astronomical dawn
searchAltitude(Body.Sun, observer, Direction.Rise, searchDate, 1.0, -18.0), // astronomical dawn
searchAltitude(Body.Sun, observer, Direction.Rise, searchDate, 1.0, -12.0), // nautical dawn
searchAltitude(Body.Sun, observer, Direction.Rise, searchDate, 1.0, -6.0), // civil dawn
searchAltitude(Body.Sun, observer, Direction.Set, searchDate, 1.0, -6.0), // civil dawn
searchAltitude(Body.Sun, observer, Direction.Set, searchDate, 1.0, -12.0), // nautical dawn
searchAltitude(Body.Sun, observer, Direction.Set, searchDate, 1.0, -18.0), // astronomical dawn
)
assertTrue(correctTimes.size == calcTimes.size, "correctTimes.size = ${correctTimes.size}, but calcTimes.size = ${calcTimes.size}")
for (i in 0 until correctTimes.size) {