mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-01-08 07:28:12 -05:00
Used IntelliJ IDEA's linter to perform code cleanup. There were unused variables, `var` that could be replaced with `val`, and other minor code style issues. While doing this, I also discovered that a lot of documentation links were broken. The fix is to stop intenting the text after a `@param`.
1.4 KiB
1.4 KiB
//astronomy/io.github.cosinekitty.astronomy/rotationAxis
rotationAxis
fun rotationAxis(body: Body, time: Time): AxisInfo
Calculates information about a body's rotation axis at a given time.
Calculates the orientation of a body's rotation axis, along with the rotation angle of its prime meridian, at a given moment in time.
This function uses formulas standardized by the IAU Working Group on Cartographics and Rotational Elements 2015 report, as described in the following document:
https://astropedia.astrogeology.usgs.gov/download/Docs/WGCCRE/WGCCRE2015reprint.pdf
See AxisInfo for more detailed information.
Return
North pole orientation and body spin angle.
Parameters
| body | One of the following values: Body.Sun, Body.Moon, Body.Mercury, Body.Venus, Body.Earth, Body.Mars, Body.Jupiter, Body.Saturn, Body.Uranus, Body.Neptune, Body.Pluto. |
| time | The time at which to calculate the body's rotation axis. |