Example #1
0
        public SettingsModel()
        {
            RecordingPath = Path.Combine(DataPath(), RECORDING_FOLDER);
            RecordMp3     = true;
            RecordWav     = true;

            SlowSagc = new SoftwareAgc {
                AttackTime = 25, DecayTime = 4000, ReferenceLevel = -8
            };
            MediumSagc = new SoftwareAgc {
                AttackTime = 15, DecayTime = 2000, ReferenceLevel = -8
            };
            FastSagc = new SoftwareAgc {
                AttackTime = 5, DecayTime = 200, ReferenceLevel = -8
            };

            StartFrequency = 88600000;

            AudioBuffer      = 0.3F;
            AfcThreshold     = 500;
            MeterUpdateSpeed = 5;

            DetailedAnalyze = true;
            AsyncAnalyze    = false;
        }
Example #2
0
        internal static SoftwareAgc FillManged(this SoftwareAgc agc, NativeDefinitions.SoftAgcData data)
        {
            agc.ReferenceLevel = data.iRefLevel;
            agc.AttackTime     = data.dwAttackTime;
            agc.DecayTime      = data.dwDecayTime;

            return(agc);
        }
Example #3
0
 internal static NativeDefinitions.SoftAgcData ToNative(this SoftwareAgc agc)
 {
     return(new NativeDefinitions.SoftAgcData
     {
         dwAttackTime = (uint)agc.AttackTime,
         dwDecayTime = (uint)agc.DecayTime,
         iRefLevel = (int)agc.ReferenceLevel
     });
 }
Example #4
0
        public SettingsModel()
        {
            RecordingPath = Path.Combine(DataPath(), RECORDING_FOLDER);
            RecordMp3     = true;
            RecordWav     = true;

            SlowSagc = new SoftwareAgc {
                AttackTime = 0.025, DecayTime = 4.000, ReferenceLevel = -8
            };
            MediumSagc = new SoftwareAgc {
                AttackTime = 0.015, DecayTime = 2.000, ReferenceLevel = -8
            };
            FastSagc = new SoftwareAgc {
                AttackTime = 0.005, DecayTime = 0.200, ReferenceLevel = -8
            };

            StartFrequency = 88600000;

            AudioBuffer      = 0.3F;
            AfcThreshold     = 500;
            MeterUpdateSpeed = 5;

            DetailedAnalyze = true;
            AsyncAnalyze    = false;

            // by Hossein
            IfParameter   = new BinParameters();
            Ddc1Parameter = new BinParameters();
            Ddc2Parameter = new BinParameters();

            IfParameter.MinimumIntensityDb   = -150;
            IfParameter.CalibrationAmplitude = 1;
            IfParameter.CalibrationOffset    = 0;

            Ddc1Parameter.MinimumIntensityDb   = -150;
            Ddc1Parameter.CalibrationAmplitude = 1;
            Ddc1Parameter.CalibrationOffset    = 0;

            Ddc2Parameter.MinimumIntensityDb   = -150;
            Ddc2Parameter.CalibrationAmplitude = 1;
            Ddc2Parameter.CalibrationOffset    = 0;
        }
Example #5
0
 public Demodulator Agc(SoftwareAgc agc)
 {
     _radio.Check(_api.SetAgcParams(_radio.GetHandle(), _ddc2.Channel(), agc.AttackTime, agc.DecayTime,
                                    agc.ReferenceLevel));
     return(this);
 }
Example #6
0
 public bool TryAgc(SoftwareAgc agc)
 {
     return(_api.SetAgcParams(_radio.GetHandle(), _ddc2.Channel(), agc.AttackTime, agc.DecayTime,
                              agc.ReferenceLevel));
 }
Example #7
0
        /// <summary>
        /// Function for setting the desired AGC behaviour. The AGC is active for as long as the reference level is below 0. The attack and decay times are automatically set to 1 if the values passed to the API are 0.
        /// </summary>
        /// <param name="agc"><see cref="Devices.SoftwareAgc"/> Gain control parameters</param>
        /// <returns>Returns <see cref="G313Demodulator"/></returns>
        public G313Demodulator SoftwareAgc(SoftwareAgc agc)
        {
            var result = TrySoftwareAgc(agc);

            return(CheckFluent(result, "failed to set software agc"));
        }
Example #8
0
 /// <summary>
 /// Function for setting the desired AGC behaviour. The AGC is active for as long as the reference level is below 0. The attack and decay times are automatically set to 1 if the values passed to the API are 0.
 /// </summary>
 /// <param name="agc"><see cref="Devices.SoftwareAgc"/> Gain control parameters</param>
 /// <returns>Returns true if parametars are set.</returns>
 public bool TrySoftwareAgc(SoftwareAgc agc)
 {
     return(G313DemodulatorApi.SetSoftAGC(GetHandle(), agc.ToNative()));
 }