public ParamCompare(GCSViews.Configuration config, Hashtable param, Hashtable param2) { InitializeComponent(); this.param = param; this.param2 = param2; this.config = config; processToScreen(); }
public ElevationProfile(List<PointLatLngAlt> locs, double homealt, GCSViews.FlightPlanner.altmode altmode) { InitializeComponent(); this.altmode = altmode; planlocs = locs; for (int a = 0; a < planlocs.Count; a++) { if (planlocs[a].Tag.Contains("ROI")) { planlocs.RemoveAt(a); a--; } } if (planlocs.Count <= 1) { CustomMessageBox.Show("Please plan something first", Strings.ERROR); return; } // get total distance distance = 0; PointLatLngAlt lastloc = null; foreach (PointLatLngAlt loc in planlocs) { if (loc == null) continue; if (lastloc != null) { distance += (int) loc.GetDistance(lastloc); } lastloc = loc; } this.homealt = homealt/CurrentState.multiplierdist; Form frm = Common.LoadingBox("Loading", "using srtm data"); //Downloading Google Earth Data gelocs = getGEAltPath(planlocs); srtmlocs = getSRTMAltPath(planlocs); frm.Close(); MissionPlanner.Utilities.Tracking.AddPage(this.GetType().ToString(), this.Text); }
static PointLatLng findClosestPoint(PointLatLng start, GCSViews.FlightPlanner.linelatlng line) { List<PointLatLng> list = new List<PointLatLng>(); list.Add(line.p1); list.Add(line.p2); PointLatLng closest = findClosestPoint(start, list); return closest; }