private void markPointBtn_Click(object sender, EventArgs e) { if (onceLocated) { GeoPlot.GeoCoordinate2D newPoint = new GeoPlot.GeoCoordinate2D(); newPoint.Latitude = port.Latitude; newPoint.Longitude = port.Longitude; geoPlot.AddMarkedPoint(newPoint); markedPoints.Add(new GeoPoint(port.Latitude, port.Longitude)); } }
private void gnssPort_GLL(object sender, GLLEventArgs e) { if ((!double.IsNaN(e.Latitude)) && (!double.IsNaN(e.Longitude))) { InvokeSetText(gnssLatLbl, Angle2Str(e.Latitude, true)); InvokeSetText(gnssLonLbl, Angle2Str(e.Longitude, false)); GeoPlot.GeoCoordinate2D newPoint = new GeoPlot.GeoCoordinate2D(); newPoint.Latitude = e.Latitude; newPoint.Longitude = e.Longitude; InvokeAddGNSSPoint(newPoint); gnssTrack.Add(new GeoPoint(e.Latitude, e.Longitude)); double dist = GetDistance2D(port.Latitude, port.Longitude, e.Latitude, e.Longitude); InvokeSetText(lblgnssDiffLbl, dist.ToString("F03", CultureInfo.InvariantCulture)); } }
private void port_PositionUpdated(object sender, EventArgs e) { InvokeSetText(latLbl, Angle2Str(port.Latitude, true)); InvokeSetText(lonLbl, Angle2Str(port.Longitude, false)); InvokeSetText(rerrLbl, port.RadialError.ToString("F03", CultureInfo.InvariantCulture)); InvokeSetText(depthLbl, port.Depth.ToString("F02", CultureInfo.InvariantCulture)); if (port.RadialError <= settingsProvider.Data.RadialErrorThreshold) { InvokeSetForeColor(rerrLbl, Color.Green); GeoPlot.GeoCoordinate2D newPoint = new GeoPlot.GeoCoordinate2D(); newPoint.Latitude = port.Latitude; newPoint.Longitude = port.Longitude; InvokeAddRNPoint(newPoint); TrackRecord trk = new TrackRecord(); trk.Location = new GeoPoint3DE(port.Latitude, port.Longitude, port.Depth, port.RadialError); trk.Buoy0Location = new GeoPoint(port.RedBASE_1.Latitude, port.RedBASE_1.Longitude); trk.Buoy1Location = new GeoPoint(port.RedBASE_2.Latitude, port.RedBASE_2.Longitude); trk.Buoy2Location = new GeoPoint(port.RedBASE_3.Latitude, port.RedBASE_3.Longitude); trk.Buoy3Location = new GeoPoint(port.RedBASE_4.Latitude, port.RedBASE_4.Longitude); track.Add(trk); } else { InvokeSetForeColor(rerrLbl, Color.Red); } locHyst = 0; onceLocated = true; }