Click or drag to resize

CelestialCalculateCelestialTimes Method (Double, Double, DateTime, EagerLoad)

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

Namespace:  CoordinateSharp
Assembly:  CoordinateSharp (in CoordinateSharp.dll) Version: 2.12.1.1
Syntax
C#
public static Celestial CalculateCelestialTimes(
	double lat,
	double longi,
	DateTime date,
	EagerLoad el
)

Parameters

lat
Type: SystemDouble
Decimal format latitude
longi
Type: SystemDouble
Decimal format longitude
date
Type: SystemDateTime
Geographic DateTime
el
Type: CoordinateSharpEagerLoad
EagerLoad

Return Value

Type: Celestial
Celestial
Examples
The following example demonstrates how to create a fully populated Celestial object using static functions with EagerLoading solar cycle information only.
//Set EagerLoading parameters to only load solar cycle data for maximum efficiency
EagerLoad el = new EagerLoad(EagerLoadType.Celestial);
el.Extensions = new EagerLoad_Extensions(EagerLoad_ExtensionsType.Solar_Cycle);

//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), el);

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