Click or drag to resize
DigitalRuneEphemeris Class
Computes the physically-based properties of sky objects like the sun and the moon.
Inheritance Hierarchy
SystemObject
  DigitalRune.GraphicsEphemeris

Namespace: DigitalRune.Graphics
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public class Ephemeris

The Ephemeris type exposes the following members.

Constructors
  NameDescription
Public methodEphemeris
Initializes a new instance of the Ephemeris class.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodStatic memberGetMoonlight
Computes the moonlight intensity.
Public methodStatic memberGetSunlight
Computes the sunlight intensity.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdate
Computes the derived values, like sun/moon positions, transformation matrices and light intensities. This method must be called when the location or time has changed.
Top
Properties
  NameDescription
Public propertyAltitude
Gets or sets the altitude (elevation) in meters above the mean sea level.
Public propertyEclipticToEquatorial
Gets the rotation matrix which converts directions from the ecliptic coordinate system to the equatorial coordinate system.
Public propertyEquatorialToGeographic
Gets the rotation matrix which converts directions from the equatorial coordinate system to the geographic coordinate system.
Public propertyEquatorialToWorld
Gets the transformation matrix which converts directions from the equatorial coordinate system to the world space.
Public propertyStatic memberExtraterrestrialSunlight
Gets the extraterrestrial sunlight intensity based on NASA data.
Public propertyLatitude
Gets or sets the latitude of the world space origin (using the Geographic coordinate space).
Public propertyLongitude
Gets or sets the longitude of the world space origin (using the Geographic coordinate space).
Public propertyMoonPhaseAngle
Gets the moon phase angle.
Public propertyMoonPhaseRelative
Gets the moon phase as a relative value.
Public propertyMoonPosition
Gets the moon position in world space.
Public propertySunDirectionRefracted
Gets the direction to the sun as seen from within the atmosphere considering optical refraction.
Public propertySunPosition
Gets the sun position in world space in meters.
Public propertyTime
Gets or sets the date and time relative to Coordinated Universal Time (UTC).
Top
Remarks

In astronomy and celestial navigation, an ephemeris (plural: ephemerides; from the Greek word ἐφημερίς ephēmeris "diary", "journal") gives the positions of astronomical objects in the sky at a given time or times. The class Ephemeris can be used to retrieve the positions of the sun and the moon. It also computes transformations which can be used to convert between different astronomical coordinate system. Further, the light contributions of the sun and the moon are estimated.

The input for all computations are the position (specified using Latitude, Longitude and Altitude) and the current Time. All derived values are computed when Update is called. That means, Update must be called every time the input properties are changed. It is not called automatically, so Update must be called at least once.

Following coordinate systems are used. All coordinate system are right-handed and can be used with cartesian coordinates (X, Y, Z) or polar coordinates (latitude, longitude).

Ecliptic Coordinate System:
This coordinate system is relative to the plane defined by the path of the sun or (which is the same) the plane in which the earth moves around the sun. That means, in the ecliptic system the latitude of the sun or the earth is always 0.
Latitude and longitude are 0 at the vernal equinox. Latitude in this space is also called declination. Longitude is also called right ascension.
Regarding Cartesian coordinates, the x and y axes are in the plane of the earth orbit. x is the axis where latitude and longitude are 0, which is equal to the vernal equinox. +z points north. The origin of the coordinate system can be the sun (heliocentric) or the earth (geocentric).

Equatorial Coordinate System:
This coordinate system is relative to the plane defined by the earth's equator. Latitude and longitude are 0 at the vernal equinox.
Regarding Cartesian coordinates, the x and y axes are in the plane of the equator. x is the axis where latitude and longitude are 0, which is equal to the vernal equinox. +y points east. +z points north. The origin of the coordinate system can be the sun (heliocentric) or the earth (geocentric).

Geographic Coordinate System:
This coordinate system is relative to the plane defined by the earth's equator. This system is like the Equatorial system but the longitude is 0 at Greenwich. This means, the difference to the Equatorial system is a constant longitude offset. This coordinate system is well known from school and globes. The properties Latitude, Longitude are relative to the Geographic Coordinate System.
Regarding Cartesian coordinates, the x and y axes are in the plane of the equator. x is the axis where latitude and longitude are 0, which is in the line of Greenwich. +y points east. +z points north.

World Space:
This coordinate system is relative to a place on the earth. Computer game levels use this coordinate system. It is also known as "Horizontal Coordinate System" or "Horizon Coordinates". The origin of this space is defined by Latitude, Longitude (in the Geographic coordinate system) and Altitude.
Regarding Cartesian coordinates, +x points east, +y points up, -z points north.

See Also