|
| | SampledSensor (ISimObjectCreator *creator, std::string kind, std::string name) |
| |
| | SampledSensor (std::string kind, std::string name, const double mountOffset[3], const double mountDirection[3], double period, unsigned int seed) |
| |
| void | SetSamplePeriod (double period) |
| |
| void | StartClockAt (double tStart) |
| |
|
bool | HasPorts () const |
| | True when built by the creator, so the ports exist and the sensor runs.
|
| |
|
unsigned int | Seed () const |
| | The random seed; zero is deterministic and noise free.
|
| |
| environment::EnvironmentProvider * | SetUpEnvironment (ISimObjectCreator *creator) |
| |
|
environment::EnvironmentProvider * | Environment () const |
| | The environment found by SetUpEnvironment, or null.
|
| |
| template<typename Measure > |
| int | ForEachDueSample (const double t, Measure &&measure) |
| |
|
const SensorFrame & | Frame () const |
| | The mounting geometry.
|
| |
|
SensorNoise & | Noise () |
| | The random draws.
|
| |
|
const SensorNoise & | Noise () const |
| | The random draws.
|
| |
|
double | NextSampleTime () const |
| | The time of the next sample, s.
|
| |
|
const std::string & | Name () const |
| | The name of the owning SimObject.
|
| |
|
std::string | Label () const |
| | The message prefix, e.g. "SensorCtd 'Ctd'".
|
| |
|
void | Warn (const std::string &text) const |
| | Writes a warning to the host logger, if there is one.
|
| |
|
void | Info (const std::string &text) const |
| | Writes an information line to the host logger, if there is one.
|
| |
Owns what every fixed-rate AUV sensor needs around its measurement.
A sampled sensor is a SimObject that takes a measurement at fixed instants of the accepted simulation time, at a point rigidly mounted on a moving body, with portable random imperfections. The CTD, the SilCam and the echosounder each own one SampledSensor member and supply only the measurement.
The member holds:
- the SensorFrame (the
Pos and Quater inports and the mounting parameters);
- the SampleClock that decides when a sample is due;
- the SensorNoise, seeded by the
NoiseSeed parameter (FISH-0027);
- the host logger, null under headless and mock hosts;
- the shared
Environment, found once and only when the sensor has ports.
There are two constructors, as on the sensors. The creator one registers the ports and reads the parameters; it leaves no sample due until SetSamplePeriod, because each sensor reads its rate under its own parameter name. The port-free one exists so the sensors can be unit tested without a host: it has no ports, no logger and no environment.
- Note
- This is a helper, not a SimObject, so it has no
@group block and appears in no model list.