Пример #1
0
 public void MergeFrom(MPCControllerConf other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Ts != 0D)
     {
         Ts = other.Ts;
     }
     if (other.Cf != 0D)
     {
         Cf = other.Cf;
     }
     if (other.Cr != 0D)
     {
         Cr = other.Cr;
     }
     if (other.MassFl != 0)
     {
         MassFl = other.MassFl;
     }
     if (other.MassFr != 0)
     {
         MassFr = other.MassFr;
     }
     if (other.MassRl != 0)
     {
         MassRl = other.MassRl;
     }
     if (other.MassRr != 0)
     {
         MassRr = other.MassRr;
     }
     if (other.Eps != 0D)
     {
         Eps = other.Eps;
     }
     matrixQ_.Add(other.matrixQ_);
     matrixR_.Add(other.matrixR_);
     if (other.CutoffFreq != 0)
     {
         CutoffFreq = other.CutoffFreq;
     }
     if (other.MeanFilterWindowSize != 0)
     {
         MeanFilterWindowSize = other.MeanFilterWindowSize;
     }
     if (other.MaxIteration != 0)
     {
         MaxIteration = other.MaxIteration;
     }
     if (other.MaxLateralAcceleration != 0D)
     {
         MaxLateralAcceleration = other.MaxLateralAcceleration;
     }
     if (other.StandstillAcceleration != 0D)
     {
         StandstillAcceleration = other.StandstillAcceleration;
     }
     if (other.ThrottleDeadzone != 0D)
     {
         ThrottleDeadzone = other.ThrottleDeadzone;
     }
     if (other.BrakeDeadzone != 0D)
     {
         BrakeDeadzone = other.BrakeDeadzone;
     }
     if (other.latErrGainScheduler_ != null)
     {
         if (latErrGainScheduler_ == null)
         {
             latErrGainScheduler_ = new global::Apollo.Control.GainScheduler();
         }
         LatErrGainScheduler.MergeFrom(other.LatErrGainScheduler);
     }
     if (other.headingErrGainScheduler_ != null)
     {
         if (headingErrGainScheduler_ == null)
         {
             headingErrGainScheduler_ = new global::Apollo.Control.GainScheduler();
         }
         HeadingErrGainScheduler.MergeFrom(other.HeadingErrGainScheduler);
     }
     if (other.steerWeightGainScheduler_ != null)
     {
         if (steerWeightGainScheduler_ == null)
         {
             steerWeightGainScheduler_ = new global::Apollo.Control.GainScheduler();
         }
         SteerWeightGainScheduler.MergeFrom(other.SteerWeightGainScheduler);
     }
     if (other.feedforwardtermGainScheduler_ != null)
     {
         if (feedforwardtermGainScheduler_ == null)
         {
             feedforwardtermGainScheduler_ = new global::Apollo.Control.GainScheduler();
         }
         FeedforwardtermGainScheduler.MergeFrom(other.FeedforwardtermGainScheduler);
     }
     if (other.calibrationTable_ != null)
     {
         if (calibrationTable_ == null)
         {
             calibrationTable_ = new global::Apollo.Control.Calibrationtable.ControlCalibrationTable();
         }
         CalibrationTable.MergeFrom(other.CalibrationTable);
     }
 }
Пример #2
0
 public void MergeFrom(LatControllerConf other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Ts != 0D)
     {
         Ts = other.Ts;
     }
     if (other.PreviewWindow != 0)
     {
         PreviewWindow = other.PreviewWindow;
     }
     if (other.Cf != 0D)
     {
         Cf = other.Cf;
     }
     if (other.Cr != 0D)
     {
         Cr = other.Cr;
     }
     if (other.MassFl != 0)
     {
         MassFl = other.MassFl;
     }
     if (other.MassFr != 0)
     {
         MassFr = other.MassFr;
     }
     if (other.MassRl != 0)
     {
         MassRl = other.MassRl;
     }
     if (other.MassRr != 0)
     {
         MassRr = other.MassRr;
     }
     if (other.Eps != 0D)
     {
         Eps = other.Eps;
     }
     matrixQ_.Add(other.matrixQ_);
     reverseMatrixQ_.Add(other.reverseMatrixQ_);
     if (other.CutoffFreq != 0)
     {
         CutoffFreq = other.CutoffFreq;
     }
     if (other.MeanFilterWindowSize != 0)
     {
         MeanFilterWindowSize = other.MeanFilterWindowSize;
     }
     if (other.MaxIteration != 0)
     {
         MaxIteration = other.MaxIteration;
     }
     if (other.MaxLateralAcceleration != 0D)
     {
         MaxLateralAcceleration = other.MaxLateralAcceleration;
     }
     if (other.latErrGainScheduler_ != null)
     {
         if (latErrGainScheduler_ == null)
         {
             latErrGainScheduler_ = new global::Apollo.Control.GainScheduler();
         }
         LatErrGainScheduler.MergeFrom(other.LatErrGainScheduler);
     }
     if (other.headingErrGainScheduler_ != null)
     {
         if (headingErrGainScheduler_ == null)
         {
             headingErrGainScheduler_ = new global::Apollo.Control.GainScheduler();
         }
         HeadingErrGainScheduler.MergeFrom(other.HeadingErrGainScheduler);
     }
 }