From a2f41f99fa4a5bca90ad63e125f77335f0d07bfc Mon Sep 17 00:00:00 2001 From: Don Cross Date: Mon, 13 May 2019 22:02:22 -0400 Subject: [PATCH] Added more entries to the JavaScript documentation topic index. --- generate/template/astronomy.js | 3 ++- jsdoc2md/js.hbs | 36 ++++++++++++++++++++++++++++-- source/js/README.md | 40 ++++++++++++++++++++++++++++++---- source/js/astronomy.js | 3 ++- 4 files changed, 74 insertions(+), 8 deletions(-) diff --git a/generate/template/astronomy.js b/generate/template/astronomy.js index c87c1f09..28b301ff 100644 --- a/generate/template/astronomy.js +++ b/generate/template/astronomy.js @@ -1586,6 +1586,7 @@ Astronomy.SunPosition = function(date) { * * @param {Astronomy.Observer} observer * The location on the Earth of the observer. + * Call {@link Astronomy.MakeObserver} to create an observer object. * * @returns {Astronomy.SkyCoordinates} * The topocentric coordinates of the body as adjusted for the given observer. @@ -2918,7 +2919,7 @@ class SeasonInfo { } /** - * Find the equinoxes and solstices for a given calendar year. + * Finds the equinoxes and solstices for a given calendar year. * * @param {(number | Astronomy.Time)} year * The integer value or Time object that specifies diff --git a/jsdoc2md/js.hbs b/jsdoc2md/js.hbs index 3b1b2037..ba1a43ee 100644 --- a/jsdoc2md/js.hbs +++ b/jsdoc2md/js.hbs @@ -13,14 +13,46 @@ and some [Node.js examples](../../demo/nodejs/). --- ## Topic Index -### Position vectors of Sun, Moon, and planets + +### Position of Sun, Moon, and planets | [HelioVector](#Astronomy.HelioVector) | Calculates vector with respect to the center of the Sun. | | [GeoVector](#Astronomy.GeoVector) | Calculates vector with respect to the center of the Earth. | +| [SkyPos](#Astronomy.SkyPos) | Calculates right ascension and declination. | +| [Ecliptic](#Astronomy.Ecliptic) | Calculates ecliptic latitude, longitude, and Cartesian coordinates. | +| [Horizon](#Astronomy.Horizon) | Calculates horizontal coordinates (azimuth, altitude) for a given observer on the Earth. | -### Visual magnitude +### Rise, set, and culmination times + +| [SearchRiseSet](#Astronomy.SearchRiseSet) | Finds time of rise or set for a body as seen by an observer on the Earth. | +| [SearchHourAngle](#Astronomy.SearchHourAngle) | Finds when body reaches a given hour angle for an observer on the Earth. Hour angle = 0 finds culmination, the highest point in the sky. | + +### Moon phases + +| [MoonPhase](#Astronomy.MoonPhase) | Determines the Moon's phase expressed as an ecliptic longitude. | +| [SearchMoonQuarter](#Astronomy.SearchMoonQuarter) | Find the first quarter moon phase after a given date and time. | +| [NextMoonQuarter](#Astronomy.NextMoonQuarter) | Find the next quarter moon phase after a previous one that has been found. | + +### Lunar perigee and apogee + +| [SearchLunarApsis](#Astronomy.SearchLunarApsis) | Finds the next perigee or apogee of the Moon after a specified date. | +| [NextLunarApsis](#Astronomy.NextLunarApsis) | Given an already-found apsis, find the next perigee or apogee of the Moon. | + +### Visual magnitude and elongation | [Illumination](#Astronomy.Illumination) | Calculates visual magnitude and phase angle of bodies as seen from the Earth. | +| [SearchPeakMagnitude](#Astronomy.SearchPeakMagnitude) | Searches for the date and time Venus will next appear brightest as seen from the Earth. | +| [AngleFromSun](#Astronomy.AngleFromSun) | Returns full angle seen from Earth between body and Sun. | +| [Elongation](#Astronomy.Elongation) | Calculates ecliptic longitude angle between a body and the Sun, as seen from the Earth. | +| [SearchMaxElongation](#Astronomy.SearchMaxElongation) | Searches for the next maximum elongation event for Mercury or Venus that occurs after the given date. | + +### Oppositions and conjunctions + +| [SearchRelativeLongitude](#Astronomy.SearchRelativeLongitude) | Find oppositions and conjunctions of planets. | + +### Equinoxes and solstices + +| [Seasons](#Astronomy.Seasons) | Finds the equinoxes and solstices for a given calendar year. | --- diff --git a/source/js/README.md b/source/js/README.md index 3156853a..1dd90e00 100644 --- a/source/js/README.md +++ b/source/js/README.md @@ -13,14 +13,46 @@ and some [Node.js examples](../../demo/nodejs/). --- ## Topic Index -### Position vectors of Sun, Moon, and planets + +### Position of Sun, Moon, and planets | [HelioVector](#Astronomy.HelioVector) | Calculates vector with respect to the center of the Sun. | | [GeoVector](#Astronomy.GeoVector) | Calculates vector with respect to the center of the Earth. | +| [SkyPos](#Astronomy.SkyPos) | Calculates right ascension and declination. | +| [Ecliptic](#Astronomy.Ecliptic) | Calculates ecliptic latitude, longitude, and Cartesian coordinates. | +| [Horizon](#Astronomy.Horizon) | Calculates horizontal coordinates (azimuth, altitude) for a given observer on the Earth. | -### Visual magnitude +### Rise, set, and culmination times + +| [SearchRiseSet](#Astronomy.SearchRiseSet) | Finds time of rise or set for a body as seen by an observer on the Earth. | +| [SearchHourAngle](#Astronomy.SearchHourAngle) | Finds when body reaches a given hour angle for an observer on the Earth. Hour angle = 0 finds culmination, the highest point in the sky. | + +### Moon phases + +| [MoonPhase](#Astronomy.MoonPhase) | Determines the Moon's phase expressed as an ecliptic longitude. | +| [SearchMoonQuarter](#Astronomy.SearchMoonQuarter) | Find the first quarter moon phase after a given date and time. | +| [NextMoonQuarter](#Astronomy.NextMoonQuarter) | Find the next quarter moon phase after a previous one that has been found. | + +### Lunar perigee and apogee + +| [SearchLunarApsis](#Astronomy.SearchLunarApsis) | Finds the next perigee or apogee of the Moon after a specified date. | +| [NextLunarApsis](#Astronomy.NextLunarApsis) | Given an already-found apsis, find the next perigee or apogee of the Moon. | + +### Visual magnitude and elongation | [Illumination](#Astronomy.Illumination) | Calculates visual magnitude and phase angle of bodies as seen from the Earth. | +| [SearchPeakMagnitude](#Astronomy.SearchPeakMagnitude) | Searches for the date and time Venus will next appear brightest as seen from the Earth. | +| [AngleFromSun](#Astronomy.AngleFromSun) | Returns full angle seen from Earth between body and Sun. | +| [Elongation](#Astronomy.Elongation) | Calculates ecliptic longitude angle between a body and the Sun, as seen from the Earth. | +| [SearchMaxElongation](#Astronomy.SearchMaxElongation) | Searches for the next maximum elongation event for Mercury or Venus that occurs after the given date. | + +### Oppositions and conjunctions + +| [SearchRelativeLongitude](#Astronomy.SearchRelativeLongitude) | Find oppositions and conjunctions of planets. | + +### Equinoxes and solstices + +| [Seasons](#Astronomy.Seasons) | Finds the equinoxes and solstices for a given calendar year. | --- @@ -526,7 +558,7 @@ However, it can have a small effect on the apparent positions of other bodies. | Param | Type | Description | | --- | --- | --- | | gc_vector | [Vector](#Astronomy.Vector) | A geocentric vector in the J2000 equatorial system. Geocentric refers to a position seen by a hypothetical observer at the center of the Earth. | -| observer | [Observer](#Astronomy.Observer) | The location on the Earth of the observer. | +| observer | [Observer](#Astronomy.Observer) | The location on the Earth of the observer. Call [MakeObserver](#Astronomy.MakeObserver) to create an observer object. | * * * @@ -911,7 +943,7 @@ at its minimum altitude. ### Astronomy.Seasons(year) ⇒ [SeasonInfo](#Astronomy.SeasonInfo) -Find the equinoxes and solstices for a given calendar year. +Finds the equinoxes and solstices for a given calendar year. **Kind**: static method of [Astronomy](#Astronomy) diff --git a/source/js/astronomy.js b/source/js/astronomy.js index a46c4681..cc37a886 100644 --- a/source/js/astronomy.js +++ b/source/js/astronomy.js @@ -2424,6 +2424,7 @@ Astronomy.SunPosition = function(date) { * * @param {Astronomy.Observer} observer * The location on the Earth of the observer. + * Call {@link Astronomy.MakeObserver} to create an observer object. * * @returns {Astronomy.SkyCoordinates} * The topocentric coordinates of the body as adjusted for the given observer. @@ -3756,7 +3757,7 @@ class SeasonInfo { } /** - * Find the equinoxes and solstices for a given calendar year. + * Finds the equinoxes and solstices for a given calendar year. * * @param {(number | Astronomy.Time)} year * The integer value or Time object that specifies