Helios++
Helios software for LiDAR simulations
OscillatingMirrorBeamDeflector.h
1 #pragma once
2 
3 #include "AbstractBeamDeflector.h"
4 
121 
122 public:
123  // *** ATTRIBUTES *** //
124  // ******************** //
129  int cfg_device_scanProduct = 1000000;
134 
144 
145  // *** CACHE ATTRIBUTES *** //
146  // ************************** //
203 
204 
205  // *** CONSTRUCTION / DESTRUCTION *** //
206  // ************************************ //
214  double scanAngleMax_rad,
215  double scanFreqMax_Hz,
216  double scanFreqMin_Hz,
217  int scanProduct) :
219  scanAngleMax_rad,
220  scanFreqMax_Hz,
221  scanFreqMin_Hz
222  )
223  {
224  this->cfg_device_scanProduct = scanProduct;
225  }
226  std::shared_ptr<AbstractBeamDeflector> clone() override;
227  void _clone(std::shared_ptr<AbstractBeamDeflector> abd) override;
228 
229  // *** MAIN METHODS *** //
230  // ********************** //
234  void applySettings(std::shared_ptr<ScannerSettings> settings) override;
238  void doSimStep() override;
242  void restartDeflector() override;
243 
244  // *** UTIL METHODS *** //
245  // ********************** //
249  void updateBeamAngle();
258  void accelerateBeamAngle(
259  double const p,
260  double const pa,
261  double const norm,
262  double const sign
263  );
269  void linearBeamAngle(double const sign);
277  void decelerateBeamAngle(
278  double const p,
279  double const pb,
280  double const norm,
281  double const sign
282  );
283 
284 
285  // *** GETTERS and SETTERS *** //
286  // ***************************** //
290  void setScanAngle_rad(double scanAngle_rad) override;
294  void setScanFreq_Hz(double scanFreq_Hz) override;
295 };
Base abstract class for beam deflectors.
Definition: AbstractBeamDeflector.h:10
Class representing an oscillating mirror beam deflector.
Definition: OscillatingMirrorBeamDeflector.h:120
int cached_halfScanlinePulse
The number of the pulse at the half of the scanline.
Definition: OscillatingMirrorBeamDeflector.h:154
int cached_firstAccelerateScanlinePulse
The number of the scanline pulse where the first accelerate operation starts. The first accelerate op...
Definition: OscillatingMirrorBeamDeflector.h:160
int cfg_device_turningPulses
How many pulses are required for the turning around.
Definition: OscillatingMirrorBeamDeflector.h:143
int cached_secondLinearScanlinePulse
The number of scanline pulse where the second constant linear operation starts. The second linear ope...
Definition: OscillatingMirrorBeamDeflector.h:184
double cached_extremeNorm
The norm to be applied for acceleration and deceleration when at the extremes of the scanline (its st...
Definition: OscillatingMirrorBeamDeflector.h:202
void accelerateBeamAngle(double const p, double const pa, double const norm, double const sign)
Compute the beam angle acceleration.
Definition: OscillatingMirrorBeamDeflector.cpp:180
int cached_secondDecelerateScanlinePulse
The number of the scanline pulse where the second decelerate operation starts. The second decelerate ...
Definition: OscillatingMirrorBeamDeflector.h:190
int cached_pulsesPerScanline
Pulses per scan line.
Definition: OscillatingMirrorBeamDeflector.h:150
OscillatingMirrorBeamDeflector(double scanAngleMax_rad, double scanFreqMax_Hz, double scanFreqMin_Hz, int scanProduct)
Constructor for oscillating mirror beam deflector.
Definition: OscillatingMirrorBeamDeflector.h:213
void linearBeamAngle(double const sign)
Compute the beam angle linear behavior.
Definition: OscillatingMirrorBeamDeflector.cpp:190
double cached_middleNorm
The norm to be applied for acceleration and deceleration when at the middle stage of the scanline....
Definition: OscillatingMirrorBeamDeflector.h:196
void doSimStep() override
Definition: OscillatingMirrorBeamDeflector.cpp:97
void decelerateBeamAngle(double const p, double const pb, double const norm, double const sign)
Compute the beam angle deceleration.
Definition: OscillatingMirrorBeamDeflector.cpp:193
int cached_firstDecelerateScanlinePulse
The number of the scanline pulse where the first decelerate operation starts. The first decelerate op...
Definition: OscillatingMirrorBeamDeflector.h:172
int cached_firstLinearScanlinePulse
The number of the scanline pulse where the first constant linear operation starts....
Definition: OscillatingMirrorBeamDeflector.h:166
void setScanAngle_rad(double scanAngle_rad) override
Definition: OscillatingMirrorBeamDeflector.cpp:208
int cached_secondAccelerateScanlinePulse
The number of scanline pulse where the second accelerate operation starts. The second accelerate oper...
Definition: OscillatingMirrorBeamDeflector.h:178
int currentScanLinePulse
Current scan line pulse.
Definition: OscillatingMirrorBeamDeflector.h:133
int cfg_device_scanProduct
Scan product to limit maximum scan angle and the scanning frequency.
Definition: OscillatingMirrorBeamDeflector.h:129
void restartDeflector() override
Definition: OscillatingMirrorBeamDeflector.cpp:92
void applySettings(std::shared_ptr< ScannerSettings > settings) override
Definition: OscillatingMirrorBeamDeflector.cpp:59
void updateBeamAngle()
Update the current beam angle at each simulation step.
Definition: OscillatingMirrorBeamDeflector.cpp:116
void setScanFreq_Hz(double scanFreq_Hz) override
Definition: OscillatingMirrorBeamDeflector.cpp:227