diff --git a/include/gnss/processor/processor_tracker_gnss.h b/include/gnss/processor/processor_tracker_gnss.h index 45e98bf204d0ba1f22920ad8cff807e860ae55c7..2339456f70b1205d0f5437e1d3ddb9f3df48572b 100644 --- a/include/gnss/processor/processor_tracker_gnss.h +++ b/include/gnss/processor/processor_tracker_gnss.h @@ -17,7 +17,7 @@ struct ParamsProcessorTrackerGnss : public ParamsProcessorTrackerFeature GnssUtils::Options gnss_opt; GnssUtils::Options fix_opt{GnssUtils::default_options}; double max_time_span; - bool remove_outliers, remove_outliers_tdcp; + bool remove_outliers, remove_outliers_tdcp, remove_outliers_with_fix; double outlier_residual_th; bool init_frames; @@ -25,10 +25,11 @@ struct ParamsProcessorTrackerGnss : public ParamsProcessorTrackerFeature ParamsProcessorTrackerGnss(std::string _unique_name, const ParamsServer& _server): ParamsProcessorTrackerFeature(_unique_name, _server) { - remove_outliers = _server.getParam<bool> (prefix + _unique_name + "/remove_outliers"); - outlier_residual_th = _server.getParam<double> (prefix + _unique_name + "/outlier_residual_th"); - init_frames = _server.getParam<bool> (prefix + _unique_name + "/init_frames"); - max_time_span = _server.getParam<double> (prefix + _unique_name + "/keyframe_vote/max_time_span"); + remove_outliers = _server.getParam<bool> (prefix + _unique_name + "/remove_outliers"); + remove_outliers_with_fix = _server.getParam<bool> (prefix + _unique_name + "/remove_outliers_with_fix"); + outlier_residual_th = _server.getParam<double> (prefix + _unique_name + "/outlier_residual_th"); + init_frames = _server.getParam<bool> (prefix + _unique_name + "/init_frames"); + max_time_span = _server.getParam<double> (prefix + _unique_name + "/keyframe_vote/max_time_span"); // GNSS OPTIONS (see rtklib.h) gnss_opt.sateph = _server.getParam<int> (prefix + _unique_name + "/gnss/sateph"); // satellite ephemeris/clock (0:broadcast ephemeris,1:precise ephemeris,2:broadcast + SBAS,3:ephemeris option: broadcast + SSR_APC,4:broadcast + SSR_COM,5: QZSS LEX ephemeris diff --git a/src/processor/processor_tracker_gnss.cpp b/src/processor/processor_tracker_gnss.cpp index 72046d47ef6bf027b5031674bce17539aa7d7a29..68991ea0d3a61355a171f126297fac0d2683300c 100644 --- a/src/processor/processor_tracker_gnss.cpp +++ b/src/processor/processor_tracker_gnss.cpp @@ -338,7 +338,7 @@ void ProcessorTrackerGnss::removeOutliers(FactorBasePtrList fac_list, CaptureBas // state for pseudoranges is fix solution if OK - if (cap == last_ptr_ and fix_last_.stat != 0) + if (cap == last_ptr_ and fix_last_.stat != 0 and params_tracker_gnss_->remove_outliers_with_fix) { WOLF_DEBUG("OUTLIERS COMPUTED USING fix_last"); x = sensor_gnss_->getREnuMap().transpose() * (sensor_gnss_->getREnuEcef() * fix_last_.pos + sensor_gnss_->gettEnuEcef() - sensor_gnss_->gettEnuMap());