CelestialGet_Time_At_Solar_Azimuth(Double, Coordinate) Method

Returns the estimated time of day at the provided coordinate based on the azimuth of the sun at the current date, with an azimuth delta of 1.

Definition

Namespace: CoordinateSharp
Assembly: CoordinateSharp (in CoordinateSharp.dll) Version: 3.1.1.1
XMLNS for XAML: Not mapped to an xmlns.
C#
public static DateTime? Get_Time_At_Solar_Azimuth(
	double azimuth,
	Coordinate c
)

Parameters

azimuth  Double
Sun azimuth in degrees
c  Coordinate
Coordinate

Return Value

NullableDateTime
DateTime?

Remarks

Returns null if azimuth does not exist for day or sun is down. May not be reliable in circumpolar regions

Example

C#
DateTime d = new DateTime(2023, 9, 29);
double azimuth = 190.1

Coordinate c = new Coordinate(47.3, -122, d);

DateTime timeAtAzimuth = Get_Time_At_Solar_Azimuth(azimuth, c);

Console.WriteLine($"TIME AT AZ: {timeAtAzimuth}"); //9/29/2023 1:31:03 PM

See Also