23#include <gtsam_unstable/dllexport.h>
42 enum { dimension = 4 };
45 Event() : time_(0), location_(0, 0, 0) {}
51 Event(
double t,
double x,
double y,
double z)
52 : time_(t), location_(x, y, z) {}
54 double time()
const {
return time_; }
55 Point3 location()
const {
return location_; }
58 double height(OptionalJacobian<1, 4> H = boost::none)
const {
59 static const Matrix14 JacobianZ = (Matrix14() << 0, 0, 0, 1).finished();
60 if (H) *H = JacobianZ;
65 GTSAM_UNSTABLE_EXPORT
void print(
const std::string& s =
"")
const;
68 GTSAM_UNSTABLE_EXPORT
bool equals(
const Event& other,
69 double tol = 1e-9)
const;
73 return Event(time_ + v[0], location_ +
Point3(v.tail<3>()));
78 return Vector4::Zero();
91 typedef double result_type;
99 return event.time() + distance / speed_;
110 *H1 << 1.0, D1 / speed_;
114 return event.time() + distance / speed_;
Global functions in a separate testing namespace.
Definition chartTesting.h:28
double distance3(const Point3 &p1, const Point3 &q, OptionalJacobian< 1, 3 > H1, OptionalJacobian< 1, 3 > H2)
distance between two points
Definition Point3.cpp:27
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:36
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
Both ManifoldTraits and Testable.
Definition Manifold.h:120
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition OptionalJacobian.h:41
A space-time event models an event that happens at a certain 3D location, at a certain time.
Definition Event.h:37
Event(double t, const Point3 &p)
Constructor from time and location.
Definition Event.h:48
GTSAM_UNSTABLE_EXPORT void print(const std::string &s="") const
print with optional string
Definition Event.cpp:26
Event(double t, double x, double y, double z)
Constructor with doubles.
Definition Event.h:51
Event()
Default Constructor.
Definition Event.h:45
GTSAM_UNSTABLE_EXPORT bool equals(const Event &other, double tol=1e-9) const
equals with an tolerance
Definition Event.cpp:32
Event retract(const Vector4 &v) const
Updates a with tangent space delta.
Definition Event.h:72
Vector4 localCoordinates(const Event &q) const
Returns inverse retraction.
Definition Event.h:77
double operator()(const Event &event, const Point3 &sensor, OptionalJacobian< 1, 4 > H1=boost::none, OptionalJacobian< 1, 3 > H2=boost::none) const
Calculate time of arrival, with derivatives.
Definition Event.h:103
double measure(const Event &event, const Point3 &sensor) const
Calculate time of arrival.
Definition Event.h:97
TimeOfArrival(double speed=330)
Constructor with optional speed of signal, in m/sec.
Definition Event.h:94