diff --git a/include/gnss/processor/processor_gnss_fix.h b/include/gnss/processor/processor_gnss_fix.h index 021c538ee52593aee364b05b45651601d6bec4ce..ebeeefab58531feacb82cd98513b9df495fb7f20 100644 --- a/include/gnss/processor/processor_gnss_fix.h +++ b/include/gnss/processor/processor_gnss_fix.h @@ -69,13 +69,13 @@ class ProcessorGnssFix : public ProcessorBase * * Returns true if processCapture() should be called after the provided capture arrived. */ - virtual bool triggerInCapture(CaptureBasePtr) override; + virtual bool triggerInCapture(CaptureBasePtr) const override; /** \brief trigger in key-frame * * The ProcessorTracker only processes incoming captures, then it returns false. */ - virtual bool triggerInKeyFrame(FrameBasePtr _keyframe_ptr, const Scalar& _time_tolerance) override {return false;} + virtual bool triggerInKeyFrame(FrameBasePtr _keyframe_ptr, const Scalar& _time_tolerance) const override {return false;} /** \brief store key frame * @@ -89,7 +89,7 @@ class ProcessorGnssFix : public ProcessorBase */ virtual bool storeCapture(CaptureBasePtr); - virtual bool voteForKeyFrame() override; + virtual bool voteForKeyFrame() const override; private: FactorBasePtr emplaceFactor(FeatureBasePtr _ftr_ptr); @@ -100,7 +100,7 @@ class ProcessorGnssFix : public ProcessorBase }; -inline bool ProcessorGnssFix::triggerInCapture(CaptureBasePtr) +inline bool ProcessorGnssFix::triggerInCapture(CaptureBasePtr) const { return true; } diff --git a/include/gnss/processor/processor_gnss_single_diff.h b/include/gnss/processor/processor_gnss_single_diff.h index ded70ac567b4d5247a61b1ad561b057a3ffa26fb..1c9fcea691b00911fb765e905b63796923f03f6e 100644 --- a/include/gnss/processor/processor_gnss_single_diff.h +++ b/include/gnss/processor/processor_gnss_single_diff.h @@ -82,15 +82,15 @@ class ProcessorGnssSingleDiff : public ProcessorBase * * Returns true if processCapture() should be called after the provided capture arrived. */ - virtual bool triggerInCapture(CaptureBasePtr) override; + virtual bool triggerInCapture(CaptureBasePtr) const override; /** \brief trigger in key-frame * * The ProcessorTracker only processes incoming captures, then it returns false. */ - virtual bool triggerInKeyFrame(FrameBasePtr _keyframe, const Scalar& _time_tolerance) override {return false;} + virtual bool triggerInKeyFrame(FrameBasePtr _keyframe, const Scalar& _time_tolerance) const override {return false;} - virtual bool voteForKeyFrame() override; + virtual bool voteForKeyFrame() const override; private: @@ -101,7 +101,7 @@ class ProcessorGnssSingleDiff : public ProcessorBase }; -inline bool ProcessorGnssSingleDiff::triggerInCapture(CaptureBasePtr) +inline bool ProcessorGnssSingleDiff::triggerInCapture(CaptureBasePtr) const { return true; } diff --git a/src/processor/processor_gnss_fix.cpp b/src/processor/processor_gnss_fix.cpp index 2eee30479497af96c2a2bea1b9e00f78724f4619..a7ce606d8f6841a4e59cfe74d16137af91d1b01e 100644 --- a/src/processor/processor_gnss_fix.cpp +++ b/src/processor/processor_gnss_fix.cpp @@ -139,7 +139,7 @@ bool ProcessorGnssFix::rejectOutlier(FactorBasePtr fac) return false; } -bool ProcessorGnssFix::voteForKeyFrame() +bool ProcessorGnssFix::voteForKeyFrame() const { // Depending on time since the last KF with gnssfix capture if (!last_KF_ || (incoming_capture_->getTimeStamp() - last_KF_->getTimeStamp()) > params_gnss_->time_th) diff --git a/src/processor/processor_gnss_single_diff.cpp b/src/processor/processor_gnss_single_diff.cpp index 7afcfd29d1b267bab7ca7609e18f5ef9ffc63cdd..cb41fabb8f177605f32f8a9cdd53a2af32b8d2d3 100644 --- a/src/processor/processor_gnss_single_diff.cpp +++ b/src/processor/processor_gnss_single_diff.cpp @@ -100,7 +100,7 @@ FactorBasePtr ProcessorGnssSingleDiff::emplaceFactor(FeatureBasePtr _ftr) return nullptr; } -bool ProcessorGnssSingleDiff::voteForKeyFrame() +bool ProcessorGnssSingleDiff::voteForKeyFrame() const { if (last_KF_==nullptr) return true;