コード例 #1
0
        public UTMCoords GetUTM(int utmZone = 0)
        {
            if (Validate(gga))
            {
                return(UTMTools.ConvertLatLonToUTM(gga.Position, utmZone));
            }
            else if (Validate(rmc))
            {
                return(UTMTools.ConvertLatLonToUTM(rmc.Position, utmZone));
            }

            throw new MissingNmeaDataException("Missing RMC and GGA Sentences");
        }
コード例 #2
0
        public UTMCoords GetUTM(int zone = 0)
        {
            if (Validate(SentenceID.GGA))
            {
                return(UTMTools.ConvertLatLonToUTM(((PositionSentence)GetSentenceByPriority(SentenceID.GGA)).Position, zone));
            }
            else if (Validate(SentenceID.RMC))
            {
                return(UTMTools.ConvertLatLonToUTM(((PositionSentence)GetSentenceByPriority(SentenceID.RMC)).Position, zone));
            }

            throw new MissingNmeaDataException("Missing RMC and GGA Sentences");
        }