Skip to content

Latest commit

 

History

History
18 lines (11 loc) · 1.72 KB

search-max-elongation.md

File metadata and controls

18 lines (11 loc) · 1.72 KB

//astronomy/io.github.cosinekitty.astronomy/searchMaxElongation

searchMaxElongation

fun searchMaxElongation(body: Body, startTime: Time): ElongationInfo

Finds a date and time when Mercury or Venus reaches its maximum angle from the Sun as seen from the Earth.

Mercury and Venus are are often difficult to observe because they are closer to the Sun than the Earth is. Mercury especially is almost always impossible to see because it gets lost in the Sun's glare. The best opportunities for spotting Mercury, and the best opportunities for viewing Venus through a telescope without atmospheric interference, are when these planets reach maximum elongation. These are events where the planets reach the maximum angle from the Sun as seen from the Earth.

This function solves for those times, reporting the next maximum elongation event's date and time, the elongation value itself, the relative longitude with the Sun, and whether the planet is best observed in the morning or evening. See elongation for more details about the returned structure.

Parameters

body Either Body.Mercury or Body.Venus. Any other value will result in an exception. To find the best viewing opportunites for planets farther from the Sun than the Earth is (Mars through Pluto) use searchRelativeLongitude to find the next opposition event.
startTime The date and time at which to begin the search. The maximum elongation event found will always be the first one that occurs after this date and time.