Click or drag to resize

CelestialCalculateCelestialTimes Method (Double, Double, DateTime, Double)

Calculate celestial data based on latitude, longitude and UTC date with hours offset 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,
	double offset
)

Parameters

lat
Type: SystemDouble
Decimal format latitude
longi
Type: SystemDouble
Decimal format longitude
date
Type: SystemDateTime
Geographic DateTime
offset
Type: SystemDouble
Offset hours

Return Value

Type: Celestial
Celestial
Examples
The following example demonstrates how to create a fully populated Celestial object in local time using static functions.
//Get Celestial data at N 39, W 72 on 19-Mar-2019 10:10:12 Local using Pacific Standard Time offset in hours (-7)
Celestial cel = Celestial.CalculateCelestialTimes(39, -72, new DateTime(2019, 3, 19, 10, 10, 12), -7);
Console.WriteLine(cel.SunRise); //03:54:50 AM
See Also