Click or drag to resize

CelestialGet_Time_at_Solar_Altitude Method (Double, Double, DateTime, Double, Double)

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

Namespace:  CoordinateSharp
Assembly:  CoordinateSharp (in CoordinateSharp.dll) Version: 2.12.1.1
Syntax
C#
public static AltitudeEvents Get_Time_at_Solar_Altitude(
	double lat,
	double longi,
	DateTime date,
	double alt,
	double offset
)

Parameters

lat
Type: SystemDouble
Signed latitude
longi
Type: SystemDouble
Signed longitude
date
Type: SystemDateTime
Date
alt
Type: SystemDouble
Altitude in degrees
offset
Type: SystemDouble
UTC offset

Return Value

Type: AltitudeEvents
AltitudeEvents
Examples
The following example returns local event times based on the provided lat/long, date, solar altitude and UTC offset.
var sa = Celestial.Get_Time_at_Solar_Altitude(40.0, -74.6, new DateTime(2018,3,1), 23.4, -5);
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