Learn R Programming

astronomyengine (version 0.1.0)

astro_search_transit: Search for a transit of Mercury or Venus

Description

Finds the first transit of Mercury or Venus after a specified date. A transit occurs when an inferior planet passes between the Sun and Earth, with the planet's silhouette visible against the Sun.

Usage

astro_search_transit(body, start_time)

Value

A list with elements:

start

Start time of the transit (POSIXct).

peak

Time of closest approach (POSIXct).

finish

End time of the transit (POSIXct).

separation

Angular separation at peak in arcminutes.

Arguments

body

Integer code for the planet. Use 1 for Mercury or 2 for Venus.

start_time

A POSIXct datetime for starting the search.

Examples

Run this code
start <- as.POSIXct("2025-01-01", tz = "UTC")
astro_search_transit(astro_body["MERCURY"], start)

Run the code above in your browser using DataLab