From 1fde8049c641f72839464a1e514f8ad56ccb781d Mon Sep 17 00:00:00 2001 From: Don Cross Date: Sat, 21 Dec 2019 15:41:39 -0500 Subject: [PATCH] Added check_internal_links.py utility to look for broken links in markdown files. Currently I ignore any errors when checking the C# documentation, because there are broken links for the rotation functions I haven't started adding yet. I will turn that error check back on once I finish those functions. --- generate/check_internal_links.py | 27 +++++++++++++++++++++++++ generate/makedoc | 4 ++++ generate/template/astronomy.c | 2 +- generate/template/astronomy.py | 4 ++-- source/c/README.md | 34 ++++++++++++++++---------------- source/c/astronomy.c | 2 +- source/c/astronomy.h | 32 +++++++++++++++--------------- source/python/README.md | 4 ++-- source/python/astronomy.py | 4 ++-- 9 files changed, 72 insertions(+), 41 deletions(-) create mode 100755 generate/check_internal_links.py diff --git a/generate/check_internal_links.py b/generate/check_internal_links.py new file mode 100755 index 00000000..231b079c --- /dev/null +++ b/generate/check_internal_links.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python3 +import sys +import re + +def FindBrokenLinks(inFileName): + with open(inFileName, 'rt') as infile: + text = infile.read() + # Search for all link names, of the form: (#Some.Name) + linkSet = set(m.group(1) for m in re.finditer(r'\(#([A-Za-z0-9_\.]+)\)', text)) + # Search for all anchor names, of the form: + anchorSet = set(m.group(1) for m in re.finditer(r'<\s*a\s+name\s*=\s*"([A-Za-z0-9_\.]+)"\s*>', text)) + # Find all link names for which there is no matching anchor name. + return sorted(linkSet - anchorSet) + +if __name__ == '__main__': + if len(sys.argv) != 2: + print('USAGE: check_internal_links.py infile.md') + sys.exit(1) + filename = sys.argv[1] + badLinks = FindBrokenLinks(filename) + if len(badLinks) > 0: + print('ERROR(check_internal_links.py): The following {} links are bad in file {}'.format(len(badLinks), filename)) + for name in badLinks: + print(name) + sys.exit(1) + print('Links are OK in: {}'.format(filename)) + sys.exit(0) diff --git a/generate/makedoc b/generate/makedoc index b57bbeea..c04cf198 100755 --- a/generate/makedoc +++ b/generate/makedoc @@ -26,12 +26,14 @@ cd ../../../csdown || Fail "Error changing to csdown directory" ./build || exit 1 dotnet exe/csdown.dll csharp_prefix.md ../generate/dotnet/csharp_test/exe/astronomy.dll ../generate/dotnet/csharp_test/exe/astronomy.xml ../source/csharp/README.md || Fail "Error generating C# documentation." cd ../generate || Fail "Error changing back to generate directory" +./check_internal_links.py $(realpath ../source/csharp/README.md) #|| exit 1 echo "Minifying JavaScript code." google-closure-compiler --js ../source/js/astronomy.js --js_output_file ../source/js/astronomy.min.js || Fail "Error minifying astronomy.js" echo "Generating JS documentation in Markdown format." jsdoc2md --separators --template ../jsdoc2md/js.hbs --files ../source/js/astronomy.js > ../source/js/README.md || Fail "Error generating JS documentation." +./check_internal_links.py $(realpath ../source/js/README.md) || exit 1 if [[ -d html ]]; then echo "Generating JS documentation in HTML format for local viewing." @@ -53,11 +55,13 @@ if [[ -f generate_c_docs ]]; then echo "Translating doxygen XML to Markdown." node ../../hydrogen/hydrogen.js ../../hydrogen/c_prefix.md ./xml/all.xml || Fail "Error in hydrogen.js" cd ../../generate || Fail "Error changing directory back" + ./check_internal_links.py $(realpath ../source/c/README.md) || exit 1 else echo "(Skipping generation of C documentation because file generate_c_docs does not exist.)" fi echo "Generating Python documentation." python3 ../pydown/pydown.py ../pydown/py_prefix.md ../source/python/astronomy.py ../source/python/README.md || Fail "Error generating Markdown from Python source." +./check_internal_links.py $(realpath ../source/python/README.md) || exit 1 exit 0 diff --git a/generate/template/astronomy.c b/generate/template/astronomy.c index 3c1de5fb..6bc81635 100644 --- a/generate/template/astronomy.c +++ b/generate/template/astronomy.c @@ -139,7 +139,7 @@ const char *Astronomy_BodyName(astro_body_t body) /** * @brief Returns the #astro_body_t value corresponding to the given English name. * @param name One of the following strings: Sun, Moon, Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto. - * @return If `name` is one of the strings (case-sensitive) listed above, the returned value is the corresponding #astro_body_t value, otherwise it is #BODY_INVALID. + * @return If `name` is one of the strings (case-sensitive) listed above, the returned value is the corresponding #astro_body_t value, otherwise it is `BODY_INVALID`. */ astro_body_t Astronomy_BodyCode(const char *name) { diff --git a/generate/template/astronomy.py b/generate/template/astronomy.py index 36e1cf6d..78609d5e 100644 --- a/generate/template/astronomy.py +++ b/generate/template/astronomy.py @@ -1318,7 +1318,7 @@ def Equator(body, time, observer, ofdate, aberration): Returns ------- - EquatorialCoordinates + Equatorial Equatorial coordinates in the specified frame of reference. """ gc_observer = _geo_pos(time, observer) @@ -1685,7 +1685,7 @@ def Ecliptic(equ): Parameters ---------- - equ : EquatorialCoordinates + equ : Equatorial Equatorial coordinates in the J2000 frame of reference. Returns diff --git a/source/c/README.md b/source/c/README.md index d3b5a11d..1fb1ba3c 100644 --- a/source/c/README.md +++ b/source/c/README.md @@ -211,7 +211,7 @@ This function calculates the angular separation between the given body and the S -**Returns:** If `name` is one of the strings (case-sensitive) listed above, the returned value is the corresponding [`astro_body_t`](#astro_body_t) value, otherwise it is [`BODY_INVALID`](#BODY_INVALID). +**Returns:** If `name` is one of the strings (case-sensitive) listed above, the returned value is the corresponding [`astro_body_t`](#astro_body_t) value, otherwise it is `BODY_INVALID`. @@ -1896,7 +1896,7 @@ For some other purposes, it is more helpful to represent coordinates using the E | Type | Member | Description | | ---- | ------ | ----------- | -| [`astro_status_t`](#astro_status_t) | `status` | ASTRO_SUCCESS if this struct is valid; otherwise an error code. | +| [`astro_status_t`](#astro_status_t) | `status` | `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. | | `double` | `angle` | An angle expressed in degrees. | @@ -1917,7 +1917,7 @@ This data structure is returned by [`Astronomy_SearchLunarApsis`](#Astronomy_Sea | Type | Member | Description | | ---- | ------ | ----------- | -| [`astro_status_t`](#astro_status_t) | `status` | ASTRO_SUCCESS if this struct is valid; otherwise an error code. | +| [`astro_status_t`](#astro_status_t) | `status` | `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. | | [`astro_time_t`](#astro_time_t) | `time` | The date and time of the apsis. | | [`astro_apsis_kind_t`](#astro_apsis_kind_t) | `kind` | Whether this is a pericenter or apocenter event. | | `double` | `dist_au` | The distance between the centers of the bodies in astronomical units. | @@ -1937,7 +1937,7 @@ Coordinates of a celestial body as seen from the center of the Sun (heliocentric | Type | Member | Description | | ---- | ------ | ----------- | -| [`astro_status_t`](#astro_status_t) | `status` | ASTRO_SUCCESS if this struct is valid; otherwise an error code. | +| [`astro_status_t`](#astro_status_t) | `status` | `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. | | `double` | `ex` | Cartesian x-coordinate: in the direction of the equinox along the ecliptic plane. | | `double` | `ey` | Cartesian y-coordinate: in the ecliptic plane 90 degrees prograde from the equinox. | | `double` | `ez` | Cartesian z-coordinate: perpendicular to the ecliptic plane. Positive is north. | @@ -1956,7 +1956,7 @@ Coordinates of a celestial body as seen from the center of the Sun (heliocentric | Type | Member | Description | | ---- | ------ | ----------- | -| [`astro_status_t`](#astro_status_t) | `status` | ASTRO_SUCCESS if this struct is valid; otherwise an error code. | +| [`astro_status_t`](#astro_status_t) | `status` | `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. | | [`astro_time_t`](#astro_time_t) | `time` | The date and time of the observation. | | [`astro_visibility_t`](#astro_visibility_t) | `visibility` | Whether the body is best seen in the morning or the evening. | | `double` | `elongation` | The angle in degrees between the body and the Sun, as seen from the Earth. | @@ -1976,7 +1976,7 @@ Coordinates of a celestial body as seen from the Earth (geocentric or topocentri | Type | Member | Description | | ---- | ------ | ----------- | -| [`astro_status_t`](#astro_status_t) | `status` | ASTRO_SUCCESS if this struct is valid; otherwise an error code. | +| [`astro_status_t`](#astro_status_t) | `status` | `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. | | `double` | `ra` | right ascension in sidereal hours. | | `double` | `dec` | declination in degrees | | `double` | `dist` | distance to the celestial body in AU. | @@ -1991,11 +1991,11 @@ Coordinates of a celestial body as seen from the Earth (geocentric or topocentri -When calling [`Astronomy_Search`](#Astronomy_Search), the caller must pass in a callback function compatible with the function-pointer type [`astro_search_func_t`](#astro_search_func_t) whose ascending root is to be found. That callback function must return [`astro_func_result_t`](#astro_func_result_t). If the function call is successful, it will set `status` to [`ASTRO_SUCCESS`](#ASTRO_SUCCESS) and `value` to the numeric value appropriate for the given date and time. If the call fails for some reason, it should set `status` to an appropriate error value other than `ASTRO_SUCCESS`; in the error case, to guard against any possible misuse of `value`, it is recommended to set `value` to `NAN`, though this is not strictly necessary. +When calling [`Astronomy_Search`](#Astronomy_Search), the caller must pass in a callback function compatible with the function-pointer type [`astro_search_func_t`](#astro_search_func_t) whose ascending root is to be found. That callback function must return [`astro_func_result_t`](#astro_func_result_t). If the function call is successful, it will set `status` to `ASTRO_SUCCESS` and `value` to the numeric value appropriate for the given date and time. If the call fails for some reason, it should set `status` to an appropriate error value other than `ASTRO_SUCCESS`; in the error case, to guard against any possible misuse of `value`, it is recommended to set `value` to `NAN`, though this is not strictly necessary. | Type | Member | Description | | ---- | ------ | ----------- | -| [`astro_status_t`](#astro_status_t) | `status` | ASTRO_SUCCESS if this struct is valid; otherwise an error code. | +| [`astro_status_t`](#astro_status_t) | `status` | `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. | | `double` | `value` | The value returned by a function whose ascending root is to be found. | @@ -2031,7 +2031,7 @@ Returned by the function [`Astronomy_SearchHourAngle`](#Astronomy_SearchHourAngl | Type | Member | Description | | ---- | ------ | ----------- | -| [`astro_status_t`](#astro_status_t) | `status` | ASTRO_SUCCESS if this struct is valid; otherwise an error code. | +| [`astro_status_t`](#astro_status_t) | `status` | `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. | | [`astro_time_t`](#astro_time_t) | `time` | The date and time when the body crosses the specified hour angle. | | [`astro_horizon_t`](#astro_horizon_t) | `hor` | Apparent coordinates of the body at the time it crosses the specified hour angle. | @@ -2049,7 +2049,7 @@ Returned by the functions [`Astronomy_Illumination`](#Astronomy_Illumination) an | Type | Member | Description | | ---- | ------ | ----------- | -| [`astro_status_t`](#astro_status_t) | `status` | ASTRO_SUCCESS if this struct is valid; otherwise an error code. | +| [`astro_status_t`](#astro_status_t) | `status` | `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. | | [`astro_time_t`](#astro_time_t) | `time` | The date and time of the observation. | | `double` | `mag` | The visual magnitude of the body. Smaller values are brighter. | | `double` | `phase_angle` | The angle in degrees between the Sun and the Earth, as seen from the body. Indicates the body's phase as seen from the Earth. | @@ -2068,7 +2068,7 @@ Returned by the functions [`Astronomy_Illumination`](#Astronomy_Illumination) an | Type | Member | Description | | ---- | ------ | ----------- | -| [`astro_status_t`](#astro_status_t) | `status` | ASTRO_SUCCESS if this struct is valid; otherwise an error code. | +| [`astro_status_t`](#astro_status_t) | `status` | `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. | | `int` | `quarter` | 0=new moon, 1=first quarter, 2=full moon, 3=third quarter. | | [`astro_time_t`](#astro_time_t) | `time` | The date and time of the lunar quarter. | @@ -2104,7 +2104,7 @@ You can create this structure directly, or you can call the convenience function | Type | Member | Description | | ---- | ------ | ----------- | -| [`astro_status_t`](#astro_status_t) | `status` | ASTRO_SUCCESS if this struct is valid; otherwise an error code. | +| [`astro_status_t`](#astro_status_t) | `status` | `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. | | `double` | `rot` | A normalized 3x3 rotation matrix. | @@ -2119,7 +2119,7 @@ You can create this structure directly, or you can call the convenience function | Type | Member | Description | | ---- | ------ | ----------- | -| [`astro_status_t`](#astro_status_t) | `status` | ASTRO_SUCCESS if this struct is valid; otherwise an error code. | +| [`astro_status_t`](#astro_status_t) | `status` | `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. | | [`astro_time_t`](#astro_time_t) | `time` | The time at which a searched-for event occurs. | @@ -2134,7 +2134,7 @@ You can create this structure directly, or you can call the convenience function | Type | Member | Description | | ---- | ------ | ----------- | -| [`astro_status_t`](#astro_status_t) | `status` | ASTRO_SUCCESS if this struct is valid; otherwise an error code. | +| [`astro_status_t`](#astro_status_t) | `status` | `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. | | [`astro_time_t`](#astro_time_t) | `mar_equinox` | The date and time of the March equinox for the specified year. | | [`astro_time_t`](#astro_time_t) | `jun_solstice` | The date and time of the June soltice for the specified year. | | [`astro_time_t`](#astro_time_t) | `sep_equinox` | The date and time of the September equinox for the specified year. | @@ -2152,7 +2152,7 @@ You can create this structure directly, or you can call the convenience function | Type | Member | Description | | ---- | ------ | ----------- | -| [`astro_status_t`](#astro_status_t) | `status` | ASTRO_SUCCESS if this struct is valid; otherwise an error code. | +| [`astro_status_t`](#astro_status_t) | `status` | `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. | | `double` | `lat` | The latitude angle: -90..+90 degrees. | | `double` | `lon` | The longitude angle: 0..360 degrees. | | `double` | `dist` | Distance in AU. | @@ -2177,7 +2177,7 @@ The [`astro_time_t`](#astro_time_t) type contains `ut` to represent Universal Ti Both `tt` and `ut` are necessary for performing different astronomical calculations. Indeed, certain calculations (such as rise/set times) require both time scales. See the documentation for the `ut` and `tt` fields for more detailed information. -In cases where [`astro_time_t`](#astro_time_t) is included in a structure returned by a function that can fail, the astro_status_t field `status` will contain a value other than [`ASTRO_SUCCESS`](#ASTRO_SUCCESS); in that case the `ut` and `tt` will hold `NAN` (not a number). In general, when there is an error code stored in a struct field `status`, the caller should ignore all other values in that structure, including the `ut` and `tt` inside [`astro_time_t`](#astro_time_t). +In cases where [`astro_time_t`](#astro_time_t) is included in a structure returned by a function that can fail, the astro_status_t field `status` will contain a value other than `ASTRO_SUCCESS`; in that case the `ut` and `tt` will hold `NAN` (not a number). In general, when there is an error code stored in a struct field `status`, the caller should ignore all other values in that structure, including the `ut` and `tt` inside [`astro_time_t`](#astro_time_t). | Type | Member | Description | | ---- | ------ | ----------- | @@ -2217,7 +2217,7 @@ In cases where [`astro_time_t`](#astro_time_t) is included in a structure return | Type | Member | Description | | ---- | ------ | ----------- | -| [`astro_status_t`](#astro_status_t) | `status` | ASTRO_SUCCESS if this struct is valid; otherwise an error code. | +| [`astro_status_t`](#astro_status_t) | `status` | `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. | | `double` | `x` | The Cartesian x-coordinate of the vector in AU. | | `double` | `y` | The Cartesian y-coordinate of the vector in AU. | | `double` | `z` | The Cartesian z-coordinate of the vector in AU. | diff --git a/source/c/astronomy.c b/source/c/astronomy.c index 97d10535..863b9ef9 100644 --- a/source/c/astronomy.c +++ b/source/c/astronomy.c @@ -139,7 +139,7 @@ const char *Astronomy_BodyName(astro_body_t body) /** * @brief Returns the #astro_body_t value corresponding to the given English name. * @param name One of the following strings: Sun, Moon, Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto. - * @return If `name` is one of the strings (case-sensitive) listed above, the returned value is the corresponding #astro_body_t value, otherwise it is #BODY_INVALID. + * @return If `name` is one of the strings (case-sensitive) listed above, the returned value is the corresponding #astro_body_t value, otherwise it is `BODY_INVALID`. */ astro_body_t Astronomy_BodyCode(const char *name) { diff --git a/source/c/astronomy.h b/source/c/astronomy.h index bb3b5eb2..ba772a96 100644 --- a/source/c/astronomy.h +++ b/source/c/astronomy.h @@ -80,7 +80,7 @@ astro_status_t; * * In cases where astro_time_t is included in a structure returned by * a function that can fail, the astro_status_t field `status` will contain a value - * other than #ASTRO_SUCCESS; in that case the `ut` and `tt` will hold `NAN` (not a number). + * other than `ASTRO_SUCCESS`; in that case the `ut` and `tt` will hold `NAN` (not a number). * In general, when there is an error code stored in a struct field `status`, the * caller should ignore all other values in that structure, including the `ut` and `tt` * inside astro_time_t. @@ -162,7 +162,7 @@ astro_utc_t; */ typedef struct { - astro_status_t status; /**< ASTRO_SUCCESS if this struct is valid; otherwise an error code. */ + astro_status_t status; /**< `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. */ double x; /**< The Cartesian x-coordinate of the vector in AU. */ double y; /**< The Cartesian y-coordinate of the vector in AU. */ double z; /**< The Cartesian z-coordinate of the vector in AU. */ @@ -175,7 +175,7 @@ astro_vector_t; */ typedef struct { - astro_status_t status; /**< ASTRO_SUCCESS if this struct is valid; otherwise an error code. */ + astro_status_t status; /**< `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. */ double lat; /**< The latitude angle: -90..+90 degrees. */ double lon; /**< The longitude angle: 0..360 degrees. */ double dist; /**< Distance in AU. */ @@ -187,7 +187,7 @@ astro_spherical_t; */ typedef struct { - astro_status_t status; /**< ASTRO_SUCCESS if this struct is valid; otherwise an error code. */ + astro_status_t status; /**< `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. */ double angle; /**< An angle expressed in degrees. */ } astro_angle_result_t; @@ -243,7 +243,7 @@ astro_observer_t; */ typedef struct { - astro_status_t status; /**< ASTRO_SUCCESS if this struct is valid; otherwise an error code. */ + astro_status_t status; /**< `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. */ double ra; /**< right ascension in sidereal hours. */ double dec; /**< declination in degrees */ double dist; /**< distance to the celestial body in AU. */ @@ -258,7 +258,7 @@ astro_equatorial_t; */ typedef struct { - astro_status_t status; /**< ASTRO_SUCCESS if this struct is valid; otherwise an error code. */ + astro_status_t status; /**< `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. */ double ex; /**< Cartesian x-coordinate: in the direction of the equinox along the ecliptic plane. */ double ey; /**< Cartesian y-coordinate: in the ecliptic plane 90 degrees prograde from the equinox. */ double ez; /**< Cartesian z-coordinate: perpendicular to the ecliptic plane. Positive is north. */ @@ -288,7 +288,7 @@ astro_horizon_t; */ typedef struct { - astro_status_t status; /**< ASTRO_SUCCESS if this struct is valid; otherwise an error code. */ + astro_status_t status; /**< `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. */ double rot[3][3]; /**< A normalized 3x3 rotation matrix. */ } astro_rotation_t; @@ -309,7 +309,7 @@ astro_refraction_t; */ typedef struct { - astro_status_t status; /**< ASTRO_SUCCESS if this struct is valid; otherwise an error code. */ + astro_status_t status; /**< `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. */ astro_time_t time; /**< The time at which a searched-for event occurs. */ } astro_search_result_t; @@ -321,7 +321,7 @@ astro_search_result_t; */ typedef struct { - astro_status_t status; /**< ASTRO_SUCCESS if this struct is valid; otherwise an error code. */ + astro_status_t status; /**< `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. */ astro_time_t mar_equinox; /**< The date and time of the March equinox for the specified year. */ astro_time_t jun_solstice; /**< The date and time of the June soltice for the specified year. */ astro_time_t sep_equinox; /**< The date and time of the September equinox for the specified year. */ @@ -334,7 +334,7 @@ astro_seasons_t; */ typedef struct { - astro_status_t status; /**< ASTRO_SUCCESS if this struct is valid; otherwise an error code. */ + astro_status_t status; /**< `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. */ int quarter; /**< 0=new moon, 1=first quarter, 2=full moon, 3=third quarter. */ astro_time_t time; /**< The date and time of the lunar quarter. */ } @@ -346,7 +346,7 @@ astro_moon_quarter_t; * When calling #Astronomy_Search, the caller must pass in a callback function * compatible with the function-pointer type #astro_search_func_t * whose ascending root is to be found. That callback function must return astro_func_result_t. - * If the function call is successful, it will set `status` to #ASTRO_SUCCESS and `value` + * If the function call is successful, it will set `status` to `ASTRO_SUCCESS` and `value` * to the numeric value appropriate for the given date and time. * If the call fails for some reason, it should set `status` to an appropriate error value * other than `ASTRO_SUCCESS`; in the error case, to guard against any possible misuse of `value`, @@ -354,7 +354,7 @@ astro_moon_quarter_t; */ typedef struct { - astro_status_t status; /**< ASTRO_SUCCESS if this struct is valid; otherwise an error code. */ + astro_status_t status; /**< `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. */ double value; /**< The value returned by a function whose ascending root is to be found. */ } astro_func_result_t; @@ -399,7 +399,7 @@ astro_visibility_t; */ typedef struct { - astro_status_t status; /**< ASTRO_SUCCESS if this struct is valid; otherwise an error code. */ + astro_status_t status; /**< `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. */ astro_time_t time; /**< The date and time of the observation. */ astro_visibility_t visibility; /**< Whether the body is best seen in the morning or the evening. */ double elongation; /**< The angle in degrees between the body and the Sun, as seen from the Earth. */ @@ -415,7 +415,7 @@ astro_elongation_t; */ typedef struct { - astro_status_t status; /**< ASTRO_SUCCESS if this struct is valid; otherwise an error code. */ + astro_status_t status; /**< `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. */ astro_time_t time; /**< The date and time when the body crosses the specified hour angle. */ astro_horizon_t hor; /**< Apparent coordinates of the body at the time it crosses the specified hour angle. */ } @@ -429,7 +429,7 @@ astro_hour_angle_t; */ typedef struct { - astro_status_t status; /**< ASTRO_SUCCESS if this struct is valid; otherwise an error code. */ + astro_status_t status; /**< `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. */ astro_time_t time; /**< The date and time of the observation. */ double mag; /**< The visual magnitude of the body. Smaller values are brighter. */ double phase_angle; /**< The angle in degrees between the Sun and the Earth, as seen from the body. Indicates the body's phase as seen from the Earth. */ @@ -466,7 +466,7 @@ astro_apsis_kind_t; */ typedef struct { - astro_status_t status; /**< ASTRO_SUCCESS if this struct is valid; otherwise an error code. */ + astro_status_t status; /**< `ASTRO_SUCCESS` if this struct is valid; otherwise an error code. */ astro_time_t time; /**< The date and time of the apsis. */ astro_apsis_kind_t kind; /**< Whether this is a pericenter or apocenter event. */ double dist_au; /**< The distance between the centers of the bodies in astronomical units. */ diff --git a/source/python/README.md b/source/python/README.md index 7dc3a83b..71a43699 100644 --- a/source/python/README.md +++ b/source/python/README.md @@ -664,7 +664,7 @@ which are relative to the plane of the Earth's orbit around the Sun. | Type | Parameter | Description | | --- | --- | --- | -| [`EquatorialCoordinates`](#EquatorialCoordinates) | `equ` | Equatorial coordinates in the J2000 frame of reference. | +| [`Equatorial`](#Equatorial) | `equ` | Equatorial coordinates in the J2000 frame of reference. | ### Returns: [`EclipticCoordinates`](#EclipticCoordinates) Ecliptic coordinates in the J2000 frame of reference. @@ -745,7 +745,7 @@ Correction for aberration is optional, using the `aberration` parameter. | `bool` | `ofdate` | Selects the date of the Earth's equator in which to express the equatorial coordinates. If `True`, returns coordinates using the equator and equinox of date. If `False`, returns coordinates converted to the J2000 system. | | `bool` | `aberration` | If `True`, corrects for aberration of light based on the motion of the Earth with respect to the heliocentric origin. If `False`, does not correct for aberration. | -### Returns: [`EquatorialCoordinates`](#EquatorialCoordinates) +### Returns: [`Equatorial`](#Equatorial) Equatorial coordinates in the specified frame of reference. --- diff --git a/source/python/astronomy.py b/source/python/astronomy.py index 8090391e..2348f7d3 100644 --- a/source/python/astronomy.py +++ b/source/python/astronomy.py @@ -3379,7 +3379,7 @@ def Equator(body, time, observer, ofdate, aberration): Returns ------- - EquatorialCoordinates + Equatorial Equatorial coordinates in the specified frame of reference. """ gc_observer = _geo_pos(time, observer) @@ -3746,7 +3746,7 @@ def Ecliptic(equ): Parameters ---------- - equ : EquatorialCoordinates + equ : Equatorial Equatorial coordinates in the J2000 frame of reference. Returns