AskGeo .NET
1.1.0
AskGeo Libraries for .NET
|
Provides the primary user-facing interface to the AskGeo Astronomy Library. The user should instantiate a single instance with the desired accuracy level. The library is thread safe, so a single Earth instance may be queried from several threads. More...
Public Member Functions | |
Earth (Stream dataFileStream, Accuracy accuracy) | |
ZenithEvent[] | GetSunZenithEvents (DateTime start, DateTime end, long maxTimeErrorMsecs, double latDeg, double lonDeg, double heightM, ZenithEventType[] types) |
ZenithEvent[] | GetMoonZenithEvents (DateTime start, DateTime end, long maxTimeErrorMsecs, double latDeg, double lonDeg, double heightM, ZenithEventType[] types) |
TopocentricCoordinates | GetSunTopocentricCoordinates (DateTime dateTime, double latDeg, double lonDeg, double heightM, bool includeRefraction) |
TopocentricCoordinates | GetMoonTopocentricCoordinates (DateTime dateTime, double latDeg, double lonDeg, double heightM, bool includeRefraction) |
void | Authorize (String s) |
Authorizes the use of the map object by providing a license String. | |
void | Authorize (Stream stream) |
Authorizes the use of the map object by providing a license file's input stream. The stream is closed upon completion. |
Provides the primary user-facing interface to the AskGeo Astronomy Library. The user should instantiate a single instance with the desired accuracy level. The library is thread safe, so a single Earth instance may be queried from several threads.
An Earth instance allows queries of the Sun and Moon related events that have taken place during a given time interval at a given location, as well as queries of the topocentric positions of the Sun and Moon from a given vantage point at a given time. The events that may be queried are enumerated in the ZenithEvent.Type enum. The topocentric coordinates that are returned include the azimuth, zenith, declination, right ascension, and distance to the body from the observer.
All times are provided as .NET DateTime instances. Angles are in degrees. In general, the units of a given variable are included as a suffix in the variable name.
AskGeo.Astronomy.Earth.Earth | ( | Stream | dataFileStream, |
Accuracy | accuracy | ||
) |
Constructs an Earth object with a given accuracy level.
accuracy | is the accuracy level (e.g., LOW_ACCURACY, MEDIUM_ACCURACY, or HIGH_ACCURACY). |
void AskGeo.Astronomy.Earth.Authorize | ( | String | s | ) |
Authorizes the use of the map object by providing a license String.
s | the license String. |
void AskGeo.Astronomy.Earth.Authorize | ( | Stream | stream | ) |
Authorizes the use of the map object by providing a license file's input stream. The stream is closed upon completion.
stream | an input stream to the license file. |
TopocentricCoordinates AskGeo.Astronomy.Earth.GetMoonTopocentricCoordinates | ( | DateTime | dateTime, |
double | latDeg, | ||
double | lonDeg, | ||
double | heightM, | ||
bool | includeRefraction | ||
) |
Returns the topocentric coordinates of the Moon at the given time and at the given location.
dateTime | is the time to query. |
latDeg | is the latitude of the observer in degrees. |
lonDeg | is the longitude of the observer in degrees. |
heightM | is the height in meters above the geoid (i.e., theoretical sea level). |
includeRefraction | should be true to include atmospheric refraction in the model. |
ZenithEvent [] AskGeo.Astronomy.Earth.GetMoonZenithEvents | ( | DateTime | start, |
DateTime | end, | ||
long | maxTimeErrorMsecs, | ||
double | latDeg, | ||
double | lonDeg, | ||
double | heightM, | ||
ZenithEventType[] | types | ||
) |
Returns an array of ZenithEvent objects that occurred for the Moon during the given time interval and at the given location.
start | is the start time of the closed interval. |
end | is the end time of the closed interval. |
maxTimeErrorMsecs | is the convergence criterion used in the numerical search methods. |
latDeg | is the latitude of the observer in degrees. |
lonDeg | is the longitude of the observer in degrees. |
heightM | is the height in meters above the geoid (i.e., theoretical sea level). |
types | is an array of ZenithEvent.Type enum values for the events that the user wishes to be returned. |
TopocentricCoordinates AskGeo.Astronomy.Earth.GetSunTopocentricCoordinates | ( | DateTime | dateTime, |
double | latDeg, | ||
double | lonDeg, | ||
double | heightM, | ||
bool | includeRefraction | ||
) |
Returns the topocentric coordinates of the Sun at the given time and at the given location.
dateTime | is the time to query. |
latDeg | is the latitude of the observer in degrees. |
lonDeg | is the longitude of the observer in degrees. |
heightM | is the height in meters above the geoid (i.e., theoretical sea level). |
includeRefraction | should be true to include atmospheric refraction in the model. |
ZenithEvent [] AskGeo.Astronomy.Earth.GetSunZenithEvents | ( | DateTime | start, |
DateTime | end, | ||
long | maxTimeErrorMsecs, | ||
double | latDeg, | ||
double | lonDeg, | ||
double | heightM, | ||
ZenithEventType[] | types | ||
) |
Returns an array of ZenithEvent objects that occurred for the Sun during the given time interval and at the given location.
start | is the start time of the closed interval. |
end | is the end time of the closed interval. |
maxTimeErrorMsecs | is the convergence criterion used in the numerical search methods. |
latDeg | is the latitude of the observer in degrees. |
lonDeg | is the longitude of the observer in degrees. |
heightM | is the height in meters above the geoid (i.e., theoretical sea level). |
types | is an array of ZenithEvent.Type enum values for the events that the user wishes to be returned. |