#include <ncom_packet.H>
Public Types | |
enum | nav_status_t { NAV_STATUS_INVALID, NAV_STATUS_RAW_IMU, NAV_STATUS_INTIALIZING, NAV_STATUS_LOCKING, NAV_STATUS_LOCKED } |
Public Member Functions | |
packet_t () | |
packet_t (packet_t const *packet) | |
unsigned | decode (unsigned char const *buf, unsigned buf_size) |
bool | valid (void) const |
unsigned | stx (void) const |
double | time (void) const |
double | x_acceleration (void) const |
double | y_acceleration (void) const |
double | z_acceleration (void) const |
double | x_angular_rate (void) const |
double | y_angular_rate (void) const |
double | z_angular_rate (void) const |
nav_status_t | nav_status (void) const |
unsigned | checksum_1 (void) const |
double | latitude (void) const |
double | longitude (void) const |
double | altitude (void) const |
double | n_velocity (void) const |
double | e_velocity (void) const |
double | d_velocity (void) const |
double | heading (void) const |
double | pitch (void) const |
double | roll (void) const |
unsigned | checksum_2 (void) const |
unsigned | channel (void) const |
unsigned char const * | channel_data (void) const |
unsigned | checksum_3 (void) const |
Static Public Attributes | |
static unsigned const | STX = 0xE7 |
Static Protected Member Functions | |
static unsigned | calc_crc (unsigned char const *data, unsigned size) |
static unsigned | skip_to_stx (unsigned char const *data, unsigned size) |
Protected Attributes | |
bool | m_valid |
unsigned char const * | m_data |
Static Protected Attributes | |
static unsigned const | PACKET_SIZE = 72 |
static unsigned const | STX_OFFSET = 0 |
static unsigned const | TIME_OFFSET = 1 |
static unsigned const | X_ACCELERATION_OFFSET = 3 |
static unsigned const | Y_ACCELERATION_OFFSET = 6 |
static unsigned const | Z_ACCELERATION_OFFSET = 9 |
static unsigned const | X_ANGULAR_RATE_OFFSET = 12 |
static unsigned const | Y_ANGULAR_RATE_OFFSET = 15 |
static unsigned const | Z_ANGULAR_RATE_OFFSET = 18 |
static unsigned const | NAV_STATUS_OFFSET = 21 |
static unsigned const | CHECKSUM_1_OFFSET = 22 |
static unsigned const | LATITUDE_OFFSET = 23 |
static unsigned const | LONGITUDE_OFFSET = 31 |
static unsigned const | ALTITUDE_OFFSET = 39 |
static unsigned const | N_VELOCITY_OFFSET = 43 |
static unsigned const | E_VELOCITY_OFFSET = 46 |
static unsigned const | D_VELOCITY_OFFSET = 49 |
static unsigned const | HEADING_OFFSET = 52 |
static unsigned const | PITCH_OFFSET = 55 |
static unsigned const | ROLL_OFFSET = 58 |
static unsigned const | CHECKSUM_2_OFFSET = 61 |
static unsigned const | CHANNEL_OFFSET = 62 |
static unsigned const | CHANNEL_DATA_OFFSET = 63 |
static unsigned const | CHECKSUM_3_OFFSET = 71 |
packet_t::packet_t | ( | ) |
packet_t::packet_t | ( | packet_t const * | packet | ) |
double ncom::packet_t::altitude | ( | void | ) | const [inline] |
References ALTITUDE_OFFSET, and m_data.
Referenced by cajun::rt3k_udp_t::decode_packet(), and packet_printer().
unsigned packet_t::calc_crc | ( | unsigned char const * | data, | |
unsigned | size | |||
) | [static, protected] |
Referenced by decode().
unsigned ncom::packet_t::channel | ( | void | ) | const [inline] |
unsigned char const* ncom::packet_t::channel_data | ( | void | ) | const [inline] |
References CHANNEL_DATA_OFFSET, and m_data.
unsigned ncom::packet_t::checksum_1 | ( | void | ) | const [inline] |
References CHECKSUM_1_OFFSET, and m_data.
unsigned ncom::packet_t::checksum_2 | ( | void | ) | const [inline] |
References CHECKSUM_2_OFFSET, and m_data.
unsigned ncom::packet_t::checksum_3 | ( | void | ) | const [inline] |
References CHECKSUM_3_OFFSET, and m_data.
Referenced by decode().
double ncom::packet_t::d_velocity | ( | void | ) | const [inline] |
References D_VELOCITY_OFFSET, and m_data.
Referenced by packet_printer().
unsigned packet_t::decode | ( | unsigned char const * | buf, | |
unsigned | buf_size | |||
) |
References calc_crc(), checksum_3(), m_data, m_valid, PACKET_SIZE, skip_to_stx(), and STX.
Referenced by cajun::rt3k_udp_t::handle_input(), and main().
double ncom::packet_t::e_velocity | ( | void | ) | const [inline] |
References E_VELOCITY_OFFSET, and m_data.
Referenced by cajun::rt3k_udp_t::decode_packet(), and packet_printer().
double ncom::packet_t::heading | ( | void | ) | const [inline] |
References HEADING_OFFSET, and m_data.
Referenced by cajun::rt3k_udp_t::decode_packet(), and packet_printer().
double ncom::packet_t::latitude | ( | void | ) | const [inline] |
References LATITUDE_OFFSET, and m_data.
Referenced by cajun::rt3k_udp_t::decode_packet(), and packet_printer().
double ncom::packet_t::longitude | ( | void | ) | const [inline] |
References LONGITUDE_OFFSET, and m_data.
Referenced by cajun::rt3k_udp_t::decode_packet(), and packet_printer().
double ncom::packet_t::n_velocity | ( | void | ) | const [inline] |
References m_data, and N_VELOCITY_OFFSET.
Referenced by cajun::rt3k_udp_t::decode_packet(), and packet_printer().
nav_status_t ncom::packet_t::nav_status | ( | void | ) | const [inline] |
References m_data, and NAV_STATUS_OFFSET.
Referenced by cajun::rt3k_udp_t::decode_packet(), and packet_printer().
double ncom::packet_t::pitch | ( | void | ) | const [inline] |
References m_data, and PITCH_OFFSET.
Referenced by cajun::rt3k_udp_t::decode_packet(), and packet_printer().
double ncom::packet_t::roll | ( | void | ) | const [inline] |
References m_data, and ROLL_OFFSET.
Referenced by cajun::rt3k_udp_t::decode_packet(), and packet_printer().
unsigned packet_t::skip_to_stx | ( | unsigned char const * | data, | |
unsigned | size | |||
) | [static, protected] |
unsigned ncom::packet_t::stx | ( | void | ) | const [inline] |
References m_data, and STX_OFFSET.
Referenced by skip_to_stx().
double ncom::packet_t::time | ( | void | ) | const [inline] |
References m_data, and TIME_OFFSET.
Referenced by cajun::rt3k_udp_t::decode_packet(), and packet_printer().
bool ncom::packet_t::valid | ( | void | ) | const [inline] |
References m_valid.
Referenced by ncom::channel_t::channel_t(), cajun::rt3k_udp_t::handle_input(), and main().
double ncom::packet_t::x_acceleration | ( | void | ) | const [inline] |
References m_data, and X_ACCELERATION_OFFSET.
Referenced by cajun::rt3k_udp_t::decode_packet(), and packet_printer().
double ncom::packet_t::x_angular_rate | ( | void | ) | const [inline] |
References m_data, and X_ANGULAR_RATE_OFFSET.
Referenced by cajun::rt3k_udp_t::decode_packet(), and packet_printer().
double ncom::packet_t::y_acceleration | ( | void | ) | const [inline] |
References m_data, and Y_ACCELERATION_OFFSET.
Referenced by cajun::rt3k_udp_t::decode_packet(), and packet_printer().
double ncom::packet_t::y_angular_rate | ( | void | ) | const [inline] |
References m_data, and Y_ANGULAR_RATE_OFFSET.
Referenced by cajun::rt3k_udp_t::decode_packet(), and packet_printer().
double ncom::packet_t::z_acceleration | ( | void | ) | const [inline] |
References m_data, and Z_ACCELERATION_OFFSET.
Referenced by cajun::rt3k_udp_t::decode_packet(), and packet_printer().
double ncom::packet_t::z_angular_rate | ( | void | ) | const [inline] |
References m_data, and Z_ANGULAR_RATE_OFFSET.
Referenced by cajun::rt3k_udp_t::decode_packet(), and packet_printer().
unsigned const ncom::packet_t::ALTITUDE_OFFSET = 39 [static, protected] |
Referenced by altitude().
unsigned const ncom::packet_t::CHANNEL_DATA_OFFSET = 63 [static, protected] |
Referenced by channel_data().
unsigned const ncom::packet_t::CHANNEL_OFFSET = 62 [static, protected] |
Referenced by channel().
unsigned const ncom::packet_t::CHECKSUM_1_OFFSET = 22 [static, protected] |
Referenced by checksum_1().
unsigned const ncom::packet_t::CHECKSUM_2_OFFSET = 61 [static, protected] |
Referenced by checksum_2().
unsigned const ncom::packet_t::CHECKSUM_3_OFFSET = 71 [static, protected] |
Referenced by checksum_3().
unsigned const ncom::packet_t::D_VELOCITY_OFFSET = 49 [static, protected] |
Referenced by d_velocity().
unsigned const ncom::packet_t::E_VELOCITY_OFFSET = 46 [static, protected] |
Referenced by e_velocity().
unsigned const ncom::packet_t::HEADING_OFFSET = 52 [static, protected] |
Referenced by heading().
unsigned const ncom::packet_t::LATITUDE_OFFSET = 23 [static, protected] |
Referenced by latitude().
unsigned const ncom::packet_t::LONGITUDE_OFFSET = 31 [static, protected] |
Referenced by longitude().
unsigned char const* ncom::packet_t::m_data [protected] |
Referenced by altitude(), channel(), channel_data(), checksum_1(), checksum_2(), checksum_3(), d_velocity(), decode(), e_velocity(), heading(), latitude(), longitude(), n_velocity(), nav_status(), pitch(), roll(), stx(), time(), x_acceleration(), x_angular_rate(), y_acceleration(), y_angular_rate(), z_acceleration(), and z_angular_rate().
bool ncom::packet_t::m_valid [protected] |
unsigned const ncom::packet_t::N_VELOCITY_OFFSET = 43 [static, protected] |
Referenced by n_velocity().
unsigned const ncom::packet_t::NAV_STATUS_OFFSET = 21 [static, protected] |
Referenced by nav_status().
unsigned const ncom::packet_t::PACKET_SIZE = 72 [static, protected] |
Referenced by decode().
unsigned const ncom::packet_t::PITCH_OFFSET = 55 [static, protected] |
Referenced by pitch().
unsigned const ncom::packet_t::ROLL_OFFSET = 58 [static, protected] |
Referenced by roll().
unsigned const ncom::packet_t::STX = 0xE7 [static] |
Referenced by decode(), and skip_to_stx().
unsigned const ncom::packet_t::STX_OFFSET = 0 [static, protected] |
Referenced by stx().
unsigned const ncom::packet_t::TIME_OFFSET = 1 [static, protected] |
Referenced by time().
unsigned const ncom::packet_t::X_ACCELERATION_OFFSET = 3 [static, protected] |
Referenced by x_acceleration().
unsigned const ncom::packet_t::X_ANGULAR_RATE_OFFSET = 12 [static, protected] |
Referenced by x_angular_rate().
unsigned const ncom::packet_t::Y_ACCELERATION_OFFSET = 6 [static, protected] |
Referenced by y_acceleration().
unsigned const ncom::packet_t::Y_ANGULAR_RATE_OFFSET = 15 [static, protected] |
Referenced by y_angular_rate().
unsigned const ncom::packet_t::Z_ACCELERATION_OFFSET = 9 [static, protected] |
Referenced by z_acceleration().
unsigned const ncom::packet_t::Z_ANGULAR_RATE_OFFSET = 18 [static, protected] |
Referenced by z_angular_rate().