### Get Sun Position Source: https://github.com/kostebudinoski/suncalcnet/blob/master/README.md Calculates the azimuth and altitude of the sun for a given date, latitude, and longitude. Use this to determine the sun's position in the sky. ```csharp var date = new DateTime(2013, 3, 5, 0, 0, 0, DateTimeKind.Utc); var lat = 50.5; var lng = 30.5; var sunPosition = SunCalc.GetSunPosition(date, lat, lng); Assert.Equal(-2.5003175907168385, sunPosition.Azimuth, 15); Assert.Equal(-0.7000406838781611, sunPosition.Altitude, 15); ``` -------------------------------- ### Get Moon Illumination Source: https://github.com/kostebudinoski/suncalcnet/blob/master/README.md Calculates the moon's illumination fraction, phase, and angle for a given date. Use this to understand the current phase of the moon. ```csharp var date = new DateTime(2013, 3, 5, 0, 0, 0, DateTimeKind.Utc); var moonIllum = MoonCalc.GetMoonIllumination(date); Assert.Equal(0.4848068202456373, moonIllum.Fraction, 15); Assert.Equal(0.7548368838538762, moonIllum.Phase, 15); Assert.Equal(1.6732942678578346, moonIllum.Angle, 15); ``` -------------------------------- ### Get Sun Phases Source: https://github.com/kostebudinoski/suncalcnet/blob/master/README.md Retrieves a list of sun phase times (e.g., sunrise, sunset, dawn, dusk) for a given date, latitude, and longitude. This is useful for scheduling events or determining daylight periods. ```csharp var date = new DateTime(2013, 3, 5, 0, 0, 0, DateTimeKind.Utc); var lat = 50.5; var lng = 30.5; var sunPhases = SunCalc.GetSunPhases(date, lat, lng).ToList(); foreach (var sunPhase in sunPhases) { ... } ``` -------------------------------- ### Get Moon Position Source: https://github.com/kostebudinoski/suncalcnet/blob/master/README.md Calculates the azimuth, altitude, distance, and parallactic angle of the moon for a given date, latitude, and longitude. Use this to determine the moon's position and orientation. ```csharp var date = new DateTime(2013, 3, 5, 0, 0, 0, DateTimeKind.Utc); var lat = 50.5; var lng = 30.5; var moonPosition = MoonCalc.GetMoonPosition(date, lat, lng); Assert.Equal(-0.9783999522438226, moonPosition.Azimuth, 15); Assert.Equal(0.0145514822438922, moonPosition.Altitude, 15); Assert.Equal(364121.37256256194, moonPosition.Distance, 15); Assert.Equal(-0.59832117604234014, moonPosition.ParallacticAngle, 15); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.