Helios++
Helios software for LiDAR simulations
OscillatingMirrorBeamDeflector Class Reference

Class representing an oscillating mirror beam deflector. More...

#include <OscillatingMirrorBeamDeflector.h>

Inheritance diagram for OscillatingMirrorBeamDeflector:
Collaboration diagram for OscillatingMirrorBeamDeflector:

Public Member Functions

 OscillatingMirrorBeamDeflector (double scanAngleMax_rad, double scanFreqMax_Hz, double scanFreqMin_Hz, int scanProduct)
 Constructor for oscillating mirror beam deflector. More...
 
std::shared_ptr< AbstractBeamDeflectorclone () override
 
void _clone (std::shared_ptr< AbstractBeamDeflector > abd) override
 
void applySettings (std::shared_ptr< ScannerSettings > settings) override
 
void doSimStep () override
 
double computeTurningVelocityOffset ()
 Compute the turning velocity offset. More...
 
void setScanAngle_rad (double scanAngle_rad) override
 
void setScanFreq_Hz (double scanFreq_Hz) override
 
- Public Member Functions inherited from AbstractBeamDeflector
 AbstractBeamDeflector (double scanAngleMax_rad, double scanFreqMax_Hz, double scanFreqMin_Hz)
 Base constructor for beam deflectors. More...
 
virtual bool lastPulseLeftDevice ()
 Check if last pulse left device (true) or not (false) More...
 
Rotation getEmitterRelativeAttitude ()
 Get the relative emitter attitude. More...
 
RotationgetEmitterRelativeAttitudeByReference ()
 Get the relative emitter attitude by referencce. More...
 

Public Attributes

int cfg_device_scanProduct = 1000000
 Scan product to limit maximum scan angle and the scanning frequency.
 
int currentScanLinePulse = 0
 Current scan line pulse.
 
int cfg_device_turningPulses = 100
 How many pulses are required for the turning around. More...
 
double cfg_device_turningPulsesf = 100.0f
 Decimal encoding of cfg_device_turningPulses. More...
 
int cached_pulsesPerScanline = 0
 Pulses per scan line.
 
int cached_thresholdPulse = -1
 At which pulse step the turning around must be computed. cached_threshold_pulse = cached_pulsesPerScanline - cfg_device_turningPulses. More...
 
int cached_aHalfThresholdPulse = -1
 The starting point for first turning around stage on top peak. More...
 
int cached_halfThresholdPulse = -1
 The starting point for second turning around stage on top peak. More...
 
int cached_bHalfThresholdPulse = -1
 The ending point for second turning around stage on top peak. More...
 
double cached_halfTurningPulses = -1.0
 Half of the turning pulses, because they are required to compute turning velocity offset. More...
 
double cached_offsetScaleFactor = -1.0
 Offset scale factor used to speed-up turning velocity offset computations. cached_offsetScaleFactor = cached_halfTurningPulses * cached_angleBetweenPulses_rad. More...
 
- Public Attributes inherited from AbstractBeamDeflector
double cfg_device_scanFreqMax_Hz = 0
 Minimum scanning frequency (hertz)
 
double cfg_device_scanFreqMin_Hz = 0
 Maximum scanning frequency (hertz)
 
double cfg_device_scanAngleMax_rad = 0
 Maximum scanning angle (radians)
 
double cfg_setting_scanFreq_Hz = 0
 Scanning frequency (hertz)
 
double cfg_setting_scanAngle_rad = 0
 Scanning angle (radians)
 
double cfg_setting_verticalAngleMin_rad = 0
 Minimum vertical scanning angle (radians)
 
double cfg_setting_verticalAngleMax_rad = 0
 Maximum vertical scanning angle (radians)
 
double state_currentBeamAngle_rad = 0
 Current beam angle (radians)
 
double state_angleDiff_rad = 0
 Angle differential (radians)
 
double cached_angleBetweenPulses_rad
 Angle between pulses (radians)
 
Rotation cached_emitterRelativeAttitude = Rotation(glm::dvec3(1, 0, 0), 0)
 Relative emitter attitude.
 

Detailed Description

Class representing an oscillating mirror beam deflector.

Constructor & Destructor Documentation

◆ OscillatingMirrorBeamDeflector()

OscillatingMirrorBeamDeflector::OscillatingMirrorBeamDeflector ( double  scanAngleMax_rad,
double  scanFreqMax_Hz,
double  scanFreqMin_Hz,
int  scanProduct 
)
inline

Constructor for oscillating mirror beam deflector.

See also
OscillatingMirrorBeamDeflector::cfg_device_scanProduct
AbstractBeamDeflector::AbstractBeamDeflector( double, double, double)

Member Function Documentation

◆ applySettings()

void OscillatingMirrorBeamDeflector::applySettings ( std::shared_ptr< ScannerSettings settings)
overridevirtual

◆ computeTurningVelocityOffset()

double OscillatingMirrorBeamDeflector::computeTurningVelocityOffset ( )

Compute the turning velocity offset.

The turning velocity offset can be expressed as a set of 4 equations. For this purpose, let \(l\) be the number of pulses per scan line, \(c\) the current scan line pulse, \(n\) the number of pulses the turning around takes, \(\Delta\) the angle between pulses in radians and \(\epsilon_{n}(x)\) the function corresponding to turning velocity offset.

Equation for down to bottom peak offset:

\[ \left\{\begin{array}{lll} x & = & l - c \\ \epsilon_{n}(x) & = & \frac{n\Delta}{2} \left(1 - \frac{x}{n}\right)^2 \end{array}\right. \]

Equation for up from bottom peak offset:

\[ \left\{\begin{array}{lll} x & = & c \\ \epsilon_{n}(x) & = & \frac{n\Delta}{2} \left(1 - \frac{x}{n}\right)^2 \end{array}\right. \]

Equation for up to top peak offset:

\[ \left\{\begin{array}{lll} x & = & c - \frac{l}{2} + n \\ \epsilon_{n}(x) & = & - \frac{n\Delta}{2} \left(\frac{x}{n}\right)^2 \end{array}\right. \]

Equation for down from top peak offset:

\[ \left\{\begin{array}{lll} x & = & \frac{l}{2} + n - c \\ \epsilon_{n}(x) & = & - \frac{n\Delta}{2} \left(\frac{x}{n}\right)^2 \end{array}\right. \]

The function behavior of oscillating mirror velocity has been taken from: "The geometry of Airborne Laser Scanning in a Kinematical Framework" by Andreas Roncat. See pages 54 to 56 for more information.

◆ doSimStep()

void OscillatingMirrorBeamDeflector::doSimStep ( )
overridevirtual

◆ setScanAngle_rad()

void OscillatingMirrorBeamDeflector::setScanAngle_rad ( double  scanAngle_rad)
overridevirtual

◆ setScanFreq_Hz()

void OscillatingMirrorBeamDeflector::setScanFreq_Hz ( double  scanFreq_Hz)
overridevirtual

Member Data Documentation

◆ cached_aHalfThresholdPulse

int OscillatingMirrorBeamDeflector::cached_aHalfThresholdPulse = -1

◆ cached_bHalfThresholdPulse

int OscillatingMirrorBeamDeflector::cached_bHalfThresholdPulse = -1

◆ cached_halfThresholdPulse

int OscillatingMirrorBeamDeflector::cached_halfThresholdPulse = -1

◆ cached_halfTurningPulses

double OscillatingMirrorBeamDeflector::cached_halfTurningPulses = -1.0

Half of the turning pulses, because they are required to compute turning velocity offset.

See also
OscillatingMirrorBeamDeflector::computeTurningVelocityOffset

◆ cached_offsetScaleFactor

double OscillatingMirrorBeamDeflector::cached_offsetScaleFactor = -1.0

Offset scale factor used to speed-up turning velocity offset computations. cached_offsetScaleFactor = cached_halfTurningPulses * cached_angleBetweenPulses_rad.

See also
OscillatingMirrorBeamDeflector::cached_halfTurningPulses
OscillatingMirrorBeamDeflector::cached_angleBetweenPulses_rad

◆ cached_thresholdPulse

int OscillatingMirrorBeamDeflector::cached_thresholdPulse = -1

At which pulse step the turning around must be computed. cached_threshold_pulse = cached_pulsesPerScanline - cfg_device_turningPulses.

See also
OscillatingMirrorBeamDeflector::computeTurningVelocityOffset
OscillatingMirrorBeamDeflector::cached_pulsesPerScanline
OscillatingMirrorBeamDeflector::cfg_device_turningPulses

◆ cfg_device_turningPulses

int OscillatingMirrorBeamDeflector::cfg_device_turningPulses = 100

◆ cfg_device_turningPulsesf

double OscillatingMirrorBeamDeflector::cfg_device_turningPulsesf = 100.0f

Decimal encoding of cfg_device_turningPulses.

See also
OscillatingMirrorBeamDeflector::cfg_device_turningPulses

The documentation for this class was generated from the following files: