# Orbits and Insolation

A collection of functions are available for working with general elliptical orbits and insolation patterns for planets orbiting stars.

Function arguments are defined below

ArgumentDefinitionUnits
asemi-major axism
eeccentricity-
Eeccentric anomalyrad
ftrue anomaly or stellar longituderad
γobliquityrad
mstar masskg
pprecession anglerad
θlatituderad
θₛsubstellar latituderad
rₐapoapsis distancem
rₚperiapsis distancem
ttimesec
Torbital periodsec

The mass m, most precisely, should be the sum of the star mass and planet mass, $m_s + m_p$. For most cases the planet mass is negligible, however, and $m_s + m_p \approx m_s$.

The precession angle p is defined so that when $p=0$, the northern hemisphere is tilted directly toward the star at periapsis. This means that northern summer occurs when planet is closet to the star. Different values of $p ∈ [0,2π]$ control when in the orbital path the equinoxes and solstices occur. For example, if $p = π/2$, the vernal equinox occurs at periapsis and the northern hemisphere is moving into summer.

ClearSky.annualfluxfactorMethod
annualfluxfactor(e, θ, γ, p)

Compute the annually averaged flux factor for a latitude θ on a planet in a general elliptical orbit.

ClearSky.annualfluxfactorsMethod
annualfluxfactors(e, γ, p; nθ=181)

Compute a range of annually averaged flux factors for a planet in a general elliptical orbit. Returns a latitude vector (row values) and a vector of flux factors. nθ indicates the number of latitude samples.

ClearSky.diurnalfluxfactorMethod
diurnalfluxfactor(t, a, m, e, θ, γ, p)

Compute the diurnally averaged fraction of incoming stellar flux received by a point at latitude θ for a general elliptical orbit

ClearSky.diurnalfluxfactorMethod
diurnalfluxfactor(θ, f, γ)

Compute the diurnally averaged fraction of incoming stellar flux received by a point at latitude θ when the planet is at solar longitude (true anomaly) f, with obliquity γ

ClearSky.diurnalfluxfactorMethod
diurnalfluxfactor(θ, θₛ)

Compute the diurnally averaged fraction of incoming stellar flux received by a point at latitude θ when the substellar latitude is θₛ

ClearSky.diurnalfluxfactorsMethod
diurnalfluxfactors(a, m, e, γ, p; nt=251, nθ=181)

Compute a grid of diurnally averaged fractions of incoming stellar flux for a planet in a general elliptical orbit. Returns a time vector (column values) over one orbital period, latitude vector (row values), and the grid of flux factors. nt indicates the number of time samples around the orbit and nθ indicates the number of latitudes.

ClearSky.diurnalfluxfactorsMethod
diurnalfluxfactors(γ; nf=251, nθ=181)

Compute a grid of diurnally averaged fractions of incoming stellar flux received by a point at latitude θ for a planet with obliquity γ in a circular orbit. Returns a solar longitude vector (column values), latitude vector (row values), and the grid of flux factors. nf indicates the number of points around the orbit and nθ indicates the number of latitudes.

ClearSky.substellarlatitudeMethod
substellarlatitude(f, γ)

Compute the latitude of the substellar point for a given solar longitude f (true anomaly) and obliquity γ