本文整理汇总了C#中RTI.Pd0BottomTrack.GetRangeBeam3方法的典型用法代码示例。如果您正苦于以下问题:C# Pd0BottomTrack.GetRangeBeam3方法的具体用法?C# Pd0BottomTrack.GetRangeBeam3怎么用?C# Pd0BottomTrack.GetRangeBeam3使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RTI.Pd0BottomTrack
的用法示例。
在下文中一共展示了Pd0BottomTrack.GetRangeBeam3方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DecodeRtiTest
public void DecodeRtiTest()
{
DataSet.BottomTrackDataSet rtiBT = new DataSet.BottomTrackDataSet(DataSet.Ensemble.DATATYPE_FLOAT, // Type of data stored (Float or Int)
30, // Number of bins
4, // Number of beams
DataSet.Ensemble.DEFAULT_IMAG, // Default Image
DataSet.Ensemble.DEFAULT_NAME_LENGTH, // Default Image length
DataSet.Ensemble.BottomTrackID); // Dataset ID
rtiBT.ActualPingCount = 5;
rtiBT.Range[0] = 3450.99f;
rtiBT.Range[1] = 1235.78f;
rtiBT.Range[2] = 2345.23f;
rtiBT.Range[3] = 3456.23f;
rtiBT.SNR[0] = 23f;
rtiBT.SNR[1] = 34f;
rtiBT.SNR[2] = 45f;
rtiBT.SNR[3] = 56f;
rtiBT.Correlation[0] = 0.23f;
rtiBT.Correlation[1] = 0.34f;
rtiBT.Correlation[2] = 0.45f;
rtiBT.Correlation[3] = 0.56f;
rtiBT.EarthGood[0] = 5;
rtiBT.EarthGood[1] = 5;
rtiBT.EarthGood[2] = 2;
rtiBT.EarthGood[3] = 5;
rtiBT.Amplitude[0] = 23f;
rtiBT.Amplitude[1] = 34f;
rtiBT.Amplitude[2] = 45f;
rtiBT.Amplitude[3] = 56f;
Pd0BottomTrack bt = new Pd0BottomTrack(rtiBT, PD0.CoordinateTransforms.Coord_Beam);
Assert.AreEqual(rtiBT.ActualPingCount, bt.BtPingsPerEnsemble, "Pings per Ensemble is incorrect.");
Assert.AreEqual(0, bt.BtDelayBeforeReacquire, "Delay before reacquire is incorrect.");
Assert.AreEqual(0, bt.BtCorrMagMin, "Correlation Magintude Min is incorrect.");
Assert.AreEqual(0, bt.BtEvalAmpMin, "Evalation Amplitude Min is incorrect.");
Assert.AreEqual(0, bt.BtPercentGoodMin, "Percent Good Min is incorrect.");
Assert.AreEqual(0, bt.BtMode, "BT Mode is incorrect.");
Assert.AreEqual(0, bt.BtErrVelMax, "Error Velocity Max is incorrect.");
Assert.AreEqual(0, bt.Reserved13_16, "Reserved is incorrect.");
Assert.AreEqual(5, bt.BtRangeMsbBeam3, "Range Beam 3 MSB is incorrect.");
Assert.AreEqual(17424, bt.BtRangeLsbBeam3, "Range Beam 3 LSB is incorrect.");
Assert.AreEqual(345099, bt.GetRangeBeam3(), "GetRangeBeam3 is incorrect.");
Assert.AreEqual(1, bt.BtRangeMsbBeam2, "Range Beam 2 MSB is incorrect.");
Assert.AreEqual(58043, bt.BtRangeLsbBeam2, "Range Beam 2 LSB is incorrect.");
Assert.AreEqual(123578, bt.GetRangeBeam2(), "GetRangeBeam2 is incorrect.");
Assert.AreEqual(3, bt.BtRangeMsbBeam0, "Range Beam 0 MSB is incorrect.");
Assert.AreEqual(37918, bt.BtRangeLsbBeam0, "Range Beam 0 LSB is incorrect.");
Assert.AreEqual(234523, bt.GetRangeBeam0(), "GetRangeBeam0 is incorrect.");
Assert.AreEqual(5, bt.BtRangeMsbBeam1, "Range Beam 1 MSB is incorrect.");
Assert.AreEqual(17948, bt.BtRangeLsbBeam1, "Range Beam 1 LSB is incorrect.");
Assert.AreEqual(345623, bt.GetRangeBeam1(), "GetRangeBeam1 is incorrect.");
Assert.AreEqual(112, bt.BtAmplitudeBeam0, "Amplitude Beam 0 is incorrect.");
Assert.AreEqual(90, bt.BtAmplitudeBeam1, "Amplitude Beam 1 is incorrect.");
Assert.AreEqual(46, bt.BtAmplitudeBeam2, "Amplitude Beam 2 is incorrect.");
Assert.AreEqual(68, bt.BtAmplitudeBeam3, "Amplitude Beam 3 is incorrect.");
Assert.AreEqual(143, bt.BtCorrelationMagnitudeBeam0, "Correlation Beam 0 is incorrect.");
Assert.AreEqual(115, bt.BtCorrelationMagnitudeBeam1, "Correlation Beam 1 is incorrect.");
Assert.AreEqual(59, bt.BtCorrelationMagnitudeBeam2, "Correlation Beam 2 is incorrect.");
Assert.AreEqual(87, bt.BtCorrelationMagnitudeBeam3, "Correlation Beam 3 is incorrect.");
Assert.AreEqual(100, bt.BtPercentGoodBeam0, "Percent Good Beam 0 is incorrect.");
Assert.AreEqual(40, bt.BtPercentGoodBeam1, "Percent Good Beam 1 is incorrect.");
Assert.AreEqual(100, bt.BtPercentGoodBeam2, "Percent Good Beam 2 is incorrect.");
Assert.AreEqual(100, bt.BtPercentGoodBeam3, "Percent Good Beam 3 is incorrect.");
Assert.AreEqual(112, bt.BtRssiBeam0, "RSSI Beam 0 is incorrect.");
Assert.AreEqual(90, bt.BtRssiBeam1, "RSSI Beam 1 is incorrect.");
Assert.AreEqual(46, bt.BtRssiBeam2, "RSSI Beam 2 is incorrect.");
Assert.AreEqual(68, bt.BtRssiBeam3, "RSSI Beam 3 is incorrect.");
Assert.AreEqual(1, bt.BtGain, "Gain is incorrect.");
Assert.AreEqual(0, bt.Reserved82_85, "Reserved 82-85 is incorrect.");
}
示例2: TestGetRangeBeam3
public void TestGetRangeBeam3()
{
Pd0BottomTrack bt = new Pd0BottomTrack();
byte[] data = new byte[Pd0BottomTrack.DATATYPE_SIZE];
// Decode the data
data[22] = 0x39; // LSB LSB
data[23] = 0x30; // LSB MSB (12345)
data[80] = 0x4C; // MSB (76)
bt.Decode(data);
// (76 * 65535 ) + 12345 = 4980736 + 12345 = 4993081
Assert.AreEqual(4993005, bt.GetRangeBeam3(), "GetRangeBeam3() is incorrect.");
}