MountingPars.hpp
1 #ifndef OPALS_MOUNTING_PARS_HPP_INCLUDED
2 #define OPALS_MOUNTING_PARS_HPP_INCLUDED
3 
4 #pragma once
5 
6 #include "opals/config.hpp"
7 #include "opals/Array.hpp"
8 
9 namespace opals {
10 
11 
12  //=============================================================================
13  /// \class MountingPars
14  /// Class describing the mounting calibration parameters
15  /// \author GM, AH
16  /// \date 19.01.2011
17  //=============================================================================
18  class OPALS_API MountingPars
19  {
20  public:
21  typedef opals::Array<double,3> Vector3D; ///< 3D-point coordinate array
22  typedef opals::Array<double,9> RotMat3D; ///< 3D rotation matrix (3x3 elements
23 
24  enum ReferenceSys{
25  global = 1,
26  local };
27 
28  enum CosysAlignemnt{
29  eCA_undef = 0,
30  //
31  eCA_frontRightDown,
32  eCA_frontDownLeft,
33  eCA_frontLeftUp,
34  eCA_frontUpRight,
35  //
36  eCA_backRightUp,
37  eCA_backDownRight,
38  eCA_backLeftDown,
39  eCA_backUpLeft,
40  //
41  eCA_leftUpFront,
42  eCA_leftBackUp,
43  eCA_leftDownBack,
44  eCA_leftFrontDown,
45  //
46  eCA_rightFrontUp,
47  eCA_rightUpBack,
48  eCA_rightBackDown,
49  eCA_rightDownFront,
50  //
51  eCA_upBackRight,
52  eCA_upLeftBack,
53  eCA_upFrontLeft,
54  eCA_upRightFront,
55  //
56  eCA_downFrontRight,
57  eCA_downBackLeft,
58  eCA_downRightBack,
59  eCA_downLeftFront
60  };
61 
62  public:
63  MountingPars();
64  virtual ~MountingPars();
65 
66  /// \name time lag
67  /// timeLag = t_trj - t_laser
68  ///@{
69  void setTimeLag( const double& dt ) { timeLag = dt; }
70  double getTimeLag() const { return timeLag; }
71  ///}@
72 
73  /// \name orientation of scanner system
74  ///@{
75  void setScannerSys( const CosysAlignemnt& scnSys ) { scannerSys = scnSys; }
76  CosysAlignemnt getScannerSys() const { return scannerSys; }
77  ///}@
78 
79 
80  /// \name shift vector (mounting)
81  /// ... ...
82  ///@{
83  void setMountShift( const Vector3D& sft ) { mountShift = sft; }
84  Vector3D getMountShift() const { return mountShift; }
85  ///}@
86 
87  /// \name reference of shift vector (mounting)
88  /// ... ...
89  ///@{
90  void setRefMountShift( const unsigned& refSft ) { refMountSft = refSft; }
91  unsigned getRefMountShift() const { return refMountSft; }
92  ///}@
93 
94  /// \name Rotation matrix (mounting)
95  /// ... ...
96  ///@{
97  void setMountRotation( const RotMat3D& rotmat ) { mountRotation = rotmat; }
98  RotMat3D getMountRotation() const { return mountRotation; }
99  ///}@
100 
101  /// \name shift vector (tilted mounting)
102  /// ... ...
103  ///@{
104  void setTiltShift( const Vector3D& sft ) { tiltShift = sft; }
105  Vector3D getTiltShift() const { return tiltShift; }
106  ///}@
107 
108  /// \name reference of shift vector (tilted mounting)
109  /// ... ...
110  ///@{
111  void setRefTiltShift( const unsigned& refSft ) { refTiltSft = refSft; }
112  unsigned getRefTiltShift() const { return refTiltSft; }
113  ///}@
114 
115  /// \name Rotation matrix (tilted mounting)
116  /// ... ...
117  ///@{
118  void setTiltRotation( const RotMat3D& rotmat ) { tiltRotation = rotmat; }
119  RotMat3D getTiltRotation() const { return tiltRotation; }
120  ///}@
121 
122 
123  /// \name Query global transformation
124  /// ... ...
125  ///@{
126  void getGlobalTransformation( Vector3D& shift, RotMat3D& rotmat);
127  ///}@
128 
129 
130 
131  private:
132  double timeLag;
133  unsigned refMountSft, refTiltSft;
134  CosysAlignemnt scannerSys;
135  Vector3D mountShift, tiltShift;
136  RotMat3D mountRotation, tiltRotation;
137  };
138 }
139 
140 #endif //OPALS_MOUNTING_PARS_HPP_INCLUDED