Skip to content

Latest commit

 

History

History
79 lines (59 loc) · 2.79 KB

File metadata and controls

79 lines (59 loc) · 2.79 KB

Examples

Runnable examples demonstrating goeph features. Each example is a standalone main.go that can be run from the repository root.

Running

# Run any example from the repo root (needed for data/de440s.bsp path)
go run ./examples/positions/
go run ./examples/apparent/

Examples

Core positions and observations

Example Description
positions Load a BSP ephemeris and get planet positions (core workflow)
apparent Apparent positions with aberration and gravitational deflection
velocity Body velocities via Chebyshev polynomial derivatives
observefrom Observe from arbitrary bodies (not just Earth)

Coordinate transforms

Example Description
coordinates Convert positions to RA/Dec and ecliptic coordinates
geodetic Observer on Earth's surface, zenith direction
altaz Altitude and azimuth for a ground observer
galactic Convert positions to galactic coordinates

Time and angles

Example Description
timescales UTC/TT/UT1 time conversion chain, TDB-TT difference
sidereal GMST, GAST, and Earth Rotation Angle
separation Angular separation between the Sun and Moon
phase Phase angle and fraction illuminated for planets
elongation Moon elongation from Sun and lunar phase names
refraction Atmospheric refraction correction at various altitudes

Event search and almanac

Example Description
search Find season changes (equinoxes/solstices) using FindDiscrete
almanac Sunrise/sunset, moon phases, and seasons for a ground observer
eclipse Find lunar eclipses and classify them (penumbral/partial/total)

Orbital mechanics and photometry

Example Description
elements Osculating orbital elements from state vectors
magnitude Planetary visual magnitudes (Mallama & Hilton 2018)
kepler Kepler orbit propagation for asteroids and comets

Configuration

Example Description
nutation Compare NutationStandard vs NutationFull precision modes

Sky mapping

Example Description
projection Stereographic projection of planet positions onto a 2D plane
constellation Identify which IAU constellation a planet is in

Other

Example Description
units Working with Angle and Distance types
satellite SGP4 satellite propagation from TLE
lunarnodes Mean lunar node ecliptic longitudes