Files
astronomy/source/kotlin/doc/-vector/to-observer.md
Don Cross 53f5540f09 Kotlin: cleanup of code and documentation.
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`.
2022-04-27 14:04:42 -04:00

20 lines
1.2 KiB
Markdown

//[astronomy](../../../index.md)/[io.github.cosinekitty.astronomy](../index.md)/[Vector](index.md)/[toObserver](to-observer.md)
# toObserver
fun [toObserver](to-observer.md)(equator: [EquatorEpoch](../-equator-epoch/index.md)): [Observer](../-observer/index.md)
Calculates the geographic location corresponding to a geocentric equatorial vector.
This is the inverse function of [Observer.toVector](../-observer/to-vector.md). Given an equatorial vector from the center of the Earth to an observer on or near the Earth's surface, this function returns the geographic latitude, longitude, and elevation for that observer.
#### Return
The geographic coordinates corresponding to the vector.
## Parameters
| | |
|---|---|
| equator | Selects the date of the Earth's equator in which this vector is expressed. The caller may select [EquatorEpoch.J2000](../-equator-epoch/-j2000/index.md) to use the orientation of the Earth's equator at noon UTC on January 1, 2000, in which case this function corrects for precession and nutation of the Earth as it was at the moment specified by the time this.t. Or the caller may select [EquatorEpoch.OfDate](../-equator-epoch/-of-date/index.md) to use the Earth's equator at this.t as the orientation. |