public void TransformCorrelationSetValue() { float correlationThreshold = 25.0f; // Clone the current ensemble RTI.DataSet.Ensemble ensemble2 = ensemble1.Clone(); // Set the Correlation Data // 4 Beams, 5 Bins for (int binNum = 0; binNum < 5; binNum++) { for (int beamNum = 0; beamNum < 4; beamNum++) { ensemble2.CorrelationData.CorrelationData[binNum, beamNum] = correlationThreshold + 1.0f; } } Assert.IsTrue(ensemble2.IsInstrumentVelocityAvail); Assert.IsTrue(ensemble2.IsCorrelationAvail); // Transform the data Transform.ProfileTransform(ref ensemble2, AdcpCodec.CodecEnum.Binary, correlationThreshold, Transform.HeadingSource.ADCP, 0, 0); // Check the Instrument Velocity Data // 4 Beams, 5 Bins Assert.AreEqual(0.29238f, ensemble2.InstrumentVelocityData.InstrumentVelocityData[0, 0], 0.001); Assert.AreEqual(1.16952, ensemble2.InstrumentVelocityData.InstrumentVelocityData[0, 1], 0.001); Assert.AreEqual(-1.862311, ensemble2.InstrumentVelocityData.InstrumentVelocityData[0, 2], 0.001); Assert.AreEqual(-0.45, ensemble2.InstrumentVelocityData.InstrumentVelocityData[0, 3], 0.001); Assert.AreEqual(4.6780, ensemble2.InstrumentVelocityData.InstrumentVelocityData[1, 0], 0.001); Assert.AreEqual(18.71234, ensemble2.InstrumentVelocityData.InstrumentVelocityData[1, 1], 0.001); Assert.AreEqual(-13.8343, ensemble2.InstrumentVelocityData.InstrumentVelocityData[1, 2], 0.001); Assert.AreEqual(-7.2, ensemble2.InstrumentVelocityData.InstrumentVelocityData[1, 3], 0.001); // Check the Earth Velocity Data // 4 Beams, 5 Bins Assert.AreEqual(-1.160649, ensemble2.EarthVelocityData.EarthVelocityData[0, 0], 0.001); Assert.AreEqual(0.53873, ensemble2.EarthVelocityData.EarthVelocityData[0, 1], 0.001); Assert.AreEqual(-1.812215, ensemble2.EarthVelocityData.EarthVelocityData[0, 2], 0.001); Assert.AreEqual(-0.45, ensemble2.EarthVelocityData.EarthVelocityData[0, 3], 0.001); Assert.AreEqual(-18.038677, ensemble2.EarthVelocityData.EarthVelocityData[1, 0], 0.001); Assert.AreEqual(8.23564, ensemble2.EarthVelocityData.EarthVelocityData[1, 1], 0.001); Assert.AreEqual(-13.04626, ensemble2.EarthVelocityData.EarthVelocityData[1, 2], 0.001); Assert.AreEqual(-7.2, ensemble2.EarthVelocityData.EarthVelocityData[1, 3], 0.001); // All error velocities should be the same between instrument and earth velocity Assert.AreEqual(ensemble2.InstrumentVelocityData.InstrumentVelocityData[2, 3], ensemble2.EarthVelocityData.EarthVelocityData[2, 3], 0.001); Assert.AreEqual(ensemble2.InstrumentVelocityData.InstrumentVelocityData[3, 3], ensemble2.EarthVelocityData.EarthVelocityData[3, 3], 0.001); Assert.AreEqual(ensemble2.InstrumentVelocityData.InstrumentVelocityData[4, 3], ensemble2.EarthVelocityData.EarthVelocityData[4, 3], 0.001); }
public void TestReplaceSSNoRT() { RTI.DataSet.Ensemble ensemble2 = ensemble1.Clone(); // Change Subsystem ensemble2.EnsembleData.SubsystemConfig.SubSystem.Code = Subsystem.SUB_300KHZ_VERT_PISTON_C; // Add Range Tracking bool result = RTI.ScreenData.ReplacePressureVerticalBeam.Replace(ref ensemble2); Assert.AreEqual(5.5f, ensemble2.AncillaryData.TransducerDepth, 0.001); Assert.AreEqual(false, result); }