Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions c/include/libsbp/cpp/message_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -3199,6 +3199,36 @@ struct MessageTraits<sbp_msg_iono_t> {
}
};

template <>
struct MessageTraits<sbp_msg_itrf_t> {
static constexpr sbp_msg_type_t id = SbpMsgItrf;
static const sbp_msg_itrf_t &get(const sbp_msg_t &msg) { return msg.itrf; }
static sbp_msg_itrf_t &get(sbp_msg_t &msg) { return msg.itrf; }
static void to_sbp_msg(const sbp_msg_itrf_t &msg, sbp_msg_t *sbp_msg) {
sbp_msg->itrf = msg;
}
static sbp_msg_t to_sbp_msg(const sbp_msg_itrf_t &msg) {
sbp_msg_t sbp_msg;
sbp_msg.itrf = msg;
return sbp_msg;
}
static s8 send(sbp_state_t *state, u16 sender_id, const sbp_msg_itrf_t &msg,
sbp_write_fn_t write) {
return sbp_msg_itrf_send(state, sender_id, &msg, write);
}
static s8 encode(uint8_t *buf, uint8_t len, uint8_t *n_written,
const sbp_msg_itrf_t &msg) {
return sbp_msg_itrf_encode(buf, len, n_written, &msg);
}
static s8 decode(const uint8_t *buf, uint8_t len, uint8_t *n_read,
sbp_msg_itrf_t *msg) {
return sbp_msg_itrf_decode(buf, len, n_read, msg);
}
static size_t encoded_len(const sbp_msg_itrf_t &msg) {
return sbp_msg_itrf_encoded_len(&msg);
}
};

template <>
struct MessageTraits<sbp_msg_linux_cpu_state_dep_a_t> {
static constexpr sbp_msg_type_t id = SbpMsgLinuxCpuStateDepA;
Expand Down
6 changes: 6 additions & 0 deletions c/include/libsbp/legacy/cpp/message_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,12 @@ struct MessageTraits<msg_vel_ecef_cov_gnss_t> {
};


template<>
struct MessageTraits<msg_itrf_t> {
static constexpr u16 id = 580;
};


template<>
struct MessageTraits<msg_ndb_event_t> {
static constexpr u16 id = 1024;
Expand Down
33 changes: 33 additions & 0 deletions c/include/libsbp/legacy/navigation.h
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,39 @@ typedef struct SBP_ATTR_PACKED {
u32 flags; /**< Status flags */
} msg_protection_level_t;

typedef struct SBP_ATTR_PACKED {
u8 ssr_iod; /**< SSR IOD parameter. */
u8 sn_counter_n; /**< Source-Name Counter N. */
char sn[31]; /**< Source-Name */
u8 tn_counter_m; /**< Target-Name Counter M. */
char tn[31]; /**< Target-Name */
u8 sin; /**< System Identification Number. */
u16 utn; /**< Utilized Transformation Message. */
u16 re_t0; /**< Reference Epoch t0 for transformation parameter
set given as Modified Julian Day (MDJ) Number
minus 44244 days. [1 day] */
s32 delta_X0; /**< Translation in X for Reference Epoch t0. [0.001 m] */
s32 delta_Y0; /**< Translation in Y for Reference Epoch t0. [0.001 m] */
s32 delta_Z0; /**< Translation in Z for Reference Epoch t0. [0.001 m] */
s32 theta_01; /**< Rotation around the X-axis for Reference Epoch t0. [0.00002
"] */
s32 theta_02; /**< Rotation around the Y-axis for Reference Epoch t0. [0.00002
"] */
s32 theta_03; /**< Rotation around the Z-axis for Reference Epoch t0. [0.00002
"] */
s32 scale; /**< Scale correction for Reference Epoch t0. [0.00001 ppm] */
s32 dot_delta_X0; /**< Rate of change of translation in X. [0.00002 m/yr] */
s32 dot_delta_Y0; /**< Rate of change of translation in Y. [0.00002 m/yr] */
s32 dot_delta_Z0; /**< Rate of change of translation in Z. [0.00002 m/yr] */
s32 dot_theta_01; /**< Rate of change of rotation around the X-axis.
[0.0000004 "/yr] */
s32 dot_theta_02; /**< Rate of change of rotation around the Y-axis.
[0.0000004 "/yr] */
s32 dot_theta_03; /**< Rate of change of rotation around the Z-axis.
[0.0000004 "/yr] */
s16 dot_scale; /**< Rate of change of scale correction. [0.0000002 ppm/yr] */
} msg_itrf_t;

/** \} */

SBP_PACK_END
Expand Down
21 changes: 21 additions & 0 deletions c/include/libsbp/navigation_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -1736,4 +1736,25 @@
*/
#define SBP_MSG_PROTECTION_LEVEL_ENCODED_LEN 76u

#define SBP_MSG_ITRF 0x0244
/**
* The maximum number of items that can be stored in sbp_msg_itrf_t::sn (V4 API)
* or msg_itrf_t::sn (legacy API) before the maximum SBP message size is
* exceeded
*/
#define SBP_MSG_ITRF_SN_MAX 31u

/**
* The maximum number of items that can be stored in sbp_msg_itrf_t::tn (V4 API)
* or msg_itrf_t::tn (legacy API) before the maximum SBP message size is
* exceeded
*/
#define SBP_MSG_ITRF_TN_MAX 31u

/**
* Encoded length of sbp_msg_itrf_t (V4 API) and
* msg_itrf_t (legacy API)
*/
#define SBP_MSG_ITRF_ENCODED_LEN 124u

#endif /* LIBSBP_NAVIGATION_MACROS_H */
1 change: 1 addition & 0 deletions c/include/libsbp/sbp_msg_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ typedef enum {
SbpMsgInsStatus = SBP_MSG_INS_STATUS,
SbpMsgInsUpdates = SBP_MSG_INS_UPDATES,
SbpMsgIono = SBP_MSG_IONO,
SbpMsgItrf = SBP_MSG_ITRF,
SbpMsgLinuxCpuStateDepA = SBP_MSG_LINUX_CPU_STATE_DEP_A,
SbpMsgLinuxCpuState = SBP_MSG_LINUX_CPU_STATE,
SbpMsgLinuxMemStateDepA = SBP_MSG_LINUX_MEM_STATE_DEP_A,
Expand Down
1 change: 1 addition & 0 deletions c/include/libsbp/v4/navigation.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <libsbp/v4/navigation/MSG_GPS_TIME.h>
#include <libsbp/v4/navigation/MSG_GPS_TIME_DEP_A.h>
#include <libsbp/v4/navigation/MSG_GPS_TIME_GNSS.h>
#include <libsbp/v4/navigation/MSG_ITRF.h>
#include <libsbp/v4/navigation/MSG_POS_ECEF.h>
#include <libsbp/v4/navigation/MSG_POS_ECEF_COV.h>
#include <libsbp/v4/navigation/MSG_POS_ECEF_COV_GNSS.h>
Expand Down
Loading