|
LRAUV
revA
|
Provides software interface to the Sparton SP3003D AHRS. More...
#include <AHRS_sp3003D.h>


Public Types | |
| enum | CalibrateSpartonMode { CAL_OFF, CAL_RESET, CAL_AUTOVAR, CAL_MANUAL, CAL_AUTO } |
Public Types inherited from Component | |
| enum | ComponentState { BLOCK_CONTINUOUS, BLOCK_PERIODIC, BLOCK_NORMAL, BLOCK_COMPLETED, BLOCK_UNKNOWN } |
| In this model, the component has basically two states: wanting to run, and completed (no longer needing to run). More... | |
| enum | ComponentType { COMPONENT_ASYNC, COMPONENT_CONFIG, COMPONENT_BEHAVIOR, COMPONENT_SYNC } |
| Components can indicate how they want to be handled by their type. More... | |
| enum | RunState { NO_RUN_STATE = 0, START, STARTING, RUNNABLE, SATISFIED, PAUSE, PAUSING, PAUSED, RESUME, RESUMING, RESETTING, STOP, STOPPING, STOPPED } |
Public Member Functions | |
| AHRS_sp3003D (const Module *module) | |
| virtual | ~AHRS_sp3003D () |
| virtual void | run () |
| The actual "payload" of the component. 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. More... | |
| virtual RunState | pause () |
| Pause for a short period (indicated by pauseTime) 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 | runnable () |
| Should eventually follow a START request or RESETTING. 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 () |
| Initial state – can be later followed by START. More... | |
| virtual void | uninitialize () |
| Provide a space for uninitialization. More... | |
| virtual ConfigURI | getConfigURI (ConfigOption configOption) const |
| Should return [myNamespace]::SIMULATE_HARDWARE, or [myNamespace]::POWER, etc. 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 | initialize () |
| Provide a space for initialization before being run. More... | |
| virtual void | configure () |
| Read (or re-read!) configuration settings. More... | |
| virtual void | execute (void) |
| 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 | satisfied () |
| Possible return value of a Behavior. More... | |
| virtual RunState | pausing () |
| Might follow a PAUSE 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 | SetCalMode (CalibrateSpartonMode calMode) |
| Sets the state and commands the Sparton Retuns true if successful. More... | |
Private Member Functions | |
| AHRS_sp3003D (const AHRS_sp3003D &old) | |
| bool | isDataRequested () |
| bool | tryUartComms (const char *textToSend, const char *errorPrefix, Syslog::Severity severity=Syslog::ERROR) |
| void | readConfig () |
| float | getCompassHdg () |
| float | getTrueHdg () |
| void | getPitchRoll (float &pitch, float &roll) |
| bool | readTransducers (float &compassHeading, float &pitch, float &roll, float &temperature) |
| void | requestTransducers () |
| void | setMountVertical () |
| bool | receiveTransducers (float &compassHeading, float &pitch, float &roll, float &temperature) |
| void | requestHeadingMagBin () |
| bool | receiveHeadingMagBin (float &compassHeading) |
| bool | readHeadingMagBin (float &compassHeading) |
| void | requestPitchRollBin () |
| bool | receivePitchRollBin (float &pitch, float &roll) |
| bool | readPitchRollBin (float &pitch, float &roll) |
| bool | readMagnetics (float &mX, float &mY, float &mZ, float &mT) |
| bool | readMagneticsBin (float &mX, float &mY, float &mZ) |
| bool | readAccelVec (float &aX, float &aY, float &aZ, float &aT) |
| bool | readAccelVecBin (float &aX, float &aY, float &aZ, float &aT) |
| void | setWritersInvalid (bool invalid) |
| Sets the fail state of the slate writers during calibration. More... | |
| bool | setCalMode (CalibrateSpartonMode calMode) |
| Sets the state and commands the Sparton Retuns true if successful. More... | |
| short | extractShort (char *convertFloat) |
Static Private Member Functions | |
| static bool | ParseHCXDR (const char *response, float &compassHeading, float &pitch, float &roll, float &temperature) |
| static bool | ParsePSPAM (const char *response, float &mX, float &mY, float &mZ, float &mT) |
| static bool | ParsePSPAA (const char *response, float &aX, float &aY, float &aZ, float &aT) |
| static bool | ParseMagErr (const char *response, int &magErr) |
| static int | CalcNMEAChecksum (const char *response) |
Static Private Attributes | |
| static AHRS_sp3003D * | Instance_ |
| Pointer to the singleton-like instance of this component. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from SyncComponent | |
| static const int | CYCLE_INCREMENT |
| static const int | CYCLE_REPEAT_OFFSET |
| static const CycleOrder | CYCLE_STARTER |
| static const CycleOrder | CYCLE_SIMULATOR |
| static const CycleOrder | CYCLE_SENSOR |
| static const CycleOrder | CYCLE_DERIVATION |
| static const CycleOrder | CYCLE_ESTIMATION |
| static const CycleOrder | CYCLE_NAVIGATION |
| static const CycleOrder | CYCLE_MISSION_MANAGER |
| static const CycleOrder | CYCLE_MISSION |
| static const CycleOrder | CYCLE_CONTROL |
| static const CycleOrder | CYCLE_SERVO |
| static const CycleOrder | CYCLE_TEST |
| static const CycleOrder | CYCLE_REPORTER |
| static const CycleOrder | CYCLE_LOGGER |
Protected Types inherited from Component | |
| enum | ConfigOption { CONFIG_SIMULATE_HARDWARE, CONFIG_POWER, CONFIG_FREQUENCY, CONFIG_LATENCY } |
Protected Member Functions inherited from SyncSensorComponent | |
| SyncSensorComponent (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, 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 () |
Protected Attributes inherited from Component | |
| Logger | logger_ |
| Syslog::Severity | debugLevel_ |
| ComponentState | state_ |
| Keep track of whether the component has "completed" or should be run again. More... | |
| Timespan | desiredPeriod_ |
| CodedStr & | name_ |
| Store the component's name (used for logging purposes) More... | |
| Timestamp | timeOfRun_ |
| Timestamp | timeOfLastRun_ |
| Timespan | durationOfLastRun_ |
| Timespan | dt_ |
| Timespan | retryTimeout_ |
| bool | enabled_ |
| bool | failureReported_ |
| Indicates if the failure has been reported – cuts down on syslog. More... | |
| bool | criticalFailureReported_ |
| Indicates if a "Critical" failure has been reported – cuts down on syslog. More... | |
| bool | recoveringFromCritical_ |
| Indicates that a component had a previous critical failure that has been cleared temporarily awaiting final word from the component itself. More... | |
| bool | failureUninitialized_ |
| Indicates if the failure has resulted in an uninitialize call. More... | |
| int | failCount_ |
| Number of failures logged by PCaller. More... | |
| bool | failureMissionCritical_ |
| If true (default), complete failure ends mission. More... | |
| int | allowableFailures_ |
| Number of failures allowed to occur. More... | |
| int | skippedRunsSinceFail_ |
| Number of skipped runs since failureMode_ set by failCount_. More... | |
| FailureMode::FailType | failureType_ |
| Failed status. If failCount_ > 0, then this may be reset. More... | |
| Timestamp | timeOfFailure_ |
| Time of last failure. Relevant only if failed=true. More... | |
| Timestamp | writeTimestamp_ |
| Time of last write. More... | |
| FlexArray< DataReader * > | readers_ |
| FlexArray< DataWriter * > | writers_ |
| const Module * | module_ |
| Timespan | pauseTime_ |
| bool | meteringEnabled_ |
| If true, metering is enabled. More... | |
| DataWriter * | durationOfLastRunWriter_ |
| Writer for durationOfLastRun. More... | |
| DataWriter * | voltageWriter_ |
| DataWriter * | avgVoltageWriter_ |
| DataWriter * | currentWriter_ |
| DataWriter * | avgCurrentWriter_ |
| bool | persistentPause_ |
| True if data is persistent while component is paused. More... | |
Provides software interface to the Sparton SP3003D AHRS.
Can also use SimSlate to provide simulated AHRS values when they are available.
AHRS_sp3003D.h should only be included by AHRS_sp3003D.cpp Other classes should include AHRS_sp3003DIF.h *** Exception is classCalibrateSparton, which is in the same module.
| AHRS_sp3003D::AHRS_sp3003D | ( | const Module * | module | ) |
References AHRS_ACCURACY, atWriter_, axWriter_, ayWriter_, azWriter_, compassHeadingWriter_, compassTemperatureWriter_, Units::DEGREE, UniversalURI::DEPTH, depthReader_, Point3D::getMagnitude(), Instance_, UniversalURI::LATITUDE, latitudeReader_, UniversalURI::LONGITUDE, longitudeReader_, magDeviationCfgReader_, magneticHeadingWriter_, mtWriter_, mxWriter_, myWriter_, mzWriter_, Component::newConfigReader(), Component::newDataWriter(), Component::newUniversalBlobWriter(), Component::newUniversalReader(), Component::newUniversalWriter(), Units::NONE, PITCH_ROLL_ACCURACY, pitchOffsetCfgReader_, pitchWriter_, UniversalURI::PLATFORM_MAGNETIC_ORIENTATION, UniversalURI::PLATFORM_ORIENTATION, UniversalURI::PLATFORM_ORIENTATION_MATRIX, UniversalURI::PLATFORM_PITCH_ANGLE, UniversalURI::PLATFORM_ROLL_ANGLE, readAccelerationsCfgReader_, readMagneticsCfgReader_, readMountingCfgReader_, rollOffsetCfgReader_, rollWriter_, rotationMatrixWriter_, Component::setRunState(), Component::START, and trueHeadingWriter_.
|
virtual |
References Instance_.
|
private |
|
staticprivate |
Referenced by ParseHCXDR(), ParseMagErr(), ParsePSPAA(), and ParsePSPAM().
|
private |
Referenced by readAccelVecBin(), readMagneticsBin(), receiveHeadingMagBin(), and receivePitchRollBin().
|
private |
|
virtual |
Should return [myNamespace]::SIMULATE_HARDWARE, or [myNamespace]::POWER, etc.
Reimplemented from Component.
References Component::CONFIG_POWER, Component::CONFIG_SIMULATE_HARDWARE, and ConfigURI::NO_CONFIG_URI.
|
private |
References deviceResponse_, Syslog::ERROR, Component::logger_, MIN, Component::simulateHardware(), Logger::syslog(), and tryUartComms().
|
private |
|
private |
References atWriter_, axWriter_, compassHeadingWriter_, DataWriter::isDataRequested(), magneticHeadingWriter_, mtWriter_, mxWriter_, pitchWriter_, rollWriter_, rotationMatrixWriter_, and trueHeadingWriter_.
Referenced by paused(), runnable(), and stopped().
|
staticprivate |
References CalcNMEAChecksum(), and D2R.
Referenced by readTransducers(), and receiveTransducers().
|
staticprivate |
References CalcNMEAChecksum().
Referenced by setCalMode().
|
staticprivate |
References CalcNMEAChecksum().
Referenced by readAccelVec().
|
staticprivate |
References CalcNMEAChecksum().
Referenced by readMagnetics().
|
virtual |
Pause for a short period (indicated by pauseTime)
Reimplemented from Component.
References UartStream::close(), debug_, Syslog::FAULT, FailureMode::HARDWARE, Syslog::INFO, LoadControl::isolateLoad(), loadControl_, Component::logger_, Component::PAUSED, Component::setFailure(), Component::simulateHardware(), Component::STOP, Logger::syslog(), and uart_.
|
virtual |
Should eventually follow a PAUSE request: should set continueTime.
Reimplemented from Component.
References debug_, Syslog::INFO, isDataRequested(), Component::logger_, Component::PAUSED, resume(), and Logger::syslog().
|
private |
References deviceResponse_, ParsePSPAA(), Component::simulateHardware(), and tryUartComms().
|
private |
|
private |
References Units::BOOL, magDeviation_, magDeviationCfgReader_, pitchOffset_, pitchOffsetCfgReader_, Units::RADIAN, DataReader::read(), readAccelerationsCfg_, readAccelerationsCfgReader_, readMagneticsCfg_, readMagneticsCfgReader_, readMountingCfg_, readMountingCfgReader_, rollOffset_, and rollOffsetCfgReader_.
Referenced by resuming(), runnable(), and starting().
|
private |
References receiveHeadingMagBin(), and requestHeadingMagBin().
Referenced by runnable(), and starting().
|
private |
References deviceResponse_, ParsePSPAM(), Component::simulateHardware(), and tryUartComms().
|
private |
|
private |
References receivePitchRollBin(), and requestPitchRollBin().
Referenced by runnable().
|
private |
References deviceResponse_, ParseHCXDR(), Component::simulateHardware(), and tryUartComms().
|
private |
References InStream::bytesRead(), D2R, deviceResponse_, Syslog::ERROR, UartStream::errorString(), extractShort(), UartStream::hasError(), Component::logger_, UartStream::read(), Component::simulateHardware(), Logger::syslog(), and uart_.
Referenced by readHeadingMagBin(), and runnable().
|
private |
|
private |
|
private |
References UartStream::flush(), Component::simulateHardware(), and uart_.
Referenced by readHeadingMagBin(), resuming(), runnable(), and starting().
|
private |
References UartStream::flush(), Component::simulateHardware(), and uart_.
Referenced by readPitchRollBin().
|
private |
References UartStream::flush(), Component::simulateHardware(), and uart_.
|
inlinevirtual |
|
virtual |
Resume from PAUSE.
Reimplemented from Component.
References FailureMode::COMMUNICATIONS, debug_, UartStream::errorString(), Syslog::FAULT, FailureMode::HARDWARE, UartStream::hasError(), Syslog::INFO, loadControl_, Component::logger_, UartStream::open(), LoadControl::powerUp(), Component::RESUMING, Component::setFailure(), Component::simulateHardware(), Component::STOP, Logger::syslog(), and uart_.
Referenced by paused().
|
virtual |
Might follow a PAUSE...RESUME sequence.
Reimplemented from Component.
References debug_, Syslog::INFO, Component::logger_, readAccelerationsCfg_, readConfig(), readMagneticsCfg_, requestHeadingMagBin(), Component::RUNNABLE, and Logger::syslog().
|
virtual |
The actual "payload" of the component.
Reimplemented from Component.
|
virtual |
Should eventually follow a START request or RESETTING.
Reimplemented from Component.
References atWriter_, axWriter_, ayWriter_, azWriter_, CAL_AUTO, CAL_MANUAL, CAL_OFF, calibrationFailure_, calMode_, Units::CELSIUS, FailureMode::COMMUNICATIONS, compassHeadingWriter_, compassTemperatureWriter_, dataTimestamp_, debug_, Syslog::ERROR, LoadControl::errorString(), Syslog::FAULT, Str::find(), GRAVITY_MILLI_G, FailureMode::HARDWARE, LoadControl::hasError(), SimSlate::HEADING_RADIAN, Syslog::INFO, DataReader::isActive(), isDataRequested(), latitudeReader_, loadControl_, Component::logger_, longitudeReader_, magDeviation_, magneticHeadingWriter_, magVariation_, Units::METER_PER_SECOND_SQUARED, Units::MILLIGAUSS, AuvMath::ModPi(), mtWriter_, mxWriter_, myWriter_, mzWriter_, Units::NONE, Timestamp::Now(), Component::PAUSE, SimSlate::PITCH_RADIAN, pitchOffset_, pitchWriter_, MagneticVariation::Radian(), Units::RADIAN, DataReader::read(), SimSlate::Read(), readAccelerationsCfg_, readAccelVecBin(), readConfig(), readHeadingMagBin(), readMagneticsBin(), readMagneticsCfg_, readPitchRollBin(), receiveHeadingMagBin(), requestHeadingMagBin(), LoadControl::requestVoltageAndCurrent(), Component::resetFailCount(), SimSlate::ROLL_RADIAN, rollOffset_, rollWriter_, rotationFromVehicleToNavigationFrame_, rotationMatrixWriter_, Component::RUNNABLE, Component::setFailure(), setWritersInvalid(), Component::simulateHardware(), Component::STOP, Logger::syslog(), trueHeadingWriter_, verbosity_, DataWriter::write(), and AbstractBlobWriter::write2DClass().
|
static |
Sets the state and commands the Sparton Retuns true if successful.
References Instance_, and setCalMode().
Referenced by CalibrateSparton::initialize(), CalibrateSparton::preempted(), and CalibrateSparton::uninitialize().
|
private |
Sets the state and commands the Sparton Retuns true if successful.
References Timestamp::asStructTm(), CAL_AUTO, CAL_AUTOVAR, CAL_MANUAL, CAL_OFF, CAL_RESET, calibrationFailure_, calMode_, Syslog::CRITICAL, Units::DEGREE, depthReader_, deviceResponse_, Syslog::IMPORTANT, latitudeReader_, Component::logger_, longitudeReader_, Units::METER, Timestamp::Now(), ParseMagErr(), DataReader::read(), setWritersInvalid(), Component::simulateHardware(), Logger::syslog(), and tryUartComms().
Referenced by SetCalMode().
|
private |
References uart_.
Referenced by starting().
|
private |
Sets the fail state of the slate writers during calibration.
References magneticHeadingWriter_, pitchWriter_, rollWriter_, rotationMatrixWriter_, DataWriter::setInvalid(), and trueHeadingWriter_.
Referenced by runnable(), and setCalMode().
|
virtual |
Do what needs to be done to run Similar to initialize, in old init/run/uninit sequence.
Reimplemented from Component.
References FailureMode::COMMUNICATIONS, configSet_, debug_, deviceResponse_, UartStream::errorString(), Syslog::FAULT, FailureMode::HARDWARE, UartStream::hasError(), Syslog::INFO, loadControl_, Component::logger_, Timestamp::Now(), UartStream::open(), LoadControl::powerUp(), Component::setAllowableFailures(), Component::setFailure(), Component::setRetryTimeout(), Component::simulateHardware(), Component::START, Component::STARTING, startTime_, Component::STOP, Logger::syslog(), and uart_.
|
virtual |
Might follow a STOP...START sequence.
Reimplemented from Component.
References configSet_, debug_, Timestamp::elapsed(), Syslog::ERROR, Syslog::FAULT, FailureMode::HARDWARE, Syslog::INFO, Component::logger_, magVariation_, Timestamp::Now(), SimSlate::PITCH_RADIAN, poTimeout_, MagneticVariation::Radian(), Units::RADIAN, SimSlate::Read(), readAccelerationsCfg_, readConfig(), readHeadingMagBin(), readMagneticsCfg_, readMountingCfg_, Slate::ReadOnce(), requestHeadingMagBin(), Component::RUNNABLE, Component::setFailure(), setMountVertical(), Component::simulateHardware(), Component::STARTING, startTime_, Component::STOP, Logger::syslog(), and usingSimWarned_.
|
virtual |
Initial state – can be later followed by START.
Reimplemented from Component.
References debug_, Syslog::INFO, Component::logger_, Timestamp::Now(), startTime_, Component::STOPPING, Logger::syslog(), and uninitialize().
Referenced by resetting(), and stopped().
|
virtual |
Initial state – can be later followed by START.
Reimplemented from Component.
References UartStream::close(), debug_, LoadControl::getPowerState(), Syslog::INFO, isDataRequested(), UartStream::isReadable(), loadControl_, Component::logger_, LoadControl::OFF, LoadControl::POWER_DOWN, Component::simulateHardware(), Component::START, stop(), Component::STOPPED, Logger::syslog(), and uart_.
|
virtual |
Might follow a STOP request.
Reimplemented from Component.
References debug_, Timestamp::elapsed(), LoadControl::errorString(), Syslog::FAULT, FailureMode::HARDWARE, LoadControl::hasError(), Syslog::INFO, loadControl_, Component::logger_, poTimeout_, LoadControl::readFaults(), Component::setFailure(), Component::simulateHardware(), startTime_, Component::STOPPED, Component::STOPPING, and Logger::syslog().
|
private |
References deviceResponse_, UartStream::errorString(), UartStream::flush(), UartStream::hasError(), Syslog::INFO, Component::logger_, UartStream::readLine(), Component::simulateHardware(), Logger::syslog(), and uart_.
Referenced by getCompassHdg(), getPitchRoll(), getTrueHdg(), readAccelVec(), readMagnetics(), readTransducers(), and setCalMode().
|
virtual |
Provide a space for uninitialization.
Reimplemented from Component.
References UartStream::close(), debug_, Syslog::FAULT, FailureMode::HARDWARE, Syslog::INFO, LoadControl::isolateLoad(), loadControl_, Component::logger_, Component::setFailure(), Component::simulateHardware(), Logger::syslog(), and uart_.
Referenced by stop().
|
private |
Referenced by AHRS_sp3003D(), isDataRequested(), and runnable().
|
private |
Referenced by AHRS_sp3003D(), isDataRequested(), and runnable().
|
private |
Referenced by AHRS_sp3003D(), and runnable().
|
private |
Referenced by AHRS_sp3003D(), and runnable().
|
private |
If true, bail out of calibration mode and restart.
Referenced by runnable(), and setCalMode().
|
private |
The current mode the behavior is in.
Referenced by runnable(), and setCalMode().
|
private |
Referenced by AHRS_sp3003D(), isDataRequested(), and runnable().
|
private |
Referenced by AHRS_sp3003D(), and runnable().
|
private |
Referenced by start(), and starting().
|
private |
Referenced by runnable().
|
private |
Referenced by pause(), paused(), resume(), resuming(), runnable(), start(), starting(), stop(), stopped(), stopping(), and uninitialize().
|
private |
Referenced by AHRS_sp3003D(), and setCalMode().
|
private |
|
staticprivate |
Pointer to the singleton-like instance of this component.
Referenced by AHRS_sp3003D(), SetCalMode(), and ~AHRS_sp3003D().
|
private |
Referenced by AHRS_sp3003D(), runnable(), and setCalMode().
|
private |
Referenced by pause(), resume(), runnable(), start(), stopped(), stopping(), and uninitialize().
|
private |
Referenced by AHRS_sp3003D(), runnable(), and setCalMode().
|
private |
Deviation of this compass in the vehicle.
compass orientation +/- deviation due to vehicle = Magnetic orientation magnetic orientation +/- variation from map = True orientation
Referenced by getTrueHdg(), readConfig(), and runnable().
|
private |
Referenced by AHRS_sp3003D(), and readConfig().
|
private |
Referenced by AHRS_sp3003D(), isDataRequested(), runnable(), and setWritersInvalid().
|
private |
Referenced by runnable(), and starting().
|
private |
Referenced by AHRS_sp3003D(), isDataRequested(), and runnable().
|
private |
Referenced by AHRS_sp3003D(), isDataRequested(), and runnable().
|
private |
Referenced by AHRS_sp3003D(), and runnable().
|
private |
Referenced by AHRS_sp3003D(), and runnable().
|
private |
Offset for mounting. In degrees.
Referenced by readConfig(), and runnable().
|
private |
Referenced by AHRS_sp3003D(), and readConfig().
|
private |
Referenced by AHRS_sp3003D(), isDataRequested(), runnable(), and setWritersInvalid().
|
private |
Referenced by starting(), and stopping().
|
private |
Referenced by readConfig(), resuming(), runnable(), and starting().
|
private |
Referenced by AHRS_sp3003D(), and readConfig().
|
private |
Referenced by readConfig(), resuming(), runnable(), and starting().
|
private |
Referenced by AHRS_sp3003D(), and readConfig().
|
private |
Referenced by readConfig(), and starting().
|
private |
Referenced by AHRS_sp3003D(), and readConfig().
|
private |
Referenced by readConfig(), and runnable().
|
private |
Referenced by AHRS_sp3003D(), and readConfig().
|
private |
Referenced by AHRS_sp3003D(), isDataRequested(), runnable(), and setWritersInvalid().
|
private |
Referenced by runnable().
|
private |
Referenced by AHRS_sp3003D(), isDataRequested(), runnable(), and setWritersInvalid().
|
private |
Referenced by start(), starting(), stop(), and stopping().
|
private |
Referenced by AHRS_sp3003D(), isDataRequested(), runnable(), and setWritersInvalid().
|
private |
Referenced by getCompassHdg(), pause(), readAccelVecBin(), readMagneticsBin(), receiveHeadingMagBin(), receivePitchRollBin(), receiveTransducers(), requestHeadingMagBin(), requestPitchRollBin(), requestTransducers(), resume(), setMountVertical(), start(), stopped(), tryUartComms(), and uninitialize().
|
private |
Referenced by starting().
|
private |
Referenced by runnable().