4 * This software is distributed under a zlib-style license.
\r
5 * See license.txt for more information.
\r
9 using System.Collections.Generic;
\r
14 public class Coordinate
\r
16 public Coordinate(string latitude, string ns,
\r
17 string longitude, string ew)
\r
19 decimal latRaw = Decimal.Parse(latitude);
\r
20 decimal lngRaw = Decimal.Parse(longitude);
\r
21 decimal lat = Math.Floor(latRaw / 100m) + (latRaw % 100m) / 60m;
\r
22 decimal lng = Math.Floor(lngRaw / 100m) + (lngRaw % 100m) / 60m;
\r
23 Latitude = (ns == "S") ? -lat : lat;
\r
24 Longitude = (ns == "W") ? -lng : lng;
\r
28 public decimal Latitude
\r
33 public decimal Longitude
\r