Helios++
Helios software for LiDAR simulations
AbstractDetector Class Referenceabstract

Base abstract class for detectors. More...

#include <AbstractDetector.h>

Inheritance diagram for AbstractDetector:
Collaboration diagram for AbstractDetector:

Public Member Functions

 AbstractDetector (std::shared_ptr< Scanner > scanner, double accuracy_m, double rangeMin_m)
 Base constructor for abstract detector. More...
 
virtual std::shared_ptr< AbstractDetectorclone ()=0
 
virtual void _clone (std::shared_ptr< AbstractDetector > ad)
 
virtual void shutdown ()
 Shutdown the detector when simulation has finished.
 
void writeMeasurement (Measurement &m)
 Write a measurement. More...
 
void writeMeasurements (std::list< Measurement *> &m)
 Write a list of measurements. More...
 
virtual void applySettings (std::shared_ptr< ScannerSettings > &settings)
 Apply scanner settings to the detector. More...
 
virtual void simulatePulse (thread_pool &pool, glm::dvec3 absoluteBeamOrigin, Rotation absoluteBeamAttitude, int state_currentPulseNumber, long currentGpsTime)=0
 Compute pulse simulation. More...
 
void setOutputFilePath (std::string path)
 Set path to output file. More...
 

Public Attributes

std::shared_ptr< Scannerscanner
 Scanner which the detector belongs to.
 
std::shared_ptr< MeasurementsBuffermBuffer
 Buffer to store measurements.
 
std::shared_ptr< SyncFileWritersfw
 Synchronous file writer.
 
double cfg_device_accuracy_m = 0
 Detector accuracy in meters.
 
double cfg_device_rangeMin_m = 0
 Minimum range for detector in meters.
 
bool lasOutput
 Flag specifying if detector output must be written in LAS format (true) or not (false) More...
 
bool zipOutput
 Flag specifying if detector output must be zipped (true) or not (false)
 
double lasScale
 Scale factor specification to be used when LAS output format specified. More...
 
std::string outputFileLineFormatString
 Format string for output file line. More...
 
fs::path outputFilePath
 Path to output file.
 

Detailed Description

Base abstract class for detectors.

Constructor & Destructor Documentation

◆ AbstractDetector()

AbstractDetector::AbstractDetector ( std::shared_ptr< Scanner scanner,
double  accuracy_m,
double  rangeMin_m 
)
inline

Base constructor for abstract detector.

See also
AbstractDetector::scanner
AbstractDetector::accuracy_m
AbstractDetector::rangeMin_m

Member Function Documentation

◆ applySettings()

virtual void AbstractDetector::applySettings ( std::shared_ptr< ScannerSettings > &  settings)
inlinevirtual

Apply scanner settings to the detector.

Parameters
settingsSettings to be applied to de detector

Reimplemented in FullWaveformPulseDetector.

◆ setOutputFilePath()

void AbstractDetector::setOutputFilePath ( std::string  path)

Set path to output file.

Parameters
pathNew path to output file

◆ simulatePulse()

virtual void AbstractDetector::simulatePulse ( thread_pool pool,
glm::dvec3  absoluteBeamOrigin,
Rotation  absoluteBeamAttitude,
int  state_currentPulseNumber,
long  currentGpsTime 
)
pure virtual

Compute pulse simulation.

Parameters
poolThread pool to be used to distribute computational burden
absoluteBeamOriginOrigin of the beam in absolute coordinates
absoluteBeamAttitudeAttitude of the beam
state_currentPulseNumberCurrent pulse number
currentGpsTimeCurrent GPS time

Implemented in FullWaveformPulseDetector.

◆ writeMeasurement()

void AbstractDetector::writeMeasurement ( Measurement m)

Write a measurement.

Parameters
mMeasurement to be written

◆ writeMeasurements()

void AbstractDetector::writeMeasurements ( std::list< Measurement *> &  m)

Write a list of measurements.

Parameters
mList of measurements to be written

Member Data Documentation

◆ lasOutput

bool AbstractDetector::lasOutput

Flag specifying if detector output must be written in LAS format (true) or not (false)

See also
AbstractDetector::lasScale

◆ lasScale

double AbstractDetector::lasScale

Scale factor specification to be used when LAS output format specified.

See also
AbstractDetector::lasOutput

◆ outputFileLineFormatString

std::string AbstractDetector::outputFileLineFormatString
Initial value:
=
"%.3f %.3f %.3f %.4f %.4f %d %d %d %s %d"

Format string for output file line.

No longer used since synchronous file writers are now responsible of handling output writing


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