예제 #1
0
        public RadarViewModel()
        {
            var lowFreqSig = SignalGeneration.signalGenerator(new Types.SignalMetadata(
                                                                  Types.SignalType.Sin,
                                                                  false,
                                                                  amplitude: 2,
                                                                  startTime: 0,
                                                                  duration: duration,
                                                                  dutyCycle: 0.5,
                                                                  signalFrequency: 19,
                                                                  samplingFrequency: sampling));
            var lowFreqSig2 = SignalGeneration.signalGenerator(new Types.SignalMetadata(
                                                                   Types.SignalType.Sin,
                                                                   false,
                                                                   amplitude: 1,
                                                                   startTime: 0,
                                                                   duration: duration,
                                                                   dutyCycle: 0.5,
                                                                   signalFrequency: 71,
                                                                   samplingFrequency: sampling));
            var lowFreqSig3 = SignalGeneration.signalGenerator(new Types.SignalMetadata(
                                                                   Types.SignalType.Sin,
                                                                   false,
                                                                   amplitude: 1,
                                                                   startTime: 0,
                                                                   duration: duration,
                                                                   dutyCycle: 0.5,
                                                                   signalFrequency: 127,
                                                                   samplingFrequency: sampling));
            var lowFreqSig4 = SignalGeneration.signalGenerator(new Types.SignalMetadata(
                                                                   Types.SignalType.Sin,
                                                                   false,
                                                                   amplitude: 1,
                                                                   startTime: 0,
                                                                   duration: duration,
                                                                   dutyCycle: 0.5,
                                                                   signalFrequency: 157,
                                                                   samplingFrequency: sampling));

            RadarSignal = Operations.operate(Operations.OperationType.Addition,
                                             lowFreqSig4,
                                             lowFreqSig
                                             );

            SignalPlotModel.Series.Add(CreateSeries(RadarSignal.points, OxyColors.Black));
            SignalPlotModel.InvalidatePlot(true);

            SimulateCommand     = new RelayCommand(Simulate);
            NextPlotCommand     = new RelayCommand(MoveToNextPlot);
            PreviousPlotCommand = new RelayCommand(MoveToPreviousPlot);
        }
예제 #2
0
 public void Configure()
 {
     {                                                                        // configuring the ramps before calling wait function leaves flexibility to multithread the configurations in the future if desired
         double rxStartFrequency = this.rxStartFrequency + frequencyStep / 2; // place the tuning points in the middle of the sweep points
         double rxStopFrequency  = this.rxStopFrequency - frequencyStep / 2;
         rxFrequencyRamp = SignalGeneration.Ramp(rxStartFrequency, rxStopFrequency, frequencyStep);
         if (txStartFrequency != txStopFrequency) // check for fixed TX case
         {                                        // create independent frequency ramp if not fixed tx
             double txTmpStartFrequency = this.txStartFrequency + frequencyStep / 2;
             double txTmpStopFrequency  = this.txStopFrequency - frequencyStep / 2;
             txFrequencyRamp = SignalGeneration.Ramp(txTmpStartFrequency, txTmpStopFrequency, frequencyStep);
         }
         else // build array of equal values that are all the fixed tx frequency
         {
             txFrequencyRamp = SignalGeneration.Ramp(txStartFrequency, txStopFrequency, rxFrequencyRamp.Length);
         }
     }
     ConfigureSA();
     ConfigureSG();
 }
예제 #3
0
 /// <summary>
 /// Configures the test.
 /// </summary>
 public void Configure()
 {
     frequencyRamp = SignalGeneration.Ramp(startFrequency, stopFrequency, steps);
     ConfigureSA();
     ConfigureSG();
 }