|
LRAUV
revA
|
Specifies the interface details for the HFRCMVirtualSurfaceDrifter component in the EstimationModule. More...
#include <HFRCMVirtualSurfaceDrifter.h>


Public Member Functions | |
| HFRCMVirtualSurfaceDrifter (const Module *module) | |
| virtual | ~HFRCMVirtualSurfaceDrifter () |
| void | initialize (void) |
| Initialize function. More... | |
| void | run () |
| The actual "payload" of the component. More... | |
Public Member Functions inherited from SyncComponent | |
| CycleOrder | getCycleOrder (void) |
| Getter function for controlThreadOrderPreference. More... | |
| void | setRepeating (bool repeating) |
| int | getDivisor () const |
| int | getModulo () const |
| bool | isRepeater () |
| bool | isRepeating () |
Public Member Functions inherited from Component | |
| virtual | ~Component () |
| Destructor cleans up readers_ and writers_. More... | |
| void | registerReader (DataReader *reader) |
| void | unregisterReader (DataReader *reader) |
| void | registerWriter (DataWriter *writer) |
| void | unregisterWriter (DataWriter *writer) |
| void | disableMetering (void) |
| FlexArray< DataReader * > & | getReaderList (void) |
| FlexArray< DataWriter * > & | getWriterList (void) |
| const Module * | getModule () |
| virtual void | configure () |
| Read (or re-read!) configuration settings. More... | |
| virtual void | execute (void) |
| virtual void | uninitialize () |
| Provide a space for uninitialization. More... | |
| bool | isActive () const |
| Indicates if the component is active. More... | |
| const CodedStr & | getName (void) const |
| Returns the name. More... | |
| const Timestamp & | getTimeOfLastRun (void) const |
| ComponentState | getState (void) |
| Return the component's current state. More... | |
| void | setState (ComponentState state) |
| RunState | getRunState (void) |
| Return the component's run state. More... | |
| bool | isUsingRunState () |
| Return true if using runState. More... | |
| void | requestData (bool requestingData) |
| Tell the component to start (or stop) sending data. More... | |
| void | requestStart () |
| Tell the component to start runnning. More... | |
| void | requestPause (const Timespan expectedPauseTime) |
| Tell the component to pause runnning. More... | |
| void | requestResume () |
| Tell the component resume from pause. More... | |
| void | requestStop () |
| Tell the component to stop runnning. More... | |
| virtual RunState | start () |
| Do what needs to be done to run Similar to initialize, in old init/run/uninit sequence. More... | |
| virtual RunState | starting () |
| Might follow a STOP...START sequence Subseqent. More... | |
| virtual RunState | runnable () |
| Should eventually follow a START request or RESETTING. More... | |
| virtual RunState | satisfied () |
| Possible return value of a Behavior. More... | |
| virtual RunState | pause () |
| Pause for a short period (indicated by pauseTime) More... | |
| virtual RunState | pausing () |
| Might follow a PAUSE request. More... | |
| virtual RunState | paused () |
| Should eventually follow a PAUSE request: should set continueTime. More... | |
| virtual RunState | resume () |
| Resume from PAUSE. More... | |
| virtual RunState | resuming () |
| Might follow a PAUSE...RESUME sequence. More... | |
| virtual RunState | resetting () |
| Might occur in case of Error. More... | |
| virtual RunState | stop () |
| Initial state – can be later followed by START. More... | |
| virtual RunState | stopping () |
| Might follow a STOP request. More... | |
| virtual RunState | stopped () |
| Should eventually follow a STOP request. More... | |
| void | setCriticalFailureReported (bool boolVal) |
| void | setRecoveringFromCritical (bool boolVal) |
| void | setFailureReported (bool boolVal) |
| bool | isFailureUninitialized () |
| void | setFailureUninitialized (bool boolVal) |
| void | setRetryTimeout (const Timespan &timeout) |
| virtual bool | isCompleted (void) |
| Query if this component is completed. More... | |
| void | setPeriod (const Timespan &period) |
| Set the period of this component... used if it is periodic. More... | |
| const Timespan & | getPeriod (void) |
| Returns the component's period (regardless of whether it is periodic) More... | |
| ComponentType | getComponentType () |
| Getter function for ComponentType. More... | |
| virtual bool | isFailed (void) const |
| virtual FailureMode::FailType | getFailureType (void) const |
| virtual bool | getCriticalFailureReported (void) const |
| virtual bool | getFailureReported (void) const |
| virtual Timespan | getRetryTimeout (void) const |
| virtual FailureMode::FailType | setFailure (FailureMode::FailType failureType) |
| virtual int | getFailCount (void) const |
| virtual bool | isFailureMissionCritical () |
| virtual int | getAllowableFailures (void) const |
| virtual void | setAllowableFailures (int fails) |
| Logger & | getLogger (void) |
| virtual int | incrementFailCount (void) |
| virtual void | resetFailCount (void) |
| virtual int | getSkippedRunsSinceFail (void) const |
| virtual int | incrementSkippedRunsSinceFail (void) |
| virtual void | logVoltage (float voltage, float averageVoltage) |
| virtual void | logCurrent (float current, float averageCurrent) |
| const Timestamp & | getWriteTimestamp (void) |
| void | setWriteTimestamp (const Timestamp &writeTimestamp) |
| BlobReader * | newBlobReader (const BlobURI &blobURI) |
| BlobReader * | newBlobReaderFromUniversal (const Str &componentName, const UniversalBlobURI &blobURI) |
| BlobWriter * | newBlobWriter (const BlobURI &blobURI, Logger::TimePrecisionType timePrecision=Logger::TIME_PRECISION_MILLIS) |
| ConfigReader * | newConfigReader (const ConfigURI &configURI) |
| DataReader * | newDataReader (const DataURI &dataURI) |
| DataReader * | newDataReaderFromUniversal (const Str &componentName, const UniversalURI &universalURI) |
| DataWriter * | newDataWriter (const DataURI &dataURI, Logger::TimePrecisionType timePrecision=Logger::TIME_PRECISION_MILLIS) |
| UniversalBlobReader * | newUniversalBlobReader (const UniversalBlobURI &universalURI) |
| UniversalBlobWriter * | newUniversalBlobWriter (const UniversalBlobURI &universalURI, const Unit &accuracyUnit=Units::NONE, const float accuracy=DataElement::NO_ACCURACY, Logger::TimePrecisionType timePrecision=Logger::TIME_PRECISION_MILLIS) |
| UniversalDataReader * | newUniversalReader (const UniversalURI &universalURI) |
| UniversalDataWriter * | newUniversalWriter (const UniversalURI &universalURI, const Unit &accuracyUnit=Units::NONE, const float accuracy=DataElement::NO_ACCURACY, Logger::TimePrecisionType timePrecision=Logger::TIME_PRECISION_MILLIS) |
Static Public Member Functions | |
| static bool | Reinitialize (double latitude0rad, double longitude0rad) |
| Reinitialize function (used by ReinitializeHFRCMVirtualSurfaceDrifter behavior to set/reset the initial location of the drifter) More... | |
Protected Member Functions | |
| bool | setLocation (double latitude0rad, double longitude0rad) |
| set the location of the drifter More... | |
| bool | lookupExpansionCoefficients (void) |
| Look up the expansion coefficients at the current time. More... | |
| bool | lookupEmpiricalOrthogonalFunctions (void) |
| Look up the empirical orthogonal functions at the specified location. More... | |
| void | reproject (void) |
| Calculate the estimated velocities at the specified location and time. More... | |
| void | advect (void) |
| Calculate the new location of the drifter. More... | |
| void | writeData (void) |
| Write the pertinent data out to the slate. More... | |
Protected Member Functions inherited from SyncEstimationComponent | |
| SyncEstimationComponent (const Str &name, const Module *module, int divisor=1, int modulo=0) | |
Protected Member Functions inherited from SyncComponent | |
| void | setRepeater (bool repeater) |
Protected Member Functions inherited from Component | |
| virtual ConfigURI | getConfigURI (ConfigOption configOption) const |
| Should return [myNamespace]::SIMULATE_HARDWARE, or [myNamespace]::POWER, etc. More... | |
| virtual ConfigURI | getConfigURI (ConfigOption configOption, ElementURI forElement) const |
| Should return [myNamespace]::POWER_[forElement], [myNamespace]::LATENCY_[forElement], etc. More... | |
| virtual void | setDurationOfLastRun (const Timespan &span) |
| virtual void | setTimeOfRun (const Timestamp &time) |
| virtual void | setTimeOfLastRun (const Timestamp &time) |
| virtual void | setDt (const Timespan &dt) |
| virtual bool | setEnabled (bool enabled=true) |
| void | setRunState (const RunState runState) |
| const Timespan | getPauseTime () const |
| virtual void | setFailureMissionCritical (bool failureMissionCritical) |
| bool | simulateHardware () |
Static Protected Attributes | |
| static HFRCMVirtualSurfaceDrifter * | Instance_ |
| Pointer to the singleton-like instance of this component. More... | |
Private Member Functions | |
| HFRCMVirtualSurfaceDrifter (const HFRCMVirtualSurfaceDrifter &old) | |
Specifies the interface details for the HFRCMVirtualSurfaceDrifter component in the EstimationModule.
HFRCMVirtualSurfaceDrifter.h should only be included by HFRCMVirtualSurfaceDrifter.cpp Other classes should include HFRCMVirtualSurfaceDrifter.h
| HFRCMVirtualSurfaceDrifter::HFRCMVirtualSurfaceDrifter | ( | const Module * | module | ) |
|
virtual |
References Instance_.
|
private |
|
protected |
Calculate the new location of the drifter.
References Timespan::asDouble(), Location::AtBearing(), Units::CENTIMETER_PER_SECOND, course_, Component::dt_, Location::EARTH_RADIUS_INVERTED, easting_, eastVelocity_, elapsedTime_, horizontalDisplacement_, latitude_, locationAccuracy_, longitude_, AuvMath::NanZero(), northing_, northVelocity_, DataReader::read(), velocityAccuracy_, and velocityAccuracyConfigReader_.
Referenced by run().
|
virtual |
Initialize function.
Reimplemented from Component.
References Component::logger_, and Logger::syslog().
|
protected |
Look up the empirical orthogonal functions at the specified location.
References eastEmpiricalOrthogonalFunctionsHere_, eastEnsembleMeanHere_, eastScalingFactor_, HFRCMSpaceInterpolator::Instance(), latitude_, longitude_, HFRCMSpaceInterpolator::lookupEmpiricalOrthogonalFunctions(), northEmpiricalOrthogonalFunctionsHere_, northEnsembleMeanHere_, northScalingFactor_, and R2D.
Referenced by run().
|
protected |
Look up the expansion coefficients at the current time.
References expansionCoefficientsNow_, HFRCMTimeInterpolator::Instance(), HFRCMTimeInterpolator::lookupExpansionCoefficients(), and Timestamp::Now().
Referenced by run().
|
static |
Reinitialize function (used by ReinitializeHFRCMVirtualSurfaceDrifter behavior to set/reset the initial location of the drifter)
References Instance_, and setLocation().
Referenced by ReinitializeHFRCMVirtualSurfaceDrifter::run().
|
protected |
Calculate the estimated velocities at the specified location and time.
References eastEmpiricalOrthogonalFunctionsHere_, eastEnsembleMeanHere_, eastScalingFactor_, eastVelocity_, expansionCoefficientsNow_, northEmpiricalOrthogonalFunctionsHere_, northEnsembleMeanHere_, northScalingFactor_, and northVelocity_.
Referenced by run().
|
virtual |
The actual "payload" of the component.
Reimplemented from Component.
References advect(), calculationTime_, eastVelocity_, eastVelocityWriter_, Syslog::INFO, latitude_, latitudeWriter_, Component::logger_, longitude_, longitudeWriter_, lookupEmpiricalOrthogonalFunctions(), lookupExpansionCoefficients(), northVelocity_, northVelocityWriter_, Timestamp::Now(), R2D, reproject(), DataWriter::setInvalid(), Logger::syslog(), Timestamp::toString(), verbosity_, and writeData().
|
protected |
set the location of the drifter
References Syslog::INFO, initialLatitudeWriter_, initialLongitudeWriter_, latitude_, Component::logger_, longitude_, Timestamp::Now(), R2D, Units::RADIAN, Logger::syslog(), and DataWriter::write().
Referenced by Reinitialize().
|
protected |
Write the pertinent data out to the slate.
References calculationTime_, Units::CENTIMETER_PER_SECOND, eastVelocity_, eastVelocityWriter_, latitude_, latitudeWriter_, longitude_, longitudeWriter_, northVelocity_, northVelocityWriter_, Units::RADIAN, and DataWriter::write().
Referenced by run().
|
protected |
Referenced by run(), and writeData().
|
protected |
Referenced by advect().
|
protected |
Referenced by lookupEmpiricalOrthogonalFunctions(), and reproject().
|
protected |
Referenced by lookupEmpiricalOrthogonalFunctions(), and reproject().
|
protected |
Referenced by advect().
|
protected |
Referenced by lookupEmpiricalOrthogonalFunctions(), and reproject().
|
protected |
Referenced by advect(), reproject(), run(), and writeData().
|
protected |
Referenced by HFRCMVirtualSurfaceDrifter(), run(), and writeData().
|
protected |
Referenced by advect().
|
protected |
Referenced by lookupExpansionCoefficients(), and reproject().
|
protected |
Referenced by advect().
|
protected |
Referenced by HFRCMVirtualSurfaceDrifter(), and setLocation().
|
protected |
Referenced by HFRCMVirtualSurfaceDrifter(), and setLocation().
|
staticprotected |
Pointer to the singleton-like instance of this component.
Referenced by HFRCMVirtualSurfaceDrifter(), Reinitialize(), and ~HFRCMVirtualSurfaceDrifter().
|
protected |
Referenced by advect(), lookupEmpiricalOrthogonalFunctions(), run(), setLocation(), and writeData().
|
protected |
Referenced by HFRCMVirtualSurfaceDrifter(), run(), and writeData().
|
protected |
Referenced by advect().
|
protected |
Referenced by advect(), lookupEmpiricalOrthogonalFunctions(), run(), setLocation(), and writeData().
|
protected |
Referenced by HFRCMVirtualSurfaceDrifter(), run(), and writeData().
|
protected |
Referenced by lookupEmpiricalOrthogonalFunctions(), and reproject().
|
protected |
Referenced by lookupEmpiricalOrthogonalFunctions(), and reproject().
|
protected |
Referenced by advect().
|
protected |
Referenced by lookupEmpiricalOrthogonalFunctions(), and reproject().
|
protected |
Referenced by advect(), reproject(), run(), and writeData().
|
protected |
Referenced by HFRCMVirtualSurfaceDrifter(), run(), and writeData().
|
protected |
Referenced by advect().
|
protected |
Referenced by advect().
|
protected |
Referenced by run().