Exemplo n.º 1
0
        public void PowerBurstBt30()
        {
            PredictionModel model = new PredictionModel();

            double _CEI_ = 0.249;
            double _DeploymentDuration_ = 30;
            int    _Beams_           = 4;
            double _SystemFrequency_ = 288000;
            bool   _CWPON_           = true;
            double _CWPBL_           = 1;
            double _CWPBS_           = 4;
            double _CWPBN_           = 30;
            double _CWPBB_LagLength_ = 1;

            Commands.AdcpSubsystemCommands.eCWPBB_TransmitPulseType _CWPBB_TransmitPulseType_ = Commands.AdcpSubsystemCommands.eCWPBB_TransmitPulseType.BROADBAND;
            double _CWPP_   = 1;
            double _CWPTBP_ = 0.5;
            bool   _CBTON_  = true;

            Commands.AdcpSubsystemCommands.eCBTBB_Mode _CBTBB_TransmitPulseType_ = Commands.AdcpSubsystemCommands.eCBTBB_Mode.BROADBAND_CODED;
            double _BeamAngle_        = 20;
            double _SpeedOfSound_     = 1490;
            double _SystemBootPower_  = 1.80;
            double _SystemWakeupTime_ = 0.40;
            double _SystemInitPower_  = 2.80;
            double _SystemInitTime_   = 0.25;
            bool   _BroadbandPower_   = true;
            double _SystemSavePower_  = 1.80;
            double _SystemSaveTime_   = 0.15;
            double _SystemSleepPower_ = 0.024;
            double _BeamDiameter_     = 0.075;
            double _CyclesPerElement_ = 12;

            int    _CBI_EnsemblesPerBurst_ = 4096;
            double _CBI_BurstInterval_     = 3600;
            int    _CBI_IsInterleaved_     = 0;

            double _BatteryCapacity_      = 440.0;
            double _BatteryDerate_        = 0.85;
            double _BatterySelfDischarge_ = 0.05;

            double temperature = 10.0;
            double salinity    = 35.0;
            double xdcrDepth   = 0.0;

            double power         = model.CalculatePowerBurst(_CEI_, _DeploymentDuration_, _Beams_, _SystemFrequency_, _CWPON_, _CWPBL_, _CWPBS_, _CWPBN_, _CWPBB_LagLength_, _CWPBB_TransmitPulseType_, _CWPP_, _CWPTBP_, _CBTON_, _CBTBB_TransmitPulseType_, _BeamAngle_, _SpeedOfSound_, _SystemBootPower_, _SystemWakeupTime_, _SystemInitPower_, _SystemInitTime_, _BroadbandPower_, _SystemSavePower_, _SystemSaveTime_, _SystemSleepPower_, _BeamDiameter_, _CyclesPerElement_, temperature, salinity, xdcrDepth, _CBI_EnsemblesPerBurst_, _CBI_BurstInterval_, _CBI_IsInterleaved_);
            double correctAnswer = 12475.41;

            Assert.AreEqual(correctAnswer, power, 0.01);

            double batteryUsage   = model.BatteryUsage(power, _DeploymentDuration_, _BatteryCapacity_, _BatteryDerate_, _BatterySelfDischarge_);
            double correctBattery = 33.36;

            Assert.AreEqual(correctBattery, batteryUsage, 0.01);
        }
Exemplo n.º 2
0
        public void PowerNB()
        {
            PredictionModel model = new PredictionModel();

            double _CEI_ = 1;
            double _DeploymentDuration_ = 30;
            int    _Beams_           = 4;
            double _SystemFrequency_ = 288000;
            bool   _CWPON_           = true;
            double _CWPBL_           = 1;
            double _CWPBS_           = 4;
            double _CWPBN_           = 30;
            double _CWPBB_LagLength_ = 1;

            Commands.AdcpSubsystemCommands.eCWPBB_TransmitPulseType _CWPBB_TransmitPulseType_ = Commands.AdcpSubsystemCommands.eCWPBB_TransmitPulseType.NARROWBAND;
            double _CWPP_   = 9;
            double _CWPTBP_ = 0.5;
            bool   _CBTON_  = true;

            Commands.AdcpSubsystemCommands.eCBTBB_Mode _CBTBB_TransmitPulseType_ = Commands.AdcpSubsystemCommands.eCBTBB_Mode.NARROWBAND_LONG_RANGE;
            double _BeamAngle_        = 20;
            double _SpeedOfSound_     = 1490;
            double _SystemBootPower_  = 1.80;
            double _SystemWakeupTime_ = 0.40;
            double _SystemInitPower_  = 2.80;
            double _SystemInitTime_   = 0.25;
            bool   _BroadbandPower_   = true;
            double _SystemSavePower_  = 1.80;
            double _SystemSaveTime_   = 0.15;
            double _SystemSleepPower_ = 0.024;
            double _BeamDiameter_     = 0.075;
            double _CyclesPerElement_ = 12;

            double _BatteryCapacity_      = 440.0;
            double _BatteryDerate_        = 0.85;
            double _BatterySelfDischarge_ = 0.05;

            double temperature = 10.0;
            double salinity    = 35.0;
            double xdcrDepth   = 0.0;

            double power         = model.CalculatePower(_CEI_, _DeploymentDuration_, _Beams_, _SystemFrequency_, _CWPON_, _CWPBL_, _CWPBS_, _CWPBN_, _CWPBB_LagLength_, _CWPBB_TransmitPulseType_, _CWPP_, _CWPTBP_, _CBTON_, _CBTBB_TransmitPulseType_, _BeamAngle_, _SpeedOfSound_, _SystemBootPower_, _SystemWakeupTime_, _SystemInitPower_, _SystemInitTime_, _BroadbandPower_, _SystemSavePower_, _SystemSaveTime_, _SystemSleepPower_, _BeamDiameter_, _CyclesPerElement_, temperature, salinity, xdcrDepth);
            double correctAnswer = 34770.30;

            Assert.AreEqual(correctAnswer, power, 0.01);

            double batteryUsage   = model.BatteryUsage(power, _DeploymentDuration_, _BatteryCapacity_, _BatteryDerate_, _BatterySelfDischarge_);
            double correctBattery = 92.97;

            Assert.AreEqual(correctBattery, batteryUsage, 0.01);
        }
Exemplo n.º 3
0
        public void RangeNB()
        {
            PredictionModel model = new PredictionModel();

            bool _CWPON_ = true;

            Commands.AdcpSubsystemCommands.eCWPBB_TransmitPulseType _CWPBB_TransmitPulseType_ = Commands.AdcpSubsystemCommands.eCWPBB_TransmitPulseType.NARROWBAND;
            double _CWPBS_ = 4.0;
            double _CWPBN_ = 30.0;
            double _CWPBL_ = 1.00;
            bool   _CBTON_ = true;

            Commands.AdcpSubsystemCommands.eCBTBB_Mode _CBTBB_TransmitPulseType_ = Commands.AdcpSubsystemCommands.eCBTBB_Mode.NARROWBAND_LONG_RANGE;
            double _SystemFrequency_  = 288000.0;
            double _BeamDiameter_     = 0.075;
            double _CyclesPerElement_ = 12.0;
            double _BeamAngle_        = 20;
            double _SpeedOfSound_     = 1490;
            double _CWPBB_LagLength_  = 1.0;
            bool   _BroadbandPower_   = true;

            double temperature = 10.0;
            double salinity    = 35.0;
            double xdcrDepth   = 0.0;

            PredictionModel.PredictedRanges ranges = model.GetPredictedRange(_CWPON_, _CWPBB_TransmitPulseType_, _CWPBS_, _CWPBN_, _CWPBL_, _CBTON_, _CBTBB_TransmitPulseType_, _SystemFrequency_, _BeamDiameter_, _CyclesPerElement_, _BeamAngle_, _SpeedOfSound_, _CWPBB_LagLength_, _BroadbandPower_, salinity, temperature, xdcrDepth);
            double correctWpRange             = 152.57;
            double correctBtRange             = 319.14;
            double correctFirstBin            = 5.025;
            double correctWpRangeUserSettings = _CWPBL_ + (_CWPBS_ * _CWPBN_);

            Assert.AreEqual(correctWpRange, ranges.WaterProfile, 0.01);
            Assert.AreEqual(correctBtRange, ranges.BottomTrack, 0.01);
            Assert.AreEqual(correctFirstBin, ranges.FirstBinPosition);
            Assert.AreEqual(correctWpRangeUserSettings, ranges.ProfileRangeSettings);
        }