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
2 changes: 1 addition & 1 deletion c/include/libsbp/acquisition.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ SBP_MESSAGE(

#include <libsbp/legacy/acquisition.h>

#endif /* LIBSBP_ACQUISITION_MESSAGES_H */
#endif /* LIBSBP_ACQUISITION_MESSAGES_H */
2 changes: 1 addition & 1 deletion c/include/libsbp/bootload.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ SBP_MESSAGE(

#include <libsbp/legacy/bootload.h>

#endif /* LIBSBP_BOOTLOAD_MESSAGES_H */
#endif /* LIBSBP_BOOTLOAD_MESSAGES_H */
136 changes: 71 additions & 65 deletions c/include/libsbp/cpp/message_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -2688,41 +2688,6 @@ struct MessageTraits<sbp_msg_gnss_time_offset_t> {
}
};

template <>
struct MessageTraits<sbp_msg_gps_leap_second_t> {
static constexpr sbp_msg_type_t id = SbpMsgGpsLeapSecond;
static const sbp_msg_gps_leap_second_t &get(const sbp_msg_t &msg) {
return msg.gps_leap_second;
}
static sbp_msg_gps_leap_second_t &get(sbp_msg_t &msg) {
return msg.gps_leap_second;
}
static void to_sbp_msg(const sbp_msg_gps_leap_second_t &msg,
sbp_msg_t *sbp_msg) {
sbp_msg->gps_leap_second = msg;
}
static sbp_msg_t to_sbp_msg(const sbp_msg_gps_leap_second_t &msg) {
sbp_msg_t sbp_msg;
sbp_msg.gps_leap_second = msg;
return sbp_msg;
}
static s8 send(sbp_state_t *state, u16 sender_id,
const sbp_msg_gps_leap_second_t &msg, sbp_write_fn_t write) {
return sbp_msg_gps_leap_second_send(state, sender_id, &msg, write);
}
static s8 encode(uint8_t *buf, uint8_t len, uint8_t *n_written,
const sbp_msg_gps_leap_second_t &msg) {
return sbp_msg_gps_leap_second_encode(buf, len, n_written, &msg);
}
static s8 decode(const uint8_t *buf, uint8_t len, uint8_t *n_read,
sbp_msg_gps_leap_second_t *msg) {
return sbp_msg_gps_leap_second_decode(buf, len, n_read, msg);
}
static size_t encoded_len(const sbp_msg_gps_leap_second_t &msg) {
return sbp_msg_gps_leap_second_encoded_len(&msg);
}
};

template <>
struct MessageTraits<sbp_msg_gps_time_dep_a_t> {
static constexpr sbp_msg_type_t id = SbpMsgGpsTimeDepA;
Expand Down Expand Up @@ -3234,36 +3199,6 @@ 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 Expand Up @@ -4920,6 +4855,42 @@ struct MessageTraits<sbp_msg_protection_level_t> {
}
};

template <>
struct MessageTraits<sbp_msg_reference_frame_param_t> {
static constexpr sbp_msg_type_t id = SbpMsgReferenceFrameParam;
static const sbp_msg_reference_frame_param_t &get(const sbp_msg_t &msg) {
return msg.reference_frame_param;
}
static sbp_msg_reference_frame_param_t &get(sbp_msg_t &msg) {
return msg.reference_frame_param;
}
static void to_sbp_msg(const sbp_msg_reference_frame_param_t &msg,
sbp_msg_t *sbp_msg) {
sbp_msg->reference_frame_param = msg;
}
static sbp_msg_t to_sbp_msg(const sbp_msg_reference_frame_param_t &msg) {
sbp_msg_t sbp_msg;
sbp_msg.reference_frame_param = msg;
return sbp_msg;
}
static s8 send(sbp_state_t *state, u16 sender_id,
const sbp_msg_reference_frame_param_t &msg,
sbp_write_fn_t write) {
return sbp_msg_reference_frame_param_send(state, sender_id, &msg, write);
}
static s8 encode(uint8_t *buf, uint8_t len, uint8_t *n_written,
const sbp_msg_reference_frame_param_t &msg) {
return sbp_msg_reference_frame_param_encode(buf, len, n_written, &msg);
}
static s8 decode(const uint8_t *buf, uint8_t len, uint8_t *n_read,
sbp_msg_reference_frame_param_t *msg) {
return sbp_msg_reference_frame_param_decode(buf, len, n_read, msg);
}
static size_t encoded_len(const sbp_msg_reference_frame_param_t &msg) {
return sbp_msg_reference_frame_param_encoded_len(&msg);
}
};

template <>
struct MessageTraits<sbp_msg_reset_dep_t> {
static constexpr sbp_msg_type_t id = SbpMsgResetDep;
Expand Down Expand Up @@ -7247,6 +7218,41 @@ struct MessageTraits<sbp_msg_user_data_t> {
}
};

template <>
struct MessageTraits<sbp_msg_utc_leap_second_t> {
static constexpr sbp_msg_type_t id = SbpMsgUtcLeapSecond;
static const sbp_msg_utc_leap_second_t &get(const sbp_msg_t &msg) {
return msg.utc_leap_second;
}
static sbp_msg_utc_leap_second_t &get(sbp_msg_t &msg) {
return msg.utc_leap_second;
}
static void to_sbp_msg(const sbp_msg_utc_leap_second_t &msg,
sbp_msg_t *sbp_msg) {
sbp_msg->utc_leap_second = msg;
}
static sbp_msg_t to_sbp_msg(const sbp_msg_utc_leap_second_t &msg) {
sbp_msg_t sbp_msg;
sbp_msg.utc_leap_second = msg;
return sbp_msg;
}
static s8 send(sbp_state_t *state, u16 sender_id,
const sbp_msg_utc_leap_second_t &msg, sbp_write_fn_t write) {
return sbp_msg_utc_leap_second_send(state, sender_id, &msg, write);
}
static s8 encode(uint8_t *buf, uint8_t len, uint8_t *n_written,
const sbp_msg_utc_leap_second_t &msg) {
return sbp_msg_utc_leap_second_encode(buf, len, n_written, &msg);
}
static s8 decode(const uint8_t *buf, uint8_t len, uint8_t *n_read,
sbp_msg_utc_leap_second_t *msg) {
return sbp_msg_utc_leap_second_decode(buf, len, n_read, msg);
}
static size_t encoded_len(const sbp_msg_utc_leap_second_t &msg) {
return sbp_msg_utc_leap_second_encoded_len(&msg);
}
};

template <>
struct MessageTraits<sbp_msg_utc_time_gnss_t> {
static constexpr sbp_msg_type_t id = SbpMsgUtcTimeGnss;
Expand Down
2 changes: 1 addition & 1 deletion c/include/libsbp/ext_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ SBP_MESSAGE(

#include <libsbp/legacy/ext_events.h>

#endif /* LIBSBP_EXT_EVENTS_MESSAGES_H */
#endif /* LIBSBP_EXT_EVENTS_MESSAGES_H */
2 changes: 1 addition & 1 deletion c/include/libsbp/file_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ SBP_MESSAGE(

#include <libsbp/legacy/file_io.h>

#endif /* LIBSBP_FILE_IO_MESSAGES_H */
#endif /* LIBSBP_FILE_IO_MESSAGES_H */
2 changes: 1 addition & 1 deletion c/include/libsbp/flash.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ SBP_MESSAGE(

#include <libsbp/legacy/flash.h>

#endif /* LIBSBP_FLASH_MESSAGES_H */
#endif /* LIBSBP_FLASH_MESSAGES_H */
2 changes: 1 addition & 1 deletion c/include/libsbp/gnss.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ SBP_MESSAGE(

#include <libsbp/legacy/gnss.h>

#endif /* LIBSBP_GNSS_MESSAGES_H */
#endif /* LIBSBP_GNSS_MESSAGES_H */
2 changes: 1 addition & 1 deletion c/include/libsbp/imu.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ SBP_MESSAGE(

#include <libsbp/legacy/imu.h>

#endif /* LIBSBP_IMU_MESSAGES_H */
#endif /* LIBSBP_IMU_MESSAGES_H */
2 changes: 1 addition & 1 deletion c/include/libsbp/integrity.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ SBP_MESSAGE(

#include <libsbp/legacy/integrity.h>

#endif /* LIBSBP_INTEGRITY_MESSAGES_H */
#endif /* LIBSBP_INTEGRITY_MESSAGES_H */
4 changes: 2 additions & 2 deletions c/include/libsbp/legacy/cpp/message_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -914,13 +914,13 @@ struct MessageTraits<msg_vel_ecef_cov_gnss_t> {


template<>
struct MessageTraits<msg_gps_leap_second_t> {
struct MessageTraits<msg_utc_leap_second_t> {
static constexpr u16 id = 570;
};


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

Expand Down
34 changes: 17 additions & 17 deletions c/include/libsbp/legacy/navigation.h
Original file line number Diff line number Diff line change
Expand Up @@ -940,22 +940,22 @@ typedef struct SBP_ATTR_PACKED {
u16 ref_wn; /**< Leap second reference week number. [weeks] */
u8 ref_dn; /**< Leap second reference day number. [days] */
s8 count_after; /**< Leap second count after insertion. [s] */
} msg_gps_leap_second_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] */
} msg_utc_leap_second_t;

typedef struct SBP_ATTR_PACKED {
u8 ssr_iod; /**< SSR IOD parameter. */
char sn[32]; /**< Name of source coordinate-system using the EPSG
identification code. */
char tn[32]; /**< Name of target coordinate-system using the EPSG
identification code. */
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
Expand All @@ -973,7 +973,7 @@ typedef struct SBP_ATTR_PACKED {
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;
} msg_reference_frame_param_t;

/** \} */

Expand Down
43 changes: 24 additions & 19 deletions c/include/libsbp/legacy/ssr.h
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,9 @@ typedef struct SBP_ATTR_PACKED {
stec_residual_t stec_residual; /**< STEC residuals (mean, stddev) */
u8 stec_bound_mu; /**< Error Bound Mean. See Note 1. [m] */
u8 stec_bound_sig; /**< Error Bound StDev. See Note 1. [m] */
u8 stec_bound_mu_dot; /**< Error Bound Mean First derivative. Range:
0-0.01275 m/s [0.00005 m/s] */
u8 stec_bound_sig_dot; /**< Error Bound StDev First derivative. Range:
0-0.01275 m/s [0.00005 m/s] */
u8 stec_bound_mu_dot; /**< Error Bound Mean First derivative. [0.00005 m/s] */
u8 stec_bound_sig_dot; /**< Error Bound StDev First derivative. [0.00005 m/s]
*/
} stec_sat_element_integrity_t;

/** Gridded troposhere and STEC correction residuals bounds
Expand All @@ -335,9 +334,8 @@ typedef struct SBP_ATTR_PACKED {

typedef struct SBP_ATTR_PACKED {
bounds_header_t header; /**< Header of a bounds message. */
u8 ssr_iod_atmo; /**< IOD of the SSR atmospheric correction. */
u16 tile_set_id; /**< Unique identifier of the set this tile
belongs to. */
u8 ssr_iod_atmo; /**< IOD of the correction. */
u16 tile_set_id; /**< Set this tile belongs to. */
u16 tile_id; /**< Unique identifier of this tile in the
tile set. */
u8 tropo_qi; /**< Tropo Quality Indicator. Similar to RTCM
Expand All @@ -346,11 +344,13 @@ typedef struct SBP_ATTR_PACKED {
tropospheric_delay_correction_t tropo_delay_correction; /**< Tropospheric
delay at
grid point. */
u8 tropo_bound_mu; /**< Troposphere Error Bound Mean. Range:
0-1.275 m [0.005 m] */
u8 tropo_bound_sig; /**< Troposphere Error Bound StDev. Range:
0-1.275 m [0.005 m] */
u8 n_sats; /**< Number of satellites. */
u8 tropo_v_hydro_bound_mu; /**< Vertical Hydrostatic Error Bound Mean. [0.005
m] */
u8 tropo_v_hydro_bound_sig; /**< Vertical Hydrostatic Error Bound StDev.
[0.005 m] */
u8 tropo_v_wet_bound_mu; /**< Vertical Wet Error Bound Mean. [0.005 m] */
u8 tropo_v_wet_bound_sig; /**< Vertical Wet Error Bound StDev. [0.005 m] */
u8 n_sats; /**< Number of satellites. */
stec_sat_element_integrity_t stec_sat_list[0]; /**< Array of STEC
polynomial
coefficients
Expand Down Expand Up @@ -675,19 +675,22 @@ typedef struct SBP_ATTR_PACKED {
u8 orb_radial_bound_mu; /**< Mean Radial. See Note 1. [m] */
u8 orb_along_bound_mu; /**< Mean Along-Track. See Note 1. [m] */
u8 orb_cross_bound_mu; /**< Mean Cross-Track. See Note 1. [m] */
u8 orb_radial_bound_sig; /**< Standard Deviation Radial. See Note 1. [m] */
u8 orb_along_bound_sig; /**< Standard Deviation Along-Track. See Note 1. [m]
u8 orb_radial_bound_sig; /**< Standard Deviation Radial. See Note 2. [m] */
u8 orb_along_bound_sig; /**< Standard Deviation Along-Track. See Note 2. [m]
*/
u8 orb_cross_bound_sig; /**< Standard Deviation Cross-Track. See Note 1. [m]
u8 orb_cross_bound_sig; /**< Standard Deviation Cross-Track. See Note 2. [m]
*/
u8 clock_bound_mu; /**< Clock Bound Mean. See Note 1. [m] */
u8 clock_bound_sig; /**< Clock Bound Standard Deviation. See Note 1. [m] */
u8 clock_bound_sig; /**< Clock Bound Standard Deviation. See Note 2. [m] */
} orbit_clock_bound_t;

/** Combined Orbit and Clock Bound
*
* Note 1: Range: 0-55 m. i<=200, mean=0.0251i; 200<i<=240, mean=5+0.5(i-200);
* i>240, mean=25+2(i-240).
* Note 1: Range: 0-17.5 m. i<=200, mean=0.01i; 200<i<=230, mean=2+0.1(i-200);
* i>230, mean=5+0.5(i-230).
*
* Note 2: Range: 0-17.5 m. i<=200, std=0.01i; 200<i<=230, std=2+0.1(i-200)
* i>230, std=5+0.5(i-230).
*/

typedef struct SBP_ATTR_PACKED {
Expand Down Expand Up @@ -763,7 +766,9 @@ typedef struct SBP_ATTR_PACKED {
u64 sat_bitmask; /**< Satellite Bit Mask. Put 1 for
each satellite where the
following degradation parameters
are applicable, 0 otherwise. */
are applicable, 0 otherwise.
Encoded following RTCM DF394
specification. */
orbit_clock_bound_degradation_t
orbit_clock_bounds_degradation; /**< Orbit
and
Expand Down
2 changes: 1 addition & 1 deletion c/include/libsbp/linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ SBP_MESSAGE(

#include <libsbp/legacy/linux.h>

#endif /* LIBSBP_LINUX_MESSAGES_H */
#endif /* LIBSBP_LINUX_MESSAGES_H */
2 changes: 1 addition & 1 deletion c/include/libsbp/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ SBP_MESSAGE(

#include <libsbp/legacy/logging.h>

#endif /* LIBSBP_LOGGING_MESSAGES_H */
#endif /* LIBSBP_LOGGING_MESSAGES_H */
2 changes: 1 addition & 1 deletion c/include/libsbp/mag.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ SBP_MESSAGE(

#include <libsbp/legacy/mag.h>

#endif /* LIBSBP_MAG_MESSAGES_H */
#endif /* LIBSBP_MAG_MESSAGES_H */
2 changes: 1 addition & 1 deletion c/include/libsbp/navigation.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ SBP_MESSAGE(

#include <libsbp/legacy/navigation.h>

#endif /* LIBSBP_NAVIGATION_MESSAGES_H */
#endif /* LIBSBP_NAVIGATION_MESSAGES_H */
Loading