Example #1
0
        static private TrackPoint ReadTrackPoint(gpxTrkTrksegTrkpt wptType)
        {
            TrackPoint waypoint = new TrackPoint();

            if (wptType.ageofdgpsdataSpecified)
            {
                waypoint.AgeOfGpsData = wptType.ageofdgpsdata;
            }
            waypoint.Comment     = wptType.cmt;
            waypoint.Description = wptType.desc;
            waypoint.DgpsId      = wptType.dgpsid;
            if (wptType.eleSpecified)
            {
                waypoint.Elevation = (double)wptType.ele;
            }
            if (wptType.fixSpecified)
            {
                waypoint.FixType = wptType.fix.ToString();
            }
            if (wptType.geoidheightSpecified)
            {
                waypoint.GeoidHeight = wptType.geoidheight;
            }
            if (wptType.hdopSpecified)
            {
                waypoint.HorizontalDilutionOfPrecision = wptType.hdop;
            }
            waypoint.Location = new Point2 <double> ((double)wptType.lon, (double)wptType.lat);
            if (wptType.magvarSpecified)
            {
                waypoint.MagneticVariation = wptType.magvar;
            }
            waypoint.Name = wptType.name;
            if (wptType.pdopSpecified)
            {
                waypoint.PositionDilutionOfPrecision = wptType.pdop;
            }
            //wptType.sat;
            waypoint.SourceOfData = wptType.src;
            waypoint.Symbol       = wptType.sym;
            if (wptType.timeSpecified)
            {
                waypoint.Time = wptType.time;
            }
            //wptType.type;
            if (wptType.vdopSpecified)
            {
                waypoint.VerticalDilutionOfPrecision = wptType.vdop;
            }
            if (wptType.timeSpecified)
            {
                waypoint.Time = wptType.time;
            }

            return(waypoint);
        }
Example #2
0
        private static TrackPoint ReadTrackPoint(gpxTrkTrksegTrkpt wptType)
        {
            TrackPoint waypoint = new TrackPoint ();

            if (wptType.ageofdgpsdataSpecified)
                waypoint.AgeOfGpsData = wptType.ageofdgpsdata;
            waypoint.Comment = wptType.cmt;
            waypoint.Description = wptType.desc;
            waypoint.DgpsId = wptType.dgpsid;
            if (wptType.eleSpecified)
                waypoint.Elevation = (double)wptType.ele;
            if (wptType.fixSpecified)
                waypoint.FixType = wptType.fix.ToString ();
            if (wptType.geoidheightSpecified)
                waypoint.GeoidHeight = wptType.geoidheight;
            if (wptType.hdopSpecified)
                waypoint.HorizontalDilutionOfPrecision = wptType.hdop;
            waypoint.Location = new Point2<double> ((double)wptType.lon, (double)wptType.lat);
            if (wptType.magvarSpecified)
                waypoint.MagneticVariation = wptType.magvar;
            waypoint.Name = wptType.name;
            if (wptType.pdopSpecified)
                waypoint.PositionDilutionOfPrecision = wptType.pdop;
            //wptType.sat;
            waypoint.SourceOfData = wptType.src;
            waypoint.Symbol = wptType.sym;
            if (wptType.timeSpecified)
                waypoint.Time = wptType.time;
            //wptType.type;
            if (wptType.vdopSpecified)
                waypoint.VerticalDilutionOfPrecision = wptType.vdop;
            if (wptType.timeSpecified)
                waypoint.Time = wptType.time;

            return waypoint;
        }