Module: SunPosition

Provides utilities for determining the Sun geographic and celestial location.
Source:

Methods

(static) celestialToGeographic(celestialLocation, date) → {Object}

Converts from celestial coordinates (declination and right ascension) to geographic coordinates (latitude, longitude) for a given julian date
Parameters:
Name Type Description
celestialLocation Object
date Date
Source:
Throws:
if celestialLocation or julianDate are missing
Type
ArgumentError
Returns:
the geographic location
Type
Object

(static) computeJulianDate(date) → {Number}

Computes the julian date from a javascript date object
Parameters:
Name Type Description
date Date
Source:
Throws:
if the date is missing
Type
ArgumentError
Returns:
the julian date
Type
Number

(static) getAsCelestialLocation(date) → {Object}

Computes the celestial location of the sun for a given julianDate
Parameters:
Name Type Description
date Date
Source:
Throws:
if the date is missing
Type
ArgumentError
Returns:
the celestial location
Type
Object

(static) getAsGeographicLocation(date) → {Object}

Computes the geographic location of the sun for a given date
Parameters:
Name Type Description
date Date
Source:
Throws:
if the date is missing
Type
ArgumentError
Returns:
the geographic location
Type
Object