public void Add(MotionEvaluator <Cartesian> evaluator, JulianDate epoch) { Cartesian position = evaluator.Evaluate(epoch); m_noAccessPositions.Add(position); m_satellites.Add(evaluator); }
private void OnTimeChanged(object sender, TimeChangedEventArgs e) { if (m_temeToFixedEvaluator == null) { return; } JulianDate date = e.Time; Matrix3By3 temeToFixed = new Matrix3By3(m_temeToFixedEvaluator.Evaluate(date)); KinematicTransformation transformation = m_fixedToFacilityTopoEvaluator.Evaluate(date, 0); List <int> satellitesToRemove = null; m_satellites.ClearPositions(); for (int i = 0; i < m_satellites.Count; ++i) { MotionEvaluator <Cartesian> satellite = m_satellites.GetSatellite(i); try { // Update position of marker representing this satellite Cartesian position = satellite.Evaluate(date).Rotate(temeToFixed); // Compute access from satellite to facility if (m_showAccess) { Cartesian positionInTopo = transformation.Transform(position); AzimuthElevationRange azimuthElevationRange = new AzimuthElevationRange(positionInTopo); m_satellites.AppendPosition(position, azimuthElevationRange.Elevation > 0.0); } else { m_satellites.AppendPosition(position, false); } } catch (Exception) { if (satellitesToRemove == null) { satellitesToRemove = new List <int>(); } satellitesToRemove.Add(i); } } // Remove satellites that could not be evaluated if (satellitesToRemove != null) { m_satellites.RemoveUsingIndexList(satellitesToRemove); SetText(m_satellites.Count); } m_satellites.SetMarkerBatches(); }