CelestialCalculateCelestialTimes(Double, Double, DateTime) Method

Calculate celestial data based on latitude, longitude and UTC date at the location.

Definition

Namespace: CoordinateSharp
Assembly: CoordinateSharp (in CoordinateSharp.dll) Version: 2.21.1.1
XMLNS for XAML: Not mapped to an xmlns.
C#
public static Celestial CalculateCelestialTimes(
	double lat,
	double longi,
	DateTime date
)

Parameters

lat  Double
Decimal format latitude
longi  Double
Decimal format longitude
date  DateTime
Geographic DateTime

Return Value

Celestial
Celestial (Fully Populated)

Example

The following example demonstrates how to create a fully populated Celestial object using static functions.
C#
//Get Celestial data at N 39, W 72 on 19-Mar-2019 10:10:12 UTC
Celestial cel = Celestial.CalculateCelestialTimes(39, -72, new DateTime(2019, 3, 19, 10, 10, 12));

Console.WriteLine(cel.SunRise); //3/19/2019 10:54:50 AM
Console.WriteLine(cel.MoonRise); //3/19/2019 9:27:27 PM

See Also