### Initialize Coordinate Object Source: https://github.com/tronald/coordinatesharp/blob/master/CoordinateSharp/README.md Demonstrates two ways to initialize a Coordinate object: using signed decimal degrees or by parsing a formatted string. Both methods require a DateTime object for the time context. ```csharp //Initialize with signed degree (standard method) Coordinate c = new Coordinate(47.6062, -122.3321, new DateTime(2018,6,5,10,10,0)); //OR simply parse from a string Coordinate c = Coordinate.Parse("N 47º 36.372' W 122º 19.926'", new DateTime(2018,6,5,10,10,0); ``` -------------------------------- ### Initialize CoordinateSharp Coordinate Source: https://github.com/tronald/coordinatesharp/blob/master/CoordinateSharp.Magnetic/README.md Demonstrates how to initialize a Coordinate object using signed decimal degrees or by parsing a string. Includes setting the date and time for celestial calculations. ```C# //Seattle coordinates on 5 Jun 2018 @ 10:10 AM (UTC) //Signed-Decimal Degree 47.6062, -122.3321 //Degrees Minutes Seconds N 47º 36' 22.32" W 122º 19' 55.56" /***********************************************************/ //Initialize with signed degree (standard method) Coordinate c = new Coordinate(47.6062, -122.3321, new DateTime(2018,6,5,10,10,0)); //OR simply parse from a string Coordinate c = Coordinate.Parse("N 47º 36.372' W 122º 19.926'", new DateTime(2018,6,5,10,10,0); ``` -------------------------------- ### Accessing Coordinate Properties Source: https://github.com/tronald/coordinatesharp/blob/master/CoordinateSharp/README.md Shows how to access various properties of a Coordinate object, including its string representation, seconds of latitude, UTM coordinates, and celestial information like sunset time and moon altitude. ```csharp Console.WriteLine(c); Console.WriteLine(c.Latitude.Seconds); Console.WriteLine(c.UTM); Console.WriteLine(c.CelestialInfo.SunSet); Console.WriteLine(c.CelestialInfo.MoonAltitude); ``` -------------------------------- ### Access CoordinateSharp Data Formats Source: https://github.com/tronald/coordinatesharp/blob/master/README.md Shows how to access different representations of a Coordinate object, including its string format, seconds, UTM, and celestial information like sunset and moon altitude. ```csharp Console.WriteLine(c); // N 47º 36' 22.32" W 122º 19' 55.56" Console.WriteLine(c.Latitude.Seconds); // 22.32 Console.WriteLine(c.UTM); // 10T 550200mE 5272748mN Console.WriteLine(c.CelestialInfo.SunSet); // 5-Jun-2018 4:02:00 AM Console.WriteLine(c.CelestialInfo.MoonAltitude); // 14.4169966277874 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.