23#include <gtsam/dllexport.h>
40 inline constexpr static auto dimension = 4;
43 Event() : time_(0), location_(0, 0, 0) {}
49 Event(
double t,
double x,
double y,
double z)
50 : time_(t), location_(x, y, z) {}
52 double time()
const {
return time_; }
53 Point3 location()
const {
return location_; }
56 double height(OptionalJacobian<1, 4> H = {})
const {
57 static const Matrix14 JacobianZ{{0, 0, 0, 1}};
58 if (H) *H = JacobianZ;
63 void print(
const std::string& s =
"")
const;
66 bool equals(
const Event& other,
67 double tol = 1e-9)
const;
71 return Event(time_ + v[0], location_ +
Point3(v.tail<3>()));
76 return Vector4::Zero();
89 typedef double result_type;
97 return event.time() + distance / speed_;
108 *H1 << 1.0, D1 / speed_;
112 return event.time() + distance / speed_;
Global functions in a separate testing namespace.
Definition chartTesting.h:28
Vector3 Point3
As of GTSAM 4, in order to make GTSAM more lean, it is now possible to just typedef Point3 to Vector3...
Definition Point3.h:38
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:143
double distance3(const Point3 &p1, const Point3 &q, OptionalJacobian< 1, 3 > H1, OptionalJacobian< 1, 3 > H2)
distance between two points
Definition Point3.cpp:29
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition Group.h:37
Both ManifoldTraits and Testable.
Definition Manifold.h:156
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition OptionalJacobian.h:40
A space-time event models an event that happens at a certain 3D location, at a certain time.
Definition Event.h:35
Event(double t, const Point3 &p)
Constructor from time and location.
Definition Event.h:46
Event(double t, double x, double y, double z)
Constructor with doubles.
Definition Event.h:49
Event()
Default Constructor.
Definition Event.h:43
Event retract(const Vector4 &v) const
Updates a with tangent space delta.
Definition Event.h:70
Vector4 localCoordinates(const Event &q) const
Returns inverse retraction.
Definition Event.h:75
double measure(const Event &event, const Point3 &sensor) const
Calculate time of arrival.
Definition Event.h:95
double operator()(const Event &event, const Point3 &sensor, OptionalJacobian< 1, 4 > H1={}, OptionalJacobian< 1, 3 > H2={}) const
Calculate time of arrival, with derivatives.
Definition Event.h:101
TimeOfArrival(double speed=330)
Constructor with optional speed of signal, in m/sec.
Definition Event.h:92