CelestialGet_Time_at_Solar_Altitude(Coordinate, Double) Method

Get times based on the specified Coordinate object's data 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(
	Coordinate c,
	double alt
)

Parameters

c  Coordinate
Coordinate
alt  Double
Altitude in degrees

Return Value

AltitudeEvents
AltitudeEvents

Example

The following example returns local event times based on the provided Coordinate object data and solar altitude.
C#
Coordinate coordinate = new Coordinate(40.0,-74.6, new DateTime(2018,3,1));
coordinate.Offset = -5; //Offset UTC Time by 8 hours to operate in local time

var sa = Celestial.Get_Time_at_Solar_Altitude(coordinate, 23.4);
Console.WriteLine(sa.Rising); //3/1/2018 8:49:35 AM
Console.WriteLine(sa.Setting); //3/1/2018 3:34:51 PM
Console.WriteLine(sa.Condition); //RiseAndSet;

See Also