public KmlPoint(GpsPointData gps = null) { if (gps != null) { coordinates = string.Format("{0},{1}", gps.Longitude, gps.Latitude); } }
private void InitGpsInfo() { if (!_isGpsInfoInitialized) { if (GpsFileFormat == GpsFileFormat.DuDuBell) { if (File.Exists(NmeaFileName)) { _gpsInfo = GpsPointData.Convert(NMEAParser.NMEAParser.ReadFile(NmeaFileName)); } } else if (GpsFileFormat == GpsFileFormat.Viofo) { _gpsInfo = GpsPointData.Convert(NovatekViofoGPSParser.ViofoParser.ReadMP4FileGpsInfo(FrontFileName)); } else { _gpsInfo = new List <GpsPointData>(); //empty } CalculateDelay(FileDate); _isGpsInfoInitialized = true; } }
private string PointColor(GpsPointData gps, string iconStyleMapNameGreen, string iconStyleMapNameYellow, string iconStyleMapNameRed) { if (gps.SpeedMph < 20) { return(iconStyleMapNameGreen); } if (gps.SpeedMph > 60) { return(iconStyleMapNameRed); } return(iconStyleMapNameYellow); }
public void UpdateInfo(DashCamFileInfo gps, int pointIdx) { if (pointIdx >= 0) { GpsPointData inf = gps[pointIdx]; compass.Direction = inf.Course; txtSpeed.Text = "Speed: " + inf.SpeedMph.ToString("0.0 mph"); txtLat.Text = "Lattitude: " + SexagesimalAngle.ToString(inf.Latitude); txtLon.Text = "Longtitude: " + SexagesimalAngle.ToString(inf.Longitude); txtTime.Text = inf.FixTime.AddHours(gps.TimeZone).ToString("yyyy/MM/dd HH:mm:ss"); } else { compass.Direction = 0; txtSpeed.Text = "Speed: N/A"; txtLat.Text = "..."; txtLon.Text = "..."; txtTime.Text = "..."; } }
public Waypoint(GpsPointData i) { this.data = i; lat = i.Latitude; lon = i.Longitude; }
private Point GetPoint(GpsPointData data, GMapControl map) { GMap.NET.GPoint pt0 = map.FromLatLngToLocal(new GMap.NET.PointLatLng(data.Latitude, data.Longitude)); return(new Point(pt0.X, pt0.Y)); }