1#ifndef __JDETECTOR__JCOMPASS__ 
    2#define __JDETECTOR__JCOMPASS__ 
   90      double A0 = data.AHRS_A0;
 
   91      double A1 = data.AHRS_A1;
 
   92      double A2 = data.AHRS_A2;
 
   94      double H0 = data.AHRS_H0;
 
   95      double H1 = data.AHRS_H1;
 
   96      double H2 = data.AHRS_H2;
 
  126      this->
roll  = atan2(A1, A2);
 
  127      this->
pitch = atan2(-A0, sqrt(A1*A1 + A2*A2));
 
 
  147      this->
pitch = 2.0*atan2(sqrt(1.0 + tp), sqrt(1.0 - tp) ) - M_PI / 2.0;
 
 
  160      return static_cast<const JCompass&
>(*this);
 
 
  171      static_cast<JCompass&
>(*this) = compass;
 
 
  189      return (Rz * Ry * Rx);
 
 
  202      const double cy = cos(0.5 * 
yaw);
 
  203      const double sy = sin(0.5 * 
yaw);
 
  204      const double cp = cos(0.5 * 
pitch);
 
  205      const double sp = sin(0.5 * 
pitch);
 
  206      const double cr = cos(0.5 * 
roll);
 
  207      const double sr = sin(0.5 * 
roll);
 
  210                           sr * cp * cy - cr * sp * sy,
 
  211                           cr * sp * cy + sr * cp * sy,
 
  212                           cr * cp * sy - sr * sp * cy);
 
 
  257                const double    precision = std::numeric_limits<double>::min())
 const 
  259      return (fabs(
getYaw()   - compass.
getYaw())   <= precision &&
 
 
  271    void correct(
const double declination, 
const double meridian)
 
  273      this->
yaw -= declination;
 
  274      this->
yaw += meridian;
 
 
  335      out << compass.
pitch;
 
 
 
Data structure for compass in three dimensions.
 
double getYaw() const
Get yaw compass.
 
const JCompass & getCompass() const
Get compass.
 
friend std::istream & operator>>(std::istream &in, JCompass &compass)
Read compasss from input.
 
void setCompass(const JCompass &compass)
Set compass.
 
JCompass(const JQuaternion3D &Q)
Constructor.
 
friend JWriter & operator<<(JWriter &out, const JCompass &compass)
Write compasss to output.
 
bool equals(const JCompass &compass, const double precision=std::numeric_limits< double >::min()) const
Check equality.
 
friend JReader & operator>>(JReader &in, JCompass &compass)
Read compasss from input.
 
JCompass(const JAHRS &data, const JAHRSCalibration &calibration)
Constructor.
 
JRotation3D getRotation() const
Get rotation matrix.
 
friend std::ostream & operator<<(std::ostream &out, const JCompass &compass)
Write compasss to output.
 
void correct(const double declination, const double meridian)
Correct compass for magnetic declination and meridian convergence angle.
 
double getRoll() const
Get roll compass.
 
JCompass(const double yaw, const double pitch, const double roll)
Constructor.
 
JQuaternion3D getQuaternion() const
Get quaternion.
 
JCompass()
Default constructor.
 
double getPitch() const
Get pitch compass.
 
Data structure for unit quaternion in three dimensions.
 
double getB() const
Get b value.
 
double getD() const
Get d value.
 
double getC() const
Get c value.
 
double getA() const
Get a value.
 
Interface for binary input.
 
Interface for binary output.
 
void transform(double &__x, double &__y, double &__z) const
Transform.
 
file Auxiliary data structures and methods for detector calibration.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
Template definition of auxiliary base class for comparison of data structures.