Helios++
Helios software for LiDAR simulations
|
Class representing a scanner asset. More...
#include <Scanner.h>
Public Member Functions | |
Scanner (std::string const id, std::list< int > const &pulseFreqs, bool const writeWaveform=false, bool const calcEchowidth=false, bool const fullWaveNoise=false, bool const platformNoiseDisabled=false) | |
Scanner constructor. More... | |
Scanner (Scanner &scanner) | |
Copy constructor for the Scanner. More... | |
virtual std::shared_ptr< Scanner > | clone ()=0 |
Make a clone of this scanner. More... | |
void | initializeSequentialGenerators () |
Initialize randomness generators and noise sources that are necessary for sequential pulse computations. | |
void | buildScanningPulseProcess (int const parallelizationStrategy, PulseTaskDropper &dropper, std::shared_ptr< PulseThreadPoolInterface > pool) |
Build the scanning pulse process to be used by the scanner during simulation. More... | |
virtual void | applySettings (std::shared_ptr< ScannerSettings > settings, size_t const idx)=0 |
Apply scanner settings. More... | |
void | applySettings (std::shared_ptr< ScannerSettings > settings) |
Non index version of the Scanner::applySettings(std::shared_ptr<ScannerSettings>) method. More... | |
virtual std::shared_ptr< ScannerSettings > | retrieveCurrentSettings (size_t const idx) |
Retrieve current scanner settings and build a new ScannerSettings object with them. More... | |
std::shared_ptr< ScannerSettings > | retrieveCurrentSettings () |
Non index version of the Scanner::retrieveCurrentSettings(size_t const) method. More... | |
virtual void | applySettingsFWF (FWFSettings settings, size_t const idx) |
Apply full wave form settings. More... | |
void | applySettingsFWF (FWFSettings settings) |
Non index version of the Scanner::applySettingsFWF(FWFSettings, size_t const) method. More... | |
virtual void | doSimStep (unsigned int legIndex, double const currentGpsTime)=0 |
Perform computations for current simulation step. More... | |
std::string | toString () |
Build a string representation of the scanner. More... | |
virtual void | calcRaysNumber (size_t const idx)=0 |
Compute the number of rays depending on beam sample quality for the scanning device. | |
void | calcRaysNumber () |
Non index version of the Scanner::calcRaysNumber(size_t const) method. More... | |
virtual void | prepareDiscretization (size_t const idx)=0 |
Prepare wave discretization. More... | |
void | prepareDiscretization () |
Non index version of the Scanner::prepareDiscretization method. More... | |
virtual double | calcFootprintArea (double const distance, size_t const idx) const =0 |
Compute the footprint area \(f_{a}\). More... | |
double | calcFootprintArea (double const distance) const |
Non index version of the Scanner::calcFootprintArea(double const, size_t const) method. More... | |
double | calcFootprintRadius (double const distance, size_t const idx) |
Compute the footprint radius \(f_{r}\). More... | |
double | calcFootprintRadius (double const distance) |
Non index version of the Scanner::calcFootprintRadius(double const, size_t const) method. More... | |
virtual double | calcTargetArea (double const distance, size_t const idx) const =0 |
Calculate the target area. It is the footprint area divided by the number of rays. More... | |
double | calcTargetArea (double const distance) const |
Non index version of the Scanner::calcTargetArea(double const, size_t const) method. More... | |
virtual double | calcAtmosphericAttenuation (size_t const idx) const =0 |
double | calcAtmosphericAttenuation () const |
Non index version of Scanner::calcAtmosphericAttenuation. More... | |
virtual Rotation | calcAbsoluteBeamAttitude (size_t const idx)=0 |
Compute the absolute beam attitude considering the mount relative attitude and the deflector relative attitude. More... | |
Rotation | calcAbsoluteBeamAttitude () |
Non index version of the Scanner::calcAbsoluteBeamAttitude function. More... | |
virtual bool | checkMaxNOR (int const nor, size_t const idx)=0 |
Check if given number of return (nor) is inside expected boundaries. If scanner maxNOR is 0 or nor is less than maxNOR, then the check is passed (true is returned). Otherwise, it is not passed (false is returned). More... | |
bool | checkMaxNOR (int const nor) |
Non index version of Scanner::checkMaxNOR(int const, size_t const) method. More... | |
virtual void | computeSubrays (std::function< void(vector< double > const &_tMinMax, int const circleStep, double const circleStep_rad, Rotation &r1, double const divergenceAngle, NoiseSource< double > &intersectionHandlingNoiseSource, std::map< double, double > &reflections, vector< RaySceneIntersection > &intersects)> handleSubray, vector< double > const &tMinMax, NoiseSource< double > &intersectionHandlingNoiseSource, std::map< double, double > &reflections, vector< RaySceneIntersection > &intersects, size_t const idx)=0 |
Perform ray casting to find intersections. More... | |
virtual bool | initializeFullWaveform (double const minHitDist_m, double const maxHitDist_m, double &minHitTime_ns, double &maxHitTime_ns, double &nsPerBin, double &distanceThreshold, int &peakIntensityIndex, int &numFullwaveBins, size_t const idx)=0 |
Initialize full waveform While the vector is not strictly initialized in this function, necessary variables are computed here. More... | |
virtual double | calcIntensity (double const incidenceAngle, double const targetRange, double const targetReflectivity, double const targetSpecularity, double const targetSpecularExponent, double const targetArea, double const radius, size_t const idx) const =0 |
Handle to which scanning device request the intensity computation. More... | |
virtual double | calcIntensity (double const targetRange, double const radius, double const sigma, size_t const idx) const =0 |
Handle to which scanning device request the intensity computation. More... | |
void | handleSimStepNoise (glm::dvec3 &absoluteBeamOrigin, Rotation &absoluteBeamAttitude) |
Handle position and attitude noise. More... | |
virtual void | onLegComplete () |
Exposes ScanningPulseProcess:onLegComplete method of the scanning pulse process defining this scanner. | |
void | onSimulationFinished () |
Exposes ScanningPulseProcess::onSimulationFinished method of the scanning pulse process defining this scanner. | |
void | handleTrajectoryOutput (double const currentGpsTime) |
Handle trajectory output whatever it is to output file, to all trajectories vector or to cycle trajectories vector. More... | |
void | trackOutputPath (std::string const &path) |
Track given output path in a thread safe way. More... | |
virtual int | getCurrentPulseNumber (size_t const idx) const =0 |
Obtain the current pulse number of the scanning device. More... | |
int | getCurrentPulseNumber () const |
Non index version of the Scanner::getCurrentPulseNumber method. More... | |
virtual int | getNumRays (size_t const idx) const =0 |
Obtain the number of rays of the scanning device. More... | |
int | getNumRays () const |
Non index version of the Scanner::getNumRays(size_t const) method. More... | |
virtual void | setNumRays (int const numRays, size_t const idx)=0 |
Set the number of rays of the scanning device. More... | |
void | setNumRays (int const numRays) |
Non index version of the Scanner::setNumRays(int const, size_t const) method. More... | |
int | getPulseFreq_Hz () const |
Obtain the pulse frequency. More... | |
void | setPulseFreq_Hz (int const pulseFreq_Hz) |
Set the pulse frequency. More... | |
virtual double | getPulseLength_ns (size_t const idx) const =0 |
Get the pulse length. More... | |
double | getPulseLength_ns () const |
No index argument version of the Scanner::getPulseLength_ns method. More... | |
virtual void | setPulseLength_ns (double const pulseLength_ns, size_t const idx)=0 |
Set the pulse length. More... | |
void | setPulseLength_ns (double const pulseLength_ns) |
No index argument version of the Scanner::setPulseLength_ns method. More... | |
virtual bool | lastPulseWasHit (size_t const idx) const =0 |
Check if last pulse was hit (true) or not (false) for the scanning device. More... | |
bool | lastPulseWasHit () const |
Non index version of the Scanner::lastPulseWasHit method. More... | |
virtual void | setLastPulseWasHit (bool const lastPulseWasHit, size_t const idx)=0 |
Specify if last pulse was hit (true) or not (false) More... | |
void | setLastPulseWasHit (bool const lastPulseWasHit) |
Non index version of the Scanner::setLastPulseWasHit method. More... | |
virtual double | getBeamDivergence (size_t const idx) const =0 |
Obtain beam divergence. More... | |
double | getBeamDivergence () const |
No index argument version of the Scanner::getBeamDivergence method. More... | |
virtual void | setBeamDivergence (double const beamDivergence, size_t const idx)=0 |
Set beam divergence. More... | |
void | setBeamDivergence (double const beamDivergence) |
No index argument version of the Scanner::setBeamDivergence method. More... | |
virtual double | getAveragePower (size_t const idx) const =0 |
Obtain average power. More... | |
double | getAveragePower () const |
No index argument version of the Scanner::getAveragePower method. More... | |
virtual void | setAveragePower (double const averagePower, size_t const idx)=0 |
Set average power. More... | |
void | setAveragePower (double const averagePower) |
No index argument version of the Scanner::setAveragePower method. More... | |
virtual double | getBeamQuality (size_t const idx) const =0 |
Get beam quality. More... | |
double | getBeamQuality () const |
No index argument version of the Scanner::getBeamQuality method. More... | |
virtual void | setBeamQuality (double const beamQuality, size_t const idx)=0 |
Set beam quality. More... | |
void | setBeamQuality (double const beamQuality) |
No index argument version of the Scanner::setBeamQuality method. More... | |
virtual double | getEfficiency (size_t const idx) const =0 |
Obtain device efficiency. More... | |
double | getEfficiency () const |
No index argument version of the Scanner::getEfficiency method. More... | |
virtual void | setEfficiency (double const efficiency, size_t const idx=0)=0 |
Set device efficiency. More... | |
void | setEfficiency (double const efficiency) |
No index argument version of the Scanner::setEfficiency method. More... | |
virtual double | getReceiverDiameter (size_t const idx) const =0 |
Get receiver diameter. More... | |
double | getReceiverDiameter () const |
No index argument version of the Scanner::getReceiverDiameter. More... | |
virtual void | setReceiverDiameter (double const receiverDiameter, size_t const idx)=0 |
Set receiver diameter. More... | |
void | setReceiverDiameter (double const receiverDiameter) |
No index argument version of the Scanner::setReceiverDiameter method. More... | |
virtual double | getVisibility (size_t const idx) const =0 |
Get device visibility. More... | |
double | getVisibility () const |
No index argument version of the Scanner::getVisibility method. More... | |
virtual void | setVisibility (double const visibility, size_t const idx)=0 |
Set device visibility. More... | |
void | setVisibility (double const visibility) |
No index argument version of the Scanner::setVisibility method. More... | |
virtual double | getWavelength (size_t const idx) const =0 |
Obtain wave length. More... | |
double | getWavelength () const |
No index argument version of the Scanner::getWavelength method. More... | |
virtual void | setWavelength (double const wavelength, size_t const idx)=0 |
Set wave length. More... | |
void | setWavelength (double const wavelength) |
No index argument version of the Scanner::setWavelength method. More... | |
virtual double | getAtmosphericExtinction (size_t const idx) const =0 |
Obtain atmospheric extinction. More... | |
double | getAtmosphericExtinction () const |
No index argument version of the Scanner::getAtmosphericExtinction method. More... | |
virtual void | setAtmosphericExtinction (double const atmosphericExtinction, size_t const idx)=0 |
Set atmospheric extinction. More... | |
void | setAtmosphericExtinction (double const atmosphericExtinction) |
No index argument version of the Scanner::setAtmosphericExtinction method. More... | |
virtual double | getBeamWaistRadius (size_t const idx) const =0 |
Obtain beam waist radius. More... | |
double | getBeamWaistRadius () const |
No index argument version of the Scanner::getBeamWaistRadius method. More... | |
virtual void | setBeamWaistRadius (double const beamWaistRadius, size_t const idx)=0 |
Set beam waist radius. More... | |
void | setBeamWaistRadius (double const beamWaistRadius) |
No index argument version of the Scanner::setBeamWaistRadius method. More... | |
virtual glm::dvec3 | getHeadRelativeEmitterPosition (size_t const idx=0) const =0 |
Obtain the head's relative emitter position. More... | |
virtual void | setHeadRelativeEmitterPosition (glm::dvec3 const &pos, size_t const idx=0)=0 |
Set the head's relative emitter position. More... | |
virtual glm::dvec3 & | getHeadRelativeEmitterPositionByRef (size_t const idx=0)=0 |
Obtain the head's relative emitter position by reference (can be written) More... | |
virtual Rotation | getHeadRelativeEmitterAttitude (size_t const idx=0) const =0 |
Obtain the head's relative emitter attitude. More... | |
virtual void | setHeadRelativeEmitterAttitude (Rotation const &attitude, size_t const idx=0)=0 |
Obtain the head's relative emitter attitude. More... | |
virtual Rotation & | getHeadRelativeEmitterAttitudeByRef (size_t const idx=0)=0 |
Obtain the head's relative emitter attitude by reference (can be written) More... | |
virtual double | getBt2 (size_t const idx) const =0 |
Obtain \(B_{t2}\). More... | |
double | getBt2 () const |
No index argument version of the Scanner::getBt2 method. More... | |
virtual void | setBt2 (double const bt2, size_t const idx)=0 |
Set \(B_{t2}\). More... | |
void | setBt2 (double const bt2) |
No index argument version of the Scanner::setBt2 method @Scanner::setBt2(double const, size_t const) | |
virtual double | getDr2 (size_t const idx) const =0 |
Obtain \(D_{r2}\). More... | |
double | getDr2 () const |
No index argument version of the Scanner::getDr2 method. More... | |
virtual void | setDr2 (double const dr2, size_t const idx)=0 |
Set \(D_{r2}\). More... | |
void | setDr2 (double const dr2) |
No index argument version of the Scanner::setDr2 method @Scanner::setDr2(double const, size_t const) | |
bool | isActive () const |
Check if scanner is active (true) or not (false) More... | |
void | setActive (bool const active) |
Set scanner active status. True to make it active, false to make it inactive. More... | |
bool | isWriteWaveform () const |
Check if scanner is configured to write wave form (true) or not (false) More... | |
void | setWriteWaveform (bool const writeWaveform) |
Set scanner write wave form configuration. More... | |
bool | isCalcEchowidth () const |
Check if scanner is configured to compute echo width (true) or not (false) More... | |
void | setCalcEchowidth (bool const calcEchowidth) |
Set scanner echo width configuration. More... | |
bool | isFullWaveNoise () const |
Check if scanner is configured to add noise to full wave (true) or not (false) More... | |
void | setFullWaveNoise (bool const fullWaveNoise) |
Set scanner full wave noise policy. More... | |
bool | isPlatformNoiseDisabled () |
Check if platform noise is disabled (true) or not (false) More... | |
void | setPlatformNoiseDisabled (bool const platformNoiseDisabled) |
Set platform noise disabled flag. More... | |
bool | isFixedIncidenceAngle () const |
Check if incidence angle is fixed (true) or not (false) More... | |
void | setFixedIncidenceAngle (bool const fixedIncidenceAngle) |
Set fixed incidence angle flag. More... | |
std::string | getScannerId () const |
Obtain the identifier of the scanner. More... | |
void | setScannerId (std::string const &id) |
Set the identifier of the scanner. More... | |
virtual void | setDeviceIndex (size_t const newIdx, size_t const oldIdx)=0 |
Set the device index (newIdx) of the device at given index (oldIdx). More... | |
virtual std::string | getDeviceId (size_t const idx) const =0 |
Obtain scanner device identifier. More... | |
std::string | getDeviceId () const |
No index argument version of the Scanner::getDeviceId method. More... | |
virtual void | setDeviceId (std::string const deviceId, size_t const idx)=0 |
Set the scanner device identifier. More... | |
void | setDeviceId (std::string const deviceId) |
No index argument version of the Scanner::setDeviceId method. More... | |
virtual size_t | getNumDevices () const =0 |
Obtain the number of scanning devices composing the scanner. | |
virtual std::shared_ptr< ScannerHead > | getScannerHead (size_t const idx)=0 |
Obtain the scanner head of the scanning device. More... | |
std::shared_ptr< ScannerHead > | getScannerHead () |
Non index version of the Scanner::getScannerHead(size_t const) method. More... | |
virtual void | setScannerHead (std::shared_ptr< ScannerHead > scannerHead, size_t const idx)=0 |
Set the scanner head of the scanning device. More... | |
void | setScannerHead (std::shared_ptr< ScannerHead > scannerHead) |
Non index version of the Scanner::setScannerHead method. More... | |
virtual std::shared_ptr< AbstractBeamDeflector > | getBeamDeflector (size_t const idx)=0 |
Obtain the beam deflector of the scanning device. More... | |
std::shared_ptr< AbstractBeamDeflector > | getBeamDeflector () |
Non index version of the Scanner::getBeamDeflector(size_t const) method. More... | |
virtual void | setBeamDeflector (std::shared_ptr< AbstractBeamDeflector > deflector, size_t const idx)=0 |
Set the beam deflector of the scanning device. More... | |
void | setBeamDeflector (std::shared_ptr< AbstractBeamDeflector > deflector) |
Non index version of the Scanner::setBeamDeflector method. More... | |
virtual std::shared_ptr< AbstractDetector > | getDetector (size_t const idx)=0 |
Obtain the abstract detector of the scanning device. More... | |
std::shared_ptr< AbstractDetector > | getDetector () |
Non index version of the Scanner::getDetector(size_t const) method. More... | |
virtual void | setDetector (std::shared_ptr< AbstractDetector > detector, size_t const idx)=0 |
Set the abstract detector of the scanning device. More... | |
void | setDetector (std::shared_ptr< AbstractDetector > detector) |
Non index version of the Scanner::setDetector method. More... | |
void | setAllDetectors (std::shared_ptr< AbstractDetector > detector) |
Set the detector of each scanning device to the given one. More... | |
virtual FWFSettings & | getFWFSettings (size_t const idx)=0 |
Obtain the Full WaveForm settings of the scanning device. More... | |
FWFSettings & | getFWFSettings () |
Non index version of the Scanner::getFWFSettings(size_t const) More... | |
virtual void | setFWFSettings (FWFSettings const &fwfSettings, size_t const idx)=0 |
Set the Full WaveForm settings of the scanning device. More... | |
void | setFWFSettings (FWFSettings const &fwfSettings) |
Non index version of the Scanner::setFWFSettings(FWFSettings &, size_t const) method. More... | |
virtual std::list< int > & | getSupportedPulseFreqs_Hz (size_t const idx)=0 |
Obtain the list of supported pulse frequencies of the scanning device. More... | |
std::list< int > & | getSupportedPulseFreqs_Hz () |
Non index version of the Scanner::getSupportedPulseFreqs_Hz(size_t const) method. More... | |
virtual void | setSupportedPulseFreqs_Hz (std::list< int > &pulseFreqs_Hz, size_t const idx)=0 |
Set the list of supported pulse frequencies (in Hertz) for the scanning device. More... | |
void | setSupportedPulseFreqs_Hz (std::list< int > &pulseFreqs_Hz) |
Non index version of the Scanner::setSupportedPulseFreqs_Hz(std::list<int> &, size_t const) More... | |
virtual int | getMaxNOR (size_t const idx) const =0 |
Obtain the maximum number of returns per pulse for the scanning device (0 means no maximum at all). More... | |
int | getMaxNOR () const |
Non index version of Scanner::getMaxNOR(size_t const) More... | |
virtual void | setMaxNOR (int const maxNOR, size_t const idx)=0 |
Set the maximum number of returns per pulse for the scanning device (0 means no maximum at all). More... | |
void | setMaxNOR (int const maxNOR) |
Non index version of Scanner::setMaxNOR(int const, size_t const) More... | |
virtual int | getNumTimeBins (size_t const idx) const =0 |
Obtain the number of bins defining the size of the time discretization for the scanning device. More... | |
int | getNumTimeBins () const |
Non index version of the Scanner::getNumTimeBins(size_t const) method. More... | |
virtual void | setNumTimeBins (int const numTimeBins, size_t const idx)=0 |
Set the number of bins defining the size of the time discretization for the scanning device. More... | |
void | setNumTimeBins (int const numTimeBins) |
Non index version of the Scanner::setNumTimeBins(int const, size_t const) method. More... | |
virtual int | getPeakIntensityIndex (size_t const idx) const =0 |
Obtain the index of the bin containing the intensity peak for the scanning device. More... | |
int | getPeakIntensityIndex () const |
Non index version of the Scanner::getPeakIntensityIndex(size_t const) method. More... | |
virtual void | setPeakIntensityIndex (int const pii, size_t const idx)=0 |
Set the index of the bin containing the intensity peak for the scanning device. More... | |
void | setPeakIntensityIndex (int const pii) |
Non index version of the Scanner::setPeakIntensityIndex(int const, size_t const) method. More... | |
virtual std::vector< double > & | getTimeWave (size_t const idx)=0 |
Obtain the time discretization vector of the scanning device. More... | |
std::vector< double > & | getTimeWave () |
Non index version of the Scanner::getTimeWave(size_t const) method. More... | |
virtual void | setTimeWave (std::vector< double > &timewave, size_t const idx)=0 |
Set the time discretization vector of the scanning device. More... | |
void | setTimeWave (std::vector< double > &timewave) |
Non index version of the Scanner::setTimeWave(std::vector<double> &, size_t const) method. More... | |
virtual void | setTimeWave (std::vector< double > &&timewave, size_t const idx)=0 |
Rvalue version of the Scanner::setTimeWave(std::vector<double> &, size_t const) method. More... | |
void | setTimeWave (std::vector< double > &&timewave) |
Non index version of the Scanner::setTimeWave(std::vector<double> &&, size_t const) method. More... | |
![]() | |
std::string | getLocationString () |
Obtain asset location string. More... | |
virtual bool | isEgg () const |
Check whether the asset is an EggAsset or not. More... | |
Public Attributes | |
std::shared_ptr< FMSFacade > | fms |
Main facade to file management system. | |
std::shared_ptr< Platform > | platform |
Platform carrying the scanner. More... | |
std::shared_ptr< std::vector< std::string > > | allOutputPaths = nullptr |
Historical vector of all output paths where scanner measurements were written. More... | |
std::shared_ptr< std::vector< Measurement > > | allMeasurements = nullptr |
Historical vector of all measurements performed by the scanner. More... | |
std::shared_ptr< std::vector< Trajectory > > | allTrajectories = nullptr |
Historical vector of all trajectory points recorded by the scanner. More... | |
std::shared_ptr< std::mutex > | allMeasurementsMutex = nullptr |
Mutex to handle concurrent access to historical vector of all measurements and historical vector of all trajectory points. More... | |
std::shared_ptr< std::vector< Measurement > > | cycleMeasurements = nullptr |
Vector of measurements performed by the scanner at current cycle. More... | |
std::shared_ptr< std::vector< Trajectory > > | cycleTrajectories = nullptr |
Vector of trajectory points recorded by the scanner. More... | |
std::shared_ptr< std::mutex > | cycleMeasurementsMutex = nullptr |
Mutex to handle concurrent access to vector of measurements and vector of trajectory points by cycle. More... | |
double | trajectoryTimeInterval_ns = 0.0 |
Time interval between record of trajectory points. When it is exactly 0, then no trajectory points will be recorded. More... | |
double | lastTrajectoryTime |
GPS time (nanoseconds) corresponding to last recorded trajectory point. | |
std::shared_ptr< RandomnessGenerator< double > > | randGen1 = nullptr |
First randomness generator for single thread mode. | |
std::shared_ptr< RandomnessGenerator< double > > | randGen2 = nullptr |
Second randomness generator for single thread mode. | |
std::shared_ptr< UniformNoiseSource< double > > | intersectionHandlingNoiseSource = nullptr |
Uniform noise source for single thread mode. | |
![]() | |
std::string | id = "" |
Asset identifier. | |
std::string | name = "Unnamed Asset" |
Asset name. | |
std::string | sourceFilePath = "" |
Path to asset file. | |
Protected Member Functions | |
virtual void | _clone (Scanner &sc) const |
Assist the clone method by means of handling cloning of attributes from this scanner to the new one (sc) More... | |
Protected Attributes | |
std::string | id = "SCANNER-ID" |
The scanner's identifier. | |
bool | writeWaveform = false |
Flag specifying if write waveform (true) or not (false) | |
bool | calcEchowidth = false |
Flag specifying if calculate echo width (true) or not (false) | |
bool | fullWaveNoise = false |
Flag specifying if compute full wave noise (true) or not (false) | |
bool | platformNoiseDisabled = false |
Flag specifying if disable platform noise (true) or not (false) | |
bool | fixedIncidenceAngle = false |
Flag specifying if use fixed incidence angle (true) or not (false) | |
int | cfg_setting_pulseFreq_Hz = 0 |
Pulse frequency (hertz) | |
bool | state_isActive = true |
Flag specifying if scanner is active (true) or not (false) More... | |
std::unique_ptr< ScanningPulseProcess > | spp = nullptr |
The scanning pulse process used by the scanner. More... | |
Class representing a scanner asset.
Scanner::Scanner | ( | std::string const | id, |
std::list< int > const & | pulseFreqs, | ||
bool const | writeWaveform = false , |
||
bool const | calcEchowidth = false , |
||
bool const | fullWaveNoise = false , |
||
bool const | platformNoiseDisabled = false |
||
) |
Scanner constructor.
pulseFreqs | List of supported pulse frequencies (hertz) |
Scanner::Scanner | ( | Scanner & | scanner | ) |
Copy constructor for the Scanner.
scanner | The scanner to be copied |
|
protectedvirtual |
Assist the clone method by means of handling cloning of attributes from this scanner to the new one (sc)
sc | The scanner which attributes must be assigned as clones of the caller scanner (this) |
Reimplemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::applySettings(std::shared_ptr<ScannerSettings>) method.
|
pure virtual |
Apply scanner settings.
settings | Scanner settings to be applied |
idx | The index of the scanning device to which scanner settings must be applied |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::applySettingsFWF(FWFSettings, size_t const) method.
|
virtual |
Apply full wave form settings.
settings | Full wave form settings to be applied |
idx | The index of the scanning device which Full WaveForm settings must be updated |
void Scanner::buildScanningPulseProcess | ( | int const | parallelizationStrategy, |
PulseTaskDropper & | dropper, | ||
std::shared_ptr< PulseThreadPoolInterface > | pool | ||
) |
Build the scanning pulse process to be used by the scanner during simulation.
dropper | Simulation's task dropper |
pool | Simulation's thread pool |
|
inline |
Non index version of the Scanner::calcAbsoluteBeamAttitude function.
|
pure virtual |
Compute the absolute beam attitude considering the mount relative attitude and the deflector relative attitude.
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of Scanner::calcAtmosphericAttenuation.
|
pure virtual |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::calcFootprintArea(double const, size_t const) method.
|
pure virtual |
Compute the footprint area \(f_{a}\).
\[ f_{a} = \frac{{\pi}d^{2}B_{t2}}{4} \]
distance | Distance \(d\) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::calcFootprintRadius(double const, size_t const) method.
double Scanner::calcFootprintRadius | ( | double const | distance, |
size_t const | idx | ||
) |
Compute the footprint radius \(f_{r}\).
\[ f_{r} = \sqrt{\frac{f_{a}}{\pi}} \]
distance | Distance \(d\) |
|
pure virtual |
Handle to which scanning device request the intensity computation.
idx | The index of the scanning device that must compute the intensity |
Implemented in SingleScanner, and MultiScanner.
|
pure virtual |
Handle to which scanning device request the intensity computation.
idx | The index of the scanning device that must compute the intensity |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::calcRaysNumber(size_t const) method.
|
inline |
Non index version of the Scanner::calcTargetArea(double const, size_t const) method.
|
pure virtual |
Calculate the target area. It is the footprint area divided by the number of rays.
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of Scanner::checkMaxNOR(int const, size_t const) method.
|
pure virtual |
Check if given number of return (nor) is inside expected boundaries. If scanner maxNOR is 0 or nor is less than maxNOR, then the check is passed (true is returned). Otherwise, it is not passed (false is returned).
nor | Current number of return |
Implemented in SingleScanner, and MultiScanner.
|
pure virtual |
Make a clone of this scanner.
Implemented in SingleScanner, and MultiScanner.
|
pure virtual |
Perform ray casting to find intersections.
[in] | handleSubray | The function where computed subrays must be delegated to |
[in] | tMinMax | Minimum and maximum time to intersection with respect to the axis aligned bounding box that bounds the scene |
[out] | reflections | Where reflections must be stored when a hit is registered |
[out] | intersects | Where intersections must be stored when a hit is registered |
[in] | idx | The index of the scanning device |
Implemented in SingleScanner, and MultiScanner.
|
pure virtual |
Perform computations for current simulation step.
legIndex | Index of current leg |
currentGpsTime | GPS time of current pulse |
Implemented in SingleScanner, and MultiScanner.
|
inline |
No index argument version of the Scanner::getAtmosphericExtinction method.
|
pure virtual |
Obtain atmospheric extinction.
idx | The index of the scanning device which atmospheric extinction must be obtained (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
No index argument version of the Scanner::getAveragePower method.
|
pure virtual |
Obtain average power.
idx | The index of the scanning device which average power must be obtained (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::getBeamDeflector(size_t const) method.
|
pure virtual |
Obtain the beam deflector of the scanning device.
idx | The index of the scanning device which beam deflector must be obtained |
Implemented in SingleScanner, and MultiScanner.
|
inline |
No index argument version of the Scanner::getBeamDivergence method.
|
pure virtual |
Obtain beam divergence.
idx | The index of the scanning device which beam divergence must be obtained (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
No index argument version of the Scanner::getBeamQuality method.
|
pure virtual |
Get beam quality.
idx | The index of the scanning device which beam quality must be obtained (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
No index argument version of the Scanner::getBeamWaistRadius method.
|
pure virtual |
Obtain beam waist radius.
idx | The index of the scanning device which beam waist radius must be obtained (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
No index argument version of the Scanner::getBt2 method.
|
pure virtual |
Obtain \(B_{t2}\).
idx | The index of the scanning device which cached Bt2 (square of beam divergence) must be obtained (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::getCurrentPulseNumber method.
|
pure virtual |
Obtain the current pulse number of the scanning device.
idx | The index of the scanning device which pulse number must be obtained |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::getDetector(size_t const) method.
|
pure virtual |
Obtain the abstract detector of the scanning device.
idx | The index of the scanning device which abstract detector must be obtained |
Implemented in SingleScanner, and MultiScanner.
|
inline |
No index argument version of the Scanner::getDeviceId method.
|
pure virtual |
Obtain scanner device identifier.
Implemented in SingleScanner, and MultiScanner.
|
inline |
No index argument version of the Scanner::getDr2 method.
|
pure virtual |
Obtain \(D_{r2}\).
idx | The index of the scanning device which cached Dr2 (square of receiver diameter) must be obtained (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
No index argument version of the Scanner::getEfficiency method.
|
pure virtual |
Obtain device efficiency.
idx | The index of the scanning device which efficiency must be obtained (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::getFWFSettings(size_t const)
|
pure virtual |
Obtain the Full WaveForm settings of the scanning device.
idx | The index of the scanning device which full waveform settings must be obtained |
Implemented in SingleScanner, and MultiScanner.
|
pure virtual |
Obtain the head's relative emitter attitude.
idx | The index of the scanning device which head's relative emitter attitude must be obtained (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
pure virtual |
Obtain the head's relative emitter attitude by reference (can be written)
idx | The index of the scanning device which head's relative emitter attitude must be obtained (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
pure virtual |
Obtain the head's relative emitter position.
idx | The index of the scanning device which head's relative emitter position must be obtained (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
pure virtual |
Obtain the head's relative emitter position by reference (can be written)
idx | The index of the scanning device which head's relative emitter position must be obtained (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of Scanner::getMaxNOR(size_t const)
|
pure virtual |
Obtain the maximum number of returns per pulse for the scanning device (0 means no maximum at all).
idx | The index of the scanning device which max NOR must be obtained |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::getNumRays(size_t const) method.
|
pure virtual |
Obtain the number of rays of the scanning device.
idx | The index of the scanning device which number of rays must be obtained |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::getNumTimeBins(size_t const) method.
|
pure virtual |
Obtain the number of bins defining the size of the time discretization for the scanning device.
idx | Index of the scanning device which number of time bins must be obtained |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::getPeakIntensityIndex(size_t const) method.
|
pure virtual |
Obtain the index of the bin containing the intensity peak for the scanning device.
idx | The index of the scanning device which peak intensity index must be obtained |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Obtain the pulse frequency.
|
inline |
No index argument version of the Scanner::getPulseLength_ns method.
|
pure virtual |
Get the pulse length.
idx | The index of the scanning device which pulse length must be obtained (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
No index argument version of the Scanner::getReceiverDiameter.
|
pure virtual |
Get receiver diameter.
idx | The index of the scanning device which efficiency must be obtained (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::getScannerHead(size_t const) method.
|
pure virtual |
Obtain the scanner head of the scanning device.
idx | The index of the scanning device which scanner head must be obtained |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Obtain the identifier of the scanner.
|
inline |
Non index version of the Scanner::getSupportedPulseFreqs_Hz(size_t const) method.
|
pure virtual |
Obtain the list of supported pulse frequencies of the scanning device.
idx | The index of the scanning device which supported pulse frequencies must be obtained |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::getTimeWave(size_t const) method.
|
pure virtual |
Obtain the time discretization vector of the scanning device.
idx | The index of the scanning device which time discretization vector must be obtained |
Implemented in SingleScanner, and MultiScanner.
|
inline |
No index argument version of the Scanner::getVisibility method.
|
pure virtual |
Get device visibility.
idx | The index of the scanning device which visibility must be obtained (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
No index argument version of the Scanner::getWavelength method.
|
pure virtual |
Obtain wave length.
idx | The index of the scanning device which wavelength must be obtained (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
void Scanner::handleSimStepNoise | ( | glm::dvec3 & | absoluteBeamOrigin, |
Rotation & | absoluteBeamAttitude | ||
) |
Handle position and attitude noise.
absoluteBeamOrigin | Beam origin (position) to add noise to if requested |
absoluteBeamAttitude | Beam attitude to add noise to if requested |
void Scanner::handleTrajectoryOutput | ( | double const | currentGpsTime | ) |
Handle trajectory output whatever it is to output file, to all trajectories vector or to cycle trajectories vector.
currentGpsTime | Current GPS time (nanoseconds) |
|
pure virtual |
Initialize full waveform While the vector is not strictly initialized in this function, necessary variables are computed here.
[out] | nsPerBin | The size of each bin in nano seconds |
[out] | distanceThreshold | Limit distance threshold |
[out] | peakIntensityIndex | Index of intensity peak |
[out] | numFullwaveBins | How many bins are necessary to discretize the full waveform |
[in] | idx | The index of the scanning device |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Check if scanner is active (true) or not (false)
|
inline |
Check if scanner is configured to compute echo width (true) or not (false)
|
inline |
Check if incidence angle is fixed (true) or not (false)
|
inline |
Check if scanner is configured to add noise to full wave (true) or not (false)
|
inline |
Check if platform noise is disabled (true) or not (false)
|
inline |
Check if scanner is configured to write wave form (true) or not (false)
|
inline |
Non index version of the Scanner::lastPulseWasHit method.
|
pure virtual |
Check if last pulse was hit (true) or not (false) for the scanning device.
idx | The index of the scanning device which last pulse must be checked. |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::prepareDiscretization method.
|
pure virtual |
Prepare wave discretization.
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::retrieveCurrentSettings(size_t const) method.
|
virtual |
Retrieve current scanner settings and build a new ScannerSettings object with them.
idx | The index of the scanning device which scanning settings must be retrieved |
|
inline |
Set scanner active status. True to make it active, false to make it inactive.
active | New scanner active status |
|
inline |
Set the detector of each scanning device to the given one.
detector | The new detector for each scanning device |
|
inline |
No index argument version of the Scanner::setAtmosphericExtinction method.
|
pure virtual |
Set atmospheric extinction.
atmosphericExtinction | New atmospheric extinction |
idx | The index of the scanning device which atmospheric extinction must be setted (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
No index argument version of the Scanner::setAveragePower method.
|
pure virtual |
Set average power.
averagePower | New average power (watts) |
idx | The index of the scanning device which average power must be setted (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::setBeamDeflector method.
|
pure virtual |
Set the beam deflector of the scanning device.
deflector | New beam deflector for the scanning device |
idx | The index of the scanning device which beam deflector must be setted |
Implemented in SingleScanner, and MultiScanner.
|
inline |
No index argument version of the Scanner::setBeamDivergence method.
|
pure virtual |
Set beam divergence.
beamDivergence | New beam divergence (radians) |
idx | The index of the scanning device which beam divergence must be setted (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
No index argument version of the Scanner::setBeamQuality method.
|
pure virtual |
Set beam quality.
beamQuality | New beam quality |
idx | The index of the scanning device which beam quality must be obtained (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
No index argument version of the Scanner::setBeamWaistRadius method.
|
pure virtual |
Set beam waist radius.
beamWaistRadius | New beam waist radius |
idx | The index of the scanning device which beam waist radius must be setted (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
pure virtual |
Set \(B_{t2}\).
bt2 | New \(B_{t2}\) |
idx | The index of the scanning device which cached Bt2 (square of beam divergence) must be setted (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Set scanner echo width configuration.
calcEchowidth | True to make scanner compute echo width, false otherwise |
|
inline |
Non index version of the Scanner::setDetector method.
|
pure virtual |
Set the abstract detector of the scanning device.
idx | The index of the scanning device which abstract detector must be setted |
Implemented in SingleScanner, and MultiScanner.
|
inline |
No index argument version of the Scanner::setDeviceId method.
|
pure virtual |
Set the scanner device identifier.
deviceId | New scanner device identifier |
Implemented in SingleScanner, and MultiScanner.
|
pure virtual |
Set the device index (newIdx) of the device at given index (oldIdx).
NOTE this function is not safe. It usage must be avoided unless you really know what you are doing.
newIdx | New index for the device |
oldIdx | Old index of the device to be updated |
Implemented in SingleScanner, and MultiScanner.
|
pure virtual |
Set \(D_{r2}\).
dr2 | New \(D_{t2}\) |
idx | The index of the scanning device which cached Dr2 (square of receiver diameter) must be obtained (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
No index argument version of the Scanner::setEfficiency method.
|
pure virtual |
Set device efficiency.
efficiency | New device efficiency |
idx | The index of the scanning device which efficiency must be setted (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Set fixed incidence angle flag.
fixedIncidenceAngle | True to enable fixed incidence angle, false to disable it |
|
inline |
Set scanner full wave noise policy.
fullWaveNoise | True to make scanner add noise to the full wave, false otherwise |
|
inline |
Non index version of the Scanner::setFWFSettings(FWFSettings &, size_t const) method.
|
pure virtual |
Set the Full WaveForm settings of the scanning device.
idx | The index of the scanning device which full waveform settings must be setted |
Implemented in SingleScanner, and MultiScanner.
|
pure virtual |
Obtain the head's relative emitter attitude.
attitude | The new attitude for the head's relative emitter |
idx | The index of the scanning device which head's relative emitter attitude must be setted (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
pure virtual |
Set the head's relative emitter position.
pos | The new position for the head's relative emitter |
idx | The index of the scanning device which head's relative emitter position must be setted (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::setLastPulseWasHit method.
|
pure virtual |
Specify if last pulse was hit (true) or not (false)
lastPulseWasHit | New last pulse hit specification |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of Scanner::setMaxNOR(int const, size_t const)
|
pure virtual |
Set the maximum number of returns per pulse for the scanning device (0 means no maximum at all).
maxNOR | New max NOR for the scanning device |
idx | Index of the scanning device which max NOR must be setted |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::setNumRays(int const, size_t const) method.
|
pure virtual |
Set the number of rays of the scanning device.
numRays | New number of rays for the scanning device |
idx | The index of the scanning device which number of rays must be setted |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::setNumTimeBins(int const, size_t const) method.
|
pure virtual |
Set the number of bins defining the size of the time discretization for the scanning device.
numTimeBins | The number of time bins for the scanning device |
idx | The index of the scanning device which number of time bins must be setted |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::setPeakIntensityIndex(int const, size_t const) method.
|
pure virtual |
Set the index of the bin containing the intensity peak for the scanning device.
pii | The new peak intensity index for the scanning device |
idx | The index of the scanning device which peak intensity index must be setted |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Set platform noise disabled flag.
platformNoiseDisabled | True to disable platform noise, false to enable it |
void Scanner::setPulseFreq_Hz | ( | int const | pulseFreq_Hz | ) |
Set the pulse frequency.
pulseFreq_Hz | New pulse frequency (hertz) |
|
inline |
No index argument version of the Scanner::setPulseLength_ns method.
|
pure virtual |
Set the pulse length.
pulseLength_ns | New pulse length (nanoseconds) |
idx | The index of the scanning device which pulse length must be setted (by default 1, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
No index argument version of the Scanner::setReceiverDiameter method.
|
pure virtual |
Set receiver diameter.
receiverDiameter | New receiver diameter |
idx | The index of the scanning device which efficiency must be setted (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::setScannerHead method.
|
pure virtual |
Set the scanner head of the scanning device.
scannerHead | The scanner head to be assigned to the scanning device |
idx | The index of the scanning device which scanner head must be setted |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Set the identifier of the scanner.
id | The new identifier for the scanner |
|
inline |
Non index version of the Scanner::setSupportedPulseFreqs_Hz(std::list<int> &, size_t const)
|
pure virtual |
Set the list of supported pulse frequencies (in Hertz) for the scanning device.
pulseFreqs_Hz | Supported pulse frequencies for the scanning device |
idx | The index of the scanning device which supported pulse frequencies must be setted |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::setTimeWave(std::vector<double> &&, size_t const) method.
|
pure virtual |
Rvalue version of the Scanner::setTimeWave(std::vector<double> &, size_t const) method.
Implemented in SingleScanner, and MultiScanner.
|
inline |
Non index version of the Scanner::setTimeWave(std::vector<double> &, size_t const) method.
|
pure virtual |
Set the time discretization vector of the scanning device.
timewave | The new time discretization vector for the scanning device |
idx | The index of scanning device which time discretization vector must be updated |
Implemented in SingleScanner, and MultiScanner.
|
inline |
No index argument version of the Scanner::setVisibility method.
|
pure virtual |
Set device visibility.
visibility | New device visibility (kilometers) |
idx | The index of the scanning device which visibility must be setted (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
No index argument version of the Scanner::setWavelength method.
|
pure virtual |
Set wave length.
wavelength | New wave length (meters) |
idx | The index of the scanning device which wavelength must be setted (by default 0, it is the first one) |
Implemented in SingleScanner, and MultiScanner.
|
inline |
Set scanner write wave form configuration.
writeWaveform | True to make scanner write wave form, false otherwise |
string Scanner::toString | ( | ) |
Build a string representation of the scanner.
void Scanner::trackOutputPath | ( | std::string const & | path | ) |
Track given output path in a thread safe way.
path | Output path to be tracked |
std::shared_ptr<std::vector<Measurement> > Scanner::allMeasurements = nullptr |
Historical vector of all measurements performed by the scanner.
It can be nullptr when no historical tracking of all measurements is requested
std::shared_ptr<std::mutex> Scanner::allMeasurementsMutex = nullptr |
Mutex to handle concurrent access to historical vector of all measurements and historical vector of all trajectory points.
std::shared_ptr<std::vector<std::string> > Scanner::allOutputPaths = nullptr |
Historical vector of all output paths where scanner measurements were written.
It can be nullptr when no historical tracking of all output paths is requested
std::shared_ptr<std::vector<Trajectory> > Scanner::allTrajectories = nullptr |
Historical vector of all trajectory points recorded by the scanner.
It can be nullptr when no historical tracking of trajectory is requested
std::shared_ptr<std::vector<Measurement> > Scanner::cycleMeasurements = nullptr |
Vector of measurements performed by the scanner at current cycle.
It can be nullptr when no tracking of measurements by cycle is requested
std::shared_ptr<std::mutex> Scanner::cycleMeasurementsMutex = nullptr |
Mutex to handle concurrent access to vector of measurements and vector of trajectory points by cycle.
std::shared_ptr<std::vector<Trajectory> > Scanner::cycleTrajectories = nullptr |
Vector of trajectory points recorded by the scanner.
It can be nullptr when no tracking of trajectory points by cycle is requested
|
protected |
The scanning pulse process used by the scanner.
|
protected |
Flag specifying if scanner is active (true) or not (false)
When a scanner is not active, it is not sensing
double Scanner::trajectoryTimeInterval_ns = 0.0 |
Time interval between record of trajectory points. When it is exactly 0, then no trajectory points will be recorded.
NOTICE that it is given in nanoseconds, while the trajectoryTimeInterval in the ScannerSettings class is given in seconds, as the user argument itself