Make attitude factor copy and move assignable

release/4.3a0
Erik Nelson 2019-11-22 13:39:09 -08:00
parent eafc3794b4
commit 660234e4ad
1 changed files with 10 additions and 15 deletions

View File

@ -35,7 +35,7 @@ class AttitudeFactor {
protected: protected:
const Unit3 nZ_, bRef_; ///< Position measurement in Unit3 nZ_, bRef_; ///< Position measurement in
public: public:
@ -56,12 +56,19 @@ public:
Vector attitudeError(const Rot3& p, Vector attitudeError(const Rot3& p,
OptionalJacobian<2,3> H = boost::none) const; OptionalJacobian<2,3> H = boost::none) const;
const Unit3& nZ() const {
return nZ_;
}
const Unit3& bRef() const {
return bRef_;
}
/** Serialization function */ /** Serialization function */
friend class boost::serialization::access; friend class boost::serialization::access;
template<class ARCHIVE> template<class ARCHIVE>
void serialize(ARCHIVE & ar, const unsigned int /*version*/) { void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
ar & boost::serialization::make_nvp("nZ_", const_cast<Unit3&>(nZ_)); ar & boost::serialization::make_nvp("nZ_", nZ_);
ar & boost::serialization::make_nvp("bRef_", const_cast<Unit3&>(bRef_)); ar & boost::serialization::make_nvp("bRef_", bRef_);
} }
}; };
@ -118,12 +125,6 @@ public:
boost::optional<Matrix&> H = boost::none) const { boost::optional<Matrix&> H = boost::none) const {
return attitudeError(nRb, H); return attitudeError(nRb, H);
} }
Unit3 nZ() const {
return nZ_;
}
Unit3 bRef() const {
return bRef_;
}
private: private:
@ -204,12 +205,6 @@ public:
} }
return e; return e;
} }
Unit3 nZ() const {
return nZ_;
}
Unit3 bRef() const {
return bRef_;
}
private: private: