|
| struct | Measurement |
| | One completed measurement window, held on the output ports until the next closes. More...
|
| |
| struct | Settings |
| | Everything that makes one silhouette camera out of the shared sensor machinery. More...
|
| |
|
| | SensorSilCam (std::string simObjectName, ISimObjectCreator *creator) |
| |
| | SensorSilCam (std::string simObjectName, const Settings &settings) |
| |
|
void | OdeFcn (const double dT, const double *const adX, double *const adXDot) const override |
| | An empty function: nothing about a frame counting instrument is a continuous state.
|
| |
| void | AcceptedStep (const double dT, const double *const adX) override |
| |
| void | FinalSetup (const double dT, const double *const adX, ISimObjectCreator *const creator) override |
| |
| int | CaptureIfDue (double t, double numberConcentration, const double position[3]) |
| |
| bool | CaptureFrame (double t, double numberConcentration, const double position[3]) |
| |
|
const Measurement & | HeldMeasurement () const |
| | The measurement currently held on the output ports.
|
| |
|
const Settings & | GetSettings () const |
| | The settings the instrument was built with.
|
| |
|
int | FramesInWindow () const |
| | The number of frames captured since the current window opened.
|
| |
|
long long | FramesCaptured () const |
| | The total number of frames captured since the instrument was built.
|
| |
|
double | NextFrameTime () const |
| | The time at which the next frame is due, s.
|
| |
|
| static double | SampleVolumeOf (const double sideLengths[3]) |
| |
| static double | FrameLambdaOf (double numberConcentration, double sampleVolume, double captureEfficiency, double detectionProbability) |
| |
| static double | LengthLogSigmaOf (double medianLength, double stdLength) |
| |
| static int | BinIndexOf (double length, double binMin, double binMax, int numBins) |
| |
|
|
const double * | OutConcentration (const double dT, const double *const adX) |
| | The measured mass concentration, kg/m^3.
|
| |
|
const double * | OutNumberConcentration (const double dT, const double *const adX) |
| | The measured number concentration, individuals per m^3.
|
| |
|
const double * | OutCount (const double dT, const double *const adX) |
| | The raw aggregated count over the window.
|
| |
|
const double * | OutSizeMean (const double dT, const double *const adX) |
| | The mean measured particle length, m.
|
| |
|
const double * | OutSizeStd (const double dT, const double *const adX) |
| | The standard deviation of the measured particle lengths, m.
|
| |
|
const double * | OutSizeHistogram (const double dT, const double *const adX) |
| | The normalised size distribution.
|
| |
|
const double * | OutSampleTime (const double dT, const double *const adX) |
| | The mid time of the held window, s.
|
| |
|
const double * | OutPosition (const double dT, const double *const adX) |
| | The mean NED position of the sensor head over the held window, m.
|
| |
|
const double * | OutValid (const double dT, const double *const adX) |
| | One once the first window has closed.
|
| |
◆ SensorSilCam() [1/2]
| SensorSilCam::SensorSilCam |
( |
std::string |
simObjectName, |
|
|
ISimObjectCreator * |
creator |
|
) |
| |
Constructs the sensor from the simulation input file.
- Parameters
-
| simObjectName | The name of this object in the simulation. |
| creator | The creator of this object. |
◆ SensorSilCam() [2/2]
| SensorSilCam::SensorSilCam |
( |
std::string |
simObjectName, |
|
|
const Settings & |
settings |
|
) |
| |
Constructs the sensor with its settings given directly.
No ports are registered, so AcceptedStep and FinalSetup do nothing and the instrument must be driven through CaptureIfDue instead. This constructor exists so the counting, the sizing and the aggregation can be unit tested without a host simulation, which matters because ISimObjectCreator has some thirty pure virtuals and FhSim exports no mock. It is the same seam SensorCtd uses.
- Parameters
-
| simObjectName | The name of this object. |
| settings | The instrument settings. |
◆ AcceptedStep()
| void SensorSilCam::AcceptedStep |
( |
const double |
dT, |
|
|
const double *const |
adX |
|
) |
| |
|
override |
Captures every frame that has fallen due since the previous accepted step.
- Parameters
-
| dT | The current simulation time, s. |
| adX | The state vector. |
◆ BinIndexOf()
| static int SensorSilCam::BinIndexOf |
( |
double |
length, |
|
|
double |
binMin, |
|
|
double |
binMax, |
|
|
int |
numBins |
|
) |
| |
|
static |
The histogram bin a length falls in, clamping the tails into the end bins.
- Parameters
-
| length | The length, m. |
| binMin | The lower edge of the first bin, m. |
| binMax | The upper edge of the last bin, m. |
| numBins | The number of bins. |
- Returns
- The bin index in
[0, numBins - 1].
◆ CaptureFrame()
| bool SensorSilCam::CaptureFrame |
( |
double |
t, |
|
|
double |
numberConcentration, |
|
|
const double |
position[3] |
|
) |
| |
Captures exactly one frame, closing the window if it is the last of one.
- Parameters
-
| t | The time of the frame, s. |
| numberConcentration | The number concentration at the sensor head, per m^3. |
| position | The NED position of the sensor head, m. |
- Returns
- True when this frame closed a window, so the held measurement changed.
◆ CaptureIfDue()
| int SensorSilCam::CaptureIfDue |
( |
double |
t, |
|
|
double |
numberConcentration, |
|
|
const double |
position[3] |
|
) |
| |
Captures every frame that is due at a time.
A loop and not a single test, so that a long accepted step consumes every frame that fell inside it rather than throwing the signal away.
- Parameters
-
| t | The current simulation time, s. |
| numberConcentration | The number concentration at the sensor head, per m^3. |
| position | The NED position of the sensor head, m. |
- Returns
- The number of frames captured, which may be zero or more than one.
◆ FinalSetup()
| void SensorSilCam::FinalSetup |
( |
const double |
dT, |
|
|
const double *const |
adX, |
|
|
ISimObjectCreator *const |
creator |
|
) |
| |
|
override |
Resolves the environment, the species field handle and the field's properties.
- Parameters
-
| dT | The initial simulation time, s. |
| adX | The state vector. |
| creator | The creator of this object. |
◆ FrameLambdaOf()
| static double SensorSilCam::FrameLambdaOf |
( |
double |
numberConcentration, |
|
|
double |
sampleVolume, |
|
|
double |
captureEfficiency, |
|
|
double |
detectionProbability |
|
) |
| |
|
static |
The expected number of counted particles in one frame.
- Parameters
-
| numberConcentration | The number concentration at the sensor head, per m^3. |
| sampleVolume | The imaged volume, m^3. |
| captureEfficiency | The fraction of present animals carried through the volume. |
| detectionProbability | The probability an imaged animal is counted. |
- Returns
- The Poisson rate of one frame.
◆ LengthLogSigmaOf()
| static double SensorSilCam::LengthLogSigmaOf |
( |
double |
medianLength, |
|
|
double |
stdLength |
|
) |
| |
|
static |
The log-sigma of the length distribution implied by a median and a standard deviation.
- Parameters
-
| medianLength | The median length, m. |
| stdLength | The standard deviation of the length, m. |
- Returns
- The log-sigma, which is zero when either argument is non-positive.
◆ SampleVolumeOf()
| static double SensorSilCam::SampleVolumeOf |
( |
const double |
sideLengths[3] | ) |
|
|
static |
The imaged volume, m^3.
- Parameters
-
| sideLengths | The three side lengths of the imaged volume, m. |
- Returns
- The product of the three, m^3.
The documentation for this class was generated from the following file:
- /update_root/webfhsim/reloadrepos/fhsim_fishery/src/auv/SensorSilCam.h