/* ---------------------------------------------------------------------------- * GTSAM Copyright 2010, Georgia Tech Research Corporation, * Atlanta, Georgia 30332-0415 * All Rights Reserved * Authors: Frank Dellaert, et al. (see THANKS for the full author list) * See LICENSE for the license information * -------------------------------------------------------------------------- */ /** * @file TOAFactor.h * @brief "Time of Arrival" factor * @author Frank Dellaert * @author Jay Chakravarty * @date December 2014 */ #include #include namespace gtsam { /// A "Time of Arrival" factor - so little code seems hardly worth it :-) class TOAFactor: public ExpressionFactor { typedef Expression Double_; public: /** * Constructor * @param some expression yielding an event * @param microphone_ expression yielding a microphone location * @param toaMeasurement time of arrival at microphone * @param model noise model */ TOAFactor(const Expression& eventExpression, const Expression& microphone_, double toaMeasurement, const SharedNoiseModel& model) : ExpressionFactor(model, toaMeasurement, Double_(&Event::toa, eventExpression, microphone_)) { } }; } //\ namespace gtsam