#ifndef __JACOUSTICS__JRECEIVER__ #define __JACOUSTICS__JRECEIVER__ #include "JLang/JObjectID.hh" #include "JGeometry3D/JPosition3D.hh" /** * \file * * Acoustic receiver. * \author mdejong */ namespace JACOUSTICS {} namespace JPP { using namespace JACOUSTICS; } namespace JACOUSTICS { using JLANG::JObjectID; using JGEOMETRY3D::JVector3D; using JGEOMETRY3D::JPosition3D; /** * Acoustic receiver. */ struct JReceiver : public JObjectID, public JPosition3D { /** * Default constructor. */ JReceiver() : t0_s(0.0) {} /** * Constructor. * * \param id identifier * \param pos position * \param t0_s time offset of clock [s] */ JReceiver(const int id, const JVector3D& pos, const double t0_s) : JObjectID (id), JPosition3D(pos), t0_s (t0_s) {} /** * Get time offset of clock. * * \return time offset [s] */ double getT0() const { return t0_s; } /** * Get corrected time. * * \param t_s time [s] * \return time [s] */ double getT(const double t_s) const { return t_s + t0_s; } /** * Get uncorrected time. * * \param t_s time [s] * \return time [s] */ double putT(const double t_s) const { return t_s - t0_s; } protected: double t0_s; }; } #endif