TOAFactor.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2 
3  * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4  * Atlanta, Georgia 30332-0415
5  * All Rights Reserved
6  * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7 
8  * See LICENSE for the license information
9 
10  * -------------------------------------------------------------------------- */
11 
20 #pragma once
21 
24 
25 namespace gtsam {
26 
28 class TOAFactor : public ExpressionFactor<double> {
30 
31  public:
40  TOAFactor(const Expression<Event>& eventExpression,
41  const Expression<Point3>& sensorExpression, double toaMeasurement,
42  const SharedNoiseModel& model, double speed = 330)
43  : ExpressionFactor<double>(
44  model, toaMeasurement,
45  Double_(TimeOfArrival(speed), eventExpression, sensorExpression)) {}
46 
55  TOAFactor(const Expression<Event>& eventExpression, const Point3& sensor,
56  double toaMeasurement, const SharedNoiseModel& model,
57  double speed = 330)
58  : TOAFactor(eventExpression, Expression<Point3>(sensor), toaMeasurement,
59  model, speed) {}
60 
61  static void InsertEvent(Key key, const Event& event,
62  std::shared_ptr<Values> values) {
63  values->insert(key, event);
64  }
65 };
66 
67 } // namespace gtsam
const gtsam::Symbol key('X', 0)
TOAFactor(const Expression< Event > &eventExpression, const Expression< Point3 > &sensorExpression, double toaMeasurement, const SharedNoiseModel &model, double speed=330)
Definition: TOAFactor.h:40
noiseModel::Diagonal::shared_ptr model
static void InsertEvent(Key key, const Event &event, std::shared_ptr< Values > values)
Definition: TOAFactor.h:61
leaf::MyValues values
A "Time of Arrival" factor - so little code seems hardly worth it :-)
Definition: TOAFactor.h:28
Expression< double > Double_
Definition: TOAFactor.h:29
traits
Definition: chartTesting.h:28
Time of arrival to given sensor.
Definition: Event.h:87
Space-time event.
Vector3 Point3
Definition: Point3.h:38
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:102
TOAFactor(const Expression< Event > &eventExpression, const Point3 &sensor, double toaMeasurement, const SharedNoiseModel &model, double speed=330)
Definition: TOAFactor.h:55
noiseModel::Base::shared_ptr SharedNoiseModel
Definition: NoiseModel.h:741


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:40:21