Jpp  15.0.5
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JAHRSToolkit.hh
Go to the documentation of this file.
1 #ifndef __JDB_JAHRSTOOLKIT__
2 #define __JDB_JAHRSTOOLKIT__
3 
4 #include "JDB/JAHRS.hh"
5 
6 #include "JTools/JRange.hh"
7 
8 /**
9  * \author mdejong
10  */
11 namespace JDATABASE {}
12 namespace JPP { using namespace JDATABASE; }
13 
14 namespace JDATABASE {
15 
16 
17  /**
18  * Auxiliary data structure to check validity of AHRS data.
19  */
20  struct JAHRSValidity {
21 
23 
24  /**
25  * Default constructor.
26  *
27  * This constructor sets default ranges of acceptance of AHRS values.
28  */
30  {
31  A = range_type(0.5, 1.5);
32  H = range_type(0.1, 0.5);
33  }
34 
35 
36  /**
37  * Check validity of AHRS data.
38  *
39  * \param parameters AHRS data
40  * \return true if valid; else false
41  */
42  bool operator()(const JAHRS& parameters) const
43  {
44  double A0 = parameters.AHRS_A0;
45  double A1 = parameters.AHRS_A1;
46  double A2 = parameters.AHRS_A2;
47 
48  double H0 = parameters.AHRS_H0;
49  double H1 = parameters.AHRS_H1;
50  double H2 = parameters.AHRS_H2;
51 
52  return (A(sqrt(A0 * A0 + A1 * A1 + A2 * A2)) &&
53  H(sqrt(H0 * H0 + H1 * H1 + H2 * H2)));
54  }
55 
56 
59  };
60 }
61 
62 #endif
double AHRS_H2
Definition: JAHRS.hh:39
do rm f tmp H1
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
Definition: diff-Tuna.sh:38
JTOOLS::JRange< double > range_type
Definition: JAHRSToolkit.hh:22
double AHRS_A1
Definition: JAHRS.hh:32
double AHRS_H0
Definition: JAHRS.hh:37
Auxiliary class to define a range between two values.
double AHRS_A2
Definition: JAHRS.hh:33
bool operator()(const JAHRS &parameters) const
Check validity of AHRS data.
Definition: JAHRSToolkit.hh:42
JAHRSValidity()
Default constructor.
Definition: JAHRSToolkit.hh:29
double AHRS_A0
Definition: JAHRS.hh:31
double AHRS_H1
Definition: JAHRS.hh:38
Auxiliary data structure to check validity of AHRS data.
Definition: JAHRSToolkit.hh:20