コード例 #1
0
ファイル: NaviEngine.cs プロジェクト: kyangc/OR-DPSLAM
        private double _presetSl; //Used for predicting path with only direction

        #endregion Fields

        #region Constructors

        /// <summary>
        ///     Constructor of class NaviEngine.
        /// </summary>
        /// <param name="presl">Preset step length</param>
        /// <param name="precb">Preset campass bias</param>
        /// <param name="cellLength">Preset cell length</param>
        /// <param name="iniRange">Preset particle cloud radius</param>
        /// <param name="parNum">Number of particles using in the particle filter</param>
        public NaviEngine(double presl,
            double precb,
            double cellLength,
            double iniRange,
            int parNum)
        {
            StepId = 0;
            Radius = 0;

            _presetSl = presl;
            StepLength = presl;
            CampassBias = precb;

            _gp = new GaussianProcess(10000, 1);
            _pf = new ParticleFilter(presl, precb, cellLength, iniRange, parNum, _gp);

            Paths = new Dictionary<string, Dictionary<int, double[]>>
            {
                {"predict", PredictedPath = new Dictionary<int, double[]>()},
                {"inertia", InertiaPath = new Dictionary<int, double[]>()},
                {"real", RealPath = new Dictionary<int, double[]>()}
            };
        }
コード例 #2
0
ファイル: ParticleFilter.cs プロジェクト: kyangc/OR-DPSLAM
 public ParticleFilter(double presl,
     double precb,
     double cellL,
     double iniRange,
     int parNum,
     GaussianProcess gp)
 {
     _historyRss = new Dictionary<int, Dictionary<string, double>>();
     _og = new OccupancyGrid(cellL);
     _iniRange = iniRange;
     _preStepLength = presl;
     _preCampBias = precb;
     _parNum = parNum;
     _gp = gp;
 }