CelestialGet_Time_at_Solar_Altitude(Double, Double, DateTime, Double) Method

Get times (in UTC) at the provided solar position, date and altitude. Condition (AltitudeEvents) should be checked if either Rising or Setting values return null.

Definition

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

Parameters

lat  Double
Signed latitude
longi  Double
Signed longitude
date  DateTime
Date
alt  Double
Altitude in degrees

Return Value

AltitudeEvents
AltitudeEvents

Example

The following example returns UTC event times based on the provided lat/long, date and solar altitude.
C#
var sa = Celestial.Get_Time_at_Solar_Altitude(40.0, -74.6, new DateTime(2018,3,1), 23.4);
Console.WriteLine(sa.Rising); //3/1/2018 13:49:35 UTC
Console.WriteLine(sa.Setting); //3/1/2018 20:34:51 UTC
Console.WriteLine(sa.Condition); //RiseAndSet;

See Also