public GllStandardGpsMessage(GpsMessage message) : base(StandardGpsMessageKind.Gll) { // Example of data fields: // "3110.2908", "N", "12123.2348", "E", "041139.000", "A", "A" Latitude = GpsValueParser.ParseLatitude(message.DataFields[0], message.DataFields[1]); Longitude = GpsValueParser.ParseLongitude(message.DataFields[2], message.DataFields[3]); UtcTimeOfDay = GpsValueParser.ParseUtcTime(message.DataFields[4]); DataValid = message.DataFields[5] == "A"; PositioningMode = GpsValueParser.ParsePositioningMode(message.DataFields[6]); }
public RmcStandardGpsMessage(GpsMessage message) : base(StandardGpsMessageKind.Rmc) { // Example of data fields: // "013732.000", "A", "3150.7238", "N", "11711.7278", "E", "0.00", "0.00", "220413", "", "", "A" UtcDateTime = GpsValueParser.ParseUtcDateTime(message.DataFields[8] + message.DataFields[0]); DataValid = message.DataFields[1] == "A"; Latitude = GpsValueParser.ParseLatitude(message.DataFields[2], message.DataFields[3]); Longitude = GpsValueParser.ParseLongitude(message.DataFields[4], message.DataFields[5]); Speed = GpsValueParser.ParseNullableDouble(message.DataFields[6]); CourseOverGround = GpsValueParser.ParseNullableDouble(message.DataFields[7]); PositioningMode = GpsValueParser.ParsePositioningMode(message.DataFields[11]); }
public GgaStandardGpsMessage(GpsMessage message) : base(StandardGpsMessageKind.Gga) { // Example of data fields: // "015540.000", "3150.68378", "N", "11711.93139", "E", "1", "17", "0.6", "0051.6", "M", "0.0", "M", "", "" UtcTimeOfDay = GpsValueParser.ParseUtcTime(message.DataFields[0]); Latitude = GpsValueParser.ParseLatitude(message.DataFields[1], message.DataFields[2]); Longitude = GpsValueParser.ParseLongitude(message.DataFields[3], message.DataFields[4]); FixStatus = GpsValueParser.ParseGgaFixStatus(message.DataFields[5]); NumberOfSatellites = GpsValueParser.ParseNullableInt(message.DataFields[6]); HorizontalDilutioOfPrecision = GpsValueParser.ParseNullableDouble(message.DataFields[7]); Altitude = GpsValueParser.ParseNullableDouble(message.DataFields[8]); GeoIdSeparation = GpsValueParser.ParseNullableDouble(message.DataFields[10]); DgpsAge = GpsValueParser.ParseNullableDouble(message.DataFields[12]); DgpsStateId = GpsValueParser.ParseNullableDouble(message.DataFields[13]); }