Ejemplo n.º 1
0
        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[]>()}
            };
        }
Ejemplo n.º 2
0
 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;
 }