CelestialCalculateSunData Method

Note: This API is now obsolete.
Calculate sun 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#
[ObsoleteAttribute("Use static method 'Celestial.CalculateCelestialTimes(double lat, double longi, DateTime date, EagerLoad el)'.")]
public static Celestial CalculateSunData(
	double lat,
	double longi,
	DateTime date
)

Parameters

lat  Double
latitude
longi  Double
longitude
date  DateTime
DateTime

Return Value

Celestial
Celestial (Partially Populated)

Example

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

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

See Also