public void AircraftDidEnterRadarRangeEventTestLong() { RadarHandler rh = new RadarHandler (); Aircraft us = new Aircraft ("1", Vector<double>.Build.DenseOfArray(new double[3]{.002, 0, 0})); us.DataBuffer.Add(Vector<double>.Build.DenseOfArray(new double[3]{40,-89,3000})); Aircraft them = new Aircraft ("2", Vector<double>.Build.DenseOfArray(new double[3]{.002, 0, 0})); them.DataBuffer.Add(Vector<double>.Build.DenseOfArray(new double[3]{40,-89.09053,3000})); //test one, should be about 4.6nm appart, true since it is in the 6nm radius, longitude test Assert.AreEqual (true, rh.AircraftDidEnterRadarRangeEventTest (them)); }
public void AircraftDidEnterRadarRangeEventTestLat() { DataProcessor dp = new DataProcessor (); RadarHandler rh = new RadarHandler (); Aircraft us = new Aircraft ("1", Vector<double>.Build.DenseOfArray(new double[3]{.002, 0, 0})); us.DataBuffer.Add(Vector<double>.Build.DenseOfArray(new double[3]{40.037919,-89,3000})); Aircraft them = new Aircraft ("2", Vector<double>.Build.DenseOfArray(new double[3]{.002, 0, 0})); them.DataBuffer.Add(Vector<double>.Build.DenseOfArray(new double[3]{39.962085,-89,3000})); //test one, should be about 4.5nm appart on radar, true since it is in the 6nm radius, latitude test Assert.AreEqual (true, rh.AircraftDidEnterRadarRangeEventTest (them)); }