Protocol, classes and functions for celestial bodies References: [1] Meeus, Jean. Astronomical Algorithms 2nd Ed. Willman-Bell, Inc. 1998.
Protocol, classes and functions for celestial bodies References: [1] Meeus, Jean. _Astronomical Algorithms_ 2nd Ed. Willman-Bell, Inc. 1998.
Protocol for a celestial body
Protocol for a celestial body
(equatorial-coordinates this dt)
Calculate apparent right ascension and declination of a body. Input: this (Body instance) dt (org.joda.time.DateTime UTC) Returns a map with keys: :right-ascension (radians west of Greenwich) :declination (radians north of the celestial equator)
Calculate apparent right ascension and declination of a body. Input: this (Body instance) dt (org.joda.time.DateTime UTC) Returns a map with keys: :right-ascension (radians west of Greenwich) :declination (radians north of the celestial equator)
(standard-altitude this)
Returns the "standard" altitude, i.e. the geometric altitude of the center of the body at the time of apparent rising or setting Input: this (Body instance) Returns standard altitude (degrees)
Returns the "standard" altitude, i.e. the geometric altitude of the center of the body at the time of apparent rising or setting Input: this (Body instance) Returns standard altitude (degrees)
(local-coordinates body dt lon lat)
Calculate local coordinates of a celestial body Input: body (Body instance) dt (org.joda.time.DateTime UTC) lon - longitude (degrees East of Greenwich) lat - latitude (degrees North of the Equator) Returns a map with keys: :azimuth (radians westward from the South) :altitude (radians above the horizon)
Calculate local coordinates of a celestial body Input: body (Body instance) dt (org.joda.time.DateTime UTC) lon - longitude (degrees East of Greenwich) lat - latitude (degrees North of the Equator) Returns a map with keys: :azimuth (radians westward from the South) :altitude (radians above the horizon)
(passages body
date
lon
lat
&
{:keys [include-twilight precision] :or {precision 0.1}})
Calculate the UTC times of rising, transit and setting of a celestial body Input: body (Body instance) date (org.joda.time.LocalDate) lon - longitude (degrees East of Greenwich) lat - latitude (degrees North of the Equator) opts :include-twilight (one of "civil" "astronomical" "nautical" default nil) :precision - iterate until corrections are below this (degrees, default 0.1) Returns a map with keys: :rising (org.joda.time.DateTime UTC) :transit (org.joda.time.DateTime UTC) :setting (org.joda.time.DateTime UTC)
Calculate the UTC times of rising, transit and setting of a celestial body Input: body (Body instance) date (org.joda.time.LocalDate) lon - longitude (degrees East of Greenwich) lat - latitude (degrees North of the Equator) opts :include-twilight (one of "civil" "astronomical" "nautical" default nil) :precision - iterate until corrections are below this (degrees, default 0.1) Returns a map with keys: :rising (org.joda.time.DateTime UTC) :transit (org.joda.time.DateTime UTC) :setting (org.joda.time.DateTime UTC)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close