AMS Advanced Air Mobility Sensors UG
|
The class that describes and implements the BAHRS serial protocol. More...
Classes | |
struct | SAccuracyData |
Accuracy message payload. More... | |
struct | SAccuracyDataMessage |
Navigation data accuracy message. More... | |
struct | SInertialData |
Inertial data message payload. More... | |
struct | SInertialDataMessage |
Inertial data message. More... | |
struct | SMessageHeader |
Message header struct. More... | |
struct | SNavigationData |
Navigation data message payload. More... | |
struct | SNavigationDataMessage |
Navigation data message. More... | |
struct | SPacketNVMPage |
Diagnostic message: One NVM page ( both: RX & TX ) More... | |
struct | SPacketReadNVMPage |
Diagnostic Mode Messages. More... | |
struct | SPacketReceiveConfirmation |
Diagnostic message: confirmation of request processing by the device. More... | |
struct | SRunnableCallEventData |
Debug information on runnable call. More... | |
struct | SRunnableCallEventDebugMessage |
A debug message with runnable call data. More... | |
struct | SSoftwareVersionData |
Payload of the "software version" message. More... | |
struct | SSoftwareVersionMessage |
Software version message. More... | |
struct | STimeOfInertialData |
Payload of the time of inertial data message. More... | |
struct | STimeOfInertialDataMessage |
Time of inertial data message. More... | |
struct | STimeOfLatestSyncPulse |
Payload of the "time of the latest pulse" message. More... | |
struct | STimeOfLatestSyncPulseMessage |
Time of the latest sync pulse message. More... | |
struct | STimeOfNavigationData |
Payload of the "time of navigation data" message. More... | |
struct | STimeOfNavigationDataMessage |
Time of navigation data message. More... | |
struct | SWriteToPortEventPartialData |
Partial data of the "write to port event". The struct does not include a variable size array of data written to a port. More... | |
Public Types | |
enum class | EMessageIds : uint8_t { eInvalid = 0x00 , eInertialData = 0x01 , eNavigationData = 0x02 , eAccuracy = 0x03 , eTimeOfNavigationData = 0x04 , eTimeOfInertialData = 0x05 , eTimeOfSyncPulse = 0x06 , eSoftwareVersion = 0x0F , eDebugEventWriteToPort = 0xC0 , eDebugEventRunnableCall = 0xC1 , eTypeOpenDiagnostic = 0xF0 , eTypeCloseDiagnostic = 0xF1 , eTypeReadNVMPage = 0xF2 , eTypeNVMPageData = 0xF3 , eTypeAccept = 0xFF } |
typedef uint32_t | CrcType_t |
Public Member Functions | |
CSerialProtocol ()=default | |
~CSerialProtocol ()=default | |
SInertialDataMessage | BuildInertialDataMessage (const SOutputImuData &korImuData) |
Build inertial data message from IMU measurements. | |
STimeOfInertialDataMessage | BuildTimeOfInertialDataMessage (const SOutputImuData &korImuData) |
Build the "Time of inertial data message" from IMU measurements. | |
SNavigationDataMessage | BuildNavigationDataMessage (const SVerticalChannelData &korVerticalChannelData, const SAttitudeData &korVehicleAttitude, const SMagneticHeading &korMagneticHeading) |
Build navigation data message. | |
STimeOfNavigationDataMessage | BuildTimeOfNavigationDataMessage (const SAttitudeData &korVehicleAttitude) |
Build time of navigation data message. | |
SAccuracyDataMessage | BuildAccuracyDataMessage (const SAttitudeData &korVehicleAttitude) |
Build navigation data accuracy message. | |
STimeOfLatestSyncPulseMessage | BuildTimeOfLatestSyncPulseMessage (uint64_t uTimestamp) |
Build time of the latest sync pulse message. | |
SSoftwareVersionMessage | BuildSoftwareVersionMessage () |
Build the software version message. | |
Static Public Member Functions | |
static uint32_t | CalculateCrc (uint32_t *pData, uint32_t uNumberOfWords_) |
Calculate CRC. | |
Static Public Attributes | |
static constexpr uint8_t | uMarker1_ { 0x4E } |
Sync byte 1, symbol 'N'. | |
static constexpr uint8_t | uMarker2_ { 0x45 } |
Sync char 2, symbol 'E'. | |
static constexpr uint16_t | uVersion_ { 2U } |
Protocol version. | |
static constexpr float | skfMaxHeight_ { 10000.0F } |
static constexpr float | skfMinHeight_ { -1000.0F } |
static constexpr float | skfMaxVelocityDown_ { 300.0F } |
static constexpr float | skfMinVelocityDown_ { -300.0F } |
static constexpr float | skfMaxAngularRate_ { 300.0F * (CMathConstants::skfPi_ / 180.0F) } |
+-300 [deg/s] in [rad/s] | |
static constexpr float | skfMaxSpecificForce_ { CGeoConstants::skfGravity * 5.0F } |
+-5 [g] in [m/s^2] | |
static constexpr float | skfSpecificForceScale_ { skfMaxSpecificForce_ / static_cast<float>(std::numeric_limits<int16_t>::max() - 1) } |
Integer to float, +-5g range. | |
static constexpr float | skfAngularRateScale_ { skfMaxAngularRate_ / static_cast<float>(std::numeric_limits<int16_t>::max() - 1) } |
Integer to float, +-300 deg/s range. | |
static constexpr float | skfHeightScale_ { 0.16784924F } |
Integer to float, -1000 to 10000 m range. | |
static constexpr float | skfHeighOffset_ { 1000.0F } |
An offset to convert unsigned integer to float. | |
static constexpr float | skfVelocityDownScale_ { 9.155413e-3F } |
Integer to float, -300 to 300 m/s range. | |
static constexpr float | skfAngleScale_ { 9.587526e-5F } |
Integer to float, -pi to pi or 0 to 2 pi range. | |
The class that describes and implements the BAHRS serial protocol.
typedef uint32_t CSerialProtocol::CrcType_t |
|
strong |
|
default |
|
default |
CSerialProtocol::SAccuracyDataMessage CSerialProtocol::BuildAccuracyDataMessage | ( | const SAttitudeData & | korVehicleAttitude | ) |
Build navigation data accuracy message.
korVehicleAttitude | Reference to vehicle attitude data. |
CSerialProtocol::SInertialDataMessage CSerialProtocol::BuildInertialDataMessage | ( | const SOutputImuData & | korImuData | ) |
Build inertial data message from IMU measurements.
korImuData | Reference to IMU data. |
CSerialProtocol::SNavigationDataMessage CSerialProtocol::BuildNavigationDataMessage | ( | const SVerticalChannelData & | korVerticalChannelData, |
const SAttitudeData & | korVehicleAttitude, | ||
const SMagneticHeading & | korMagneticHeading | ||
) |
Build navigation data message.
korVerticalChannelData | Reference to vertical channel data. |
korVehicleAttitude | Reference to vehicle attitude data. |
korMagneticHeading | Reference to the estimated magnetic heading data compensated for installation alignment |
CSerialProtocol::SSoftwareVersionMessage CSerialProtocol::BuildSoftwareVersionMessage | ( | ) |
Build the software version message.
CSerialProtocol::STimeOfInertialDataMessage CSerialProtocol::BuildTimeOfInertialDataMessage | ( | const SOutputImuData & | korImuData | ) |
Build the "Time of inertial data message" from IMU measurements.
korImuData | Reference to IMU measurement. |
CSerialProtocol::STimeOfLatestSyncPulseMessage CSerialProtocol::BuildTimeOfLatestSyncPulseMessage | ( | uint64_t | uTimestamp | ) |
Build time of the latest sync pulse message.
uTimestamp | Measured time of the latest sync pulse. |
CSerialProtocol::STimeOfNavigationDataMessage CSerialProtocol::BuildTimeOfNavigationDataMessage | ( | const SAttitudeData & | korVehicleAttitude | ) |
Build time of navigation data message.
korVehicleAttitude | Reference to vehicle attitude data. |
|
static |
Calculate CRC.
pData | Pointer to 32-bit data words aarray. |
uNumberOfWords_ | Number of words in the array. |
|
staticconstexpr |
Integer to float, -pi to pi or 0 to 2 pi range.
|
staticconstexpr |
Integer to float, +-300 deg/s range.
|
staticconstexpr |
An offset to convert unsigned integer to float.
|
staticconstexpr |
Integer to float, -1000 to 10000 m range.
|
staticconstexpr |
+-300 [deg/s] in [rad/s]
|
staticconstexpr |
|
staticconstexpr |
+-5 [g] in [m/s^2]
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
Integer to float, +-5g range.
|
staticconstexpr |
Integer to float, -300 to 300 m/s range.
|
staticconstexpr |
Sync byte 1, symbol 'N'.
|
staticconstexpr |
Sync char 2, symbol 'E'.
|
staticconstexpr |
Protocol version.