/// <summary> /// Removes the receiver definition and clears the graphs /// </summary> private void OnDeleteReceiverClick(object sender, EventArgs e) { // when a receiver is deleted, we need to clear the graphs and delete the information in the tree // to delete info from a graph, just clear the graphs's curvelist DOPGraph.GraphPane.CurveList.Clear(); AzElGraph.GraphPane.CurveList.Clear(); NavAccGraph.GraphPane.CurveList.Clear(); // also, we need to clear all the data from the DOPData structure foreach (PointPairList ppl in DOPData) { ppl.Clear(); } // clear all the Azimuth / elevation data from their respective structures. AzElData_TimeBased.Clear(); AzElData_AzimuthBased.Clear(); // Clear all the Nav Accuracy Data from the zedGraph data structure that contain them. AsAccData.Clear(); PredAccData.Clear(); // always do these two steps, these make the graphs update themselves DOPGraph.AxisChange(); DOPGraph.Invalidate(); AzElGraph.AxisChange(); AzElGraph.Invalidate(); NavAccGraph.AxisChange(); NavAccGraph.Invalidate(); // Now clear the tree of the receiver, PSF and PAF information // Except for the first node (Almanac), remove all other nodes. string firstNodeName = rootNode.FirstNode.Text; rootNode.Nodes.Clear(); TreeNode newNode = new TreeNode(firstNodeName); rootNode.Nodes.Add(newNode); rootNode.Expand(); //Clear the textboxes that contain the PAF and PSF names. PAFName.Clear(); PSFName.Clear(); //enable and disable the appropriate buttons SetControlStates(false); }
/// <summary> /// Method to obtain the Predicted Nav Accuracy at each timestep and populate the /// data structures that will be used to draw the graph. /// </summary> /// <param name="accuracyPredictedEvaluator">Evaluator for Predicted Nav Accuracy.</param> private void ComputeValuesForPredictedAccGraph(Evaluator <NavigationAccuracyPredicted> accuracyPredictedEvaluator) { Duration dur = stopjd - startjd; double timestep = Double.Parse(TimeStep.Text); Duration ts = Duration.FromSeconds(timestep); PredAccData.Clear(); // create a new Confidence Interval ConfidenceInterval ci = new ConfidenceInterval(); // Initialize the progressbar with appropriate values progressBar1.Maximum = (int)dur.TotalSeconds; progressBar1.Step = (int)timestep; // now we'll iterate through time by adding seconds to the start time JulianDate object - // creating a new JulianDate each time step. for (JulianDate jd = startjd; jd <= stopjd; jd += ts) { try { NavigationAccuracyPredicted accuracyPredicted = accuracyPredictedEvaluator.Evaluate(jd); double txd = new XDate(jd.ToDateTime()); // Lets use the specified confidence interval for our Accuracy Predictions. if (accuracyPredicted != null) { // we're using a ConfidenceInterval instance here to convert the predicted nav accuracy to a standard // confidence percentile. PredAccData.Add(txd, ci.ConvertToGlobalPositioningSystemConfidence(accuracyPredicted.PositionSignalInSpace, (int)ConfIntvlUpDown.Value, ConfidenceIntervalVariableDimension.Three)); } } catch { } // update the progress bar - we're done with this time step! progressBar1.PerformStep(); } // reset the progress bar progressBar1.Value = 0; }