CelestialGet_Time_At_Solar_Azimuth(Double, Coordinate, Double) Method

Returns the estimated time of day at the provided coordinate based on the azimuth of the sun at the current date with a specified azimuth delta.

Definition

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

Parameters

azimuth  Double
Sun azimuth in degrees
c  Coordinate
Coordinate
delta  Double
Error Delta

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