當前位置: 首頁>>代碼示例>>C#>>正文


C# Pd0BottomTrack.GetRangeBeam3方法代碼示例

本文整理匯總了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.");
        }
開發者ID:rowetechinc,項目名稱:RTI,代碼行數:78,代碼來源:Pd0BottomTrackTest.cs

示例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.");
        }
開發者ID:rowetechinc,項目名稱:RTI,代碼行數:16,代碼來源:Pd0BottomTrackTest.cs


注:本文中的RTI.Pd0BottomTrack.GetRangeBeam3方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。