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]);
        }
        public GsaStandardGpsMessage(GpsMessage message)
            : base(StandardGpsMessageKind.Gsa)
        {
            // Example of data fields:
            // "A", "3", "14", "06", "16", "31", "23", "", "", "", "", "", "", "", "1.66", "1.42", "0.84"

            Mode      = GpsValueParser.ParseGsaMode(message.DataFields[0]);
            FixStatus = GpsValueParser.ParseGsaFixStatus(message.DataFields[1]);

            SatelliteUsedPerChannelArray = new int?[12];
            for (int i = 0; i < SatelliteUsedPerChannelArray.Length; i++)
            {
                SatelliteUsedPerChannelArray[i] = GpsValueParser.ParseNullableInt(message.DataFields[2 + i]);
            }

            PositionDilutionOfPrecision   = GpsValueParser.ParseNullableDouble(message.DataFields[14]);
            HorizontalDilutionOfPrecision = GpsValueParser.ParseNullableDouble(message.DataFields[15]);
            VerticalDilutionOfPrecision   = GpsValueParser.ParseNullableDouble(message.DataFields[16]);
        }