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
43 changes: 43 additions & 0 deletions c/include/libsbp/cpp/message_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -5818,6 +5818,49 @@ struct MessageTraits<sbp_msg_ssr_gridded_correction_t> {
}
};

template <>
struct MessageTraits<sbp_msg_ssr_orbit_clock_bounds_degradation_t> {
static constexpr sbp_msg_type_t id = SbpMsgSsrOrbitClockBoundsDegradation;
static const sbp_msg_ssr_orbit_clock_bounds_degradation_t &get(
const sbp_msg_t &msg) {
return msg.ssr_orbit_clock_bounds_degradation;
}
static sbp_msg_ssr_orbit_clock_bounds_degradation_t &get(sbp_msg_t &msg) {
return msg.ssr_orbit_clock_bounds_degradation;
}
static void to_sbp_msg(
const sbp_msg_ssr_orbit_clock_bounds_degradation_t &msg,
sbp_msg_t *sbp_msg) {
sbp_msg->ssr_orbit_clock_bounds_degradation = msg;
}
static sbp_msg_t to_sbp_msg(
const sbp_msg_ssr_orbit_clock_bounds_degradation_t &msg) {
sbp_msg_t sbp_msg;
sbp_msg.ssr_orbit_clock_bounds_degradation = msg;
return sbp_msg;
}
static s8 send(sbp_state_t *state, u16 sender_id,
const sbp_msg_ssr_orbit_clock_bounds_degradation_t &msg,
sbp_write_fn_t write) {
return sbp_msg_ssr_orbit_clock_bounds_degradation_send(state, sender_id,
&msg, write);
}
static s8 encode(uint8_t *buf, uint8_t len, uint8_t *n_written,
const sbp_msg_ssr_orbit_clock_bounds_degradation_t &msg) {
return sbp_msg_ssr_orbit_clock_bounds_degradation_encode(buf, len,
n_written, &msg);
}
static s8 decode(const uint8_t *buf, uint8_t len, uint8_t *n_read,
sbp_msg_ssr_orbit_clock_bounds_degradation_t *msg) {
return sbp_msg_ssr_orbit_clock_bounds_degradation_decode(buf, len, n_read,
msg);
}
static size_t encoded_len(
const sbp_msg_ssr_orbit_clock_bounds_degradation_t &msg) {
return sbp_msg_ssr_orbit_clock_bounds_degradation_encoded_len(&msg);
}
};

template <>
struct MessageTraits<sbp_msg_ssr_orbit_clock_bounds_t> {
static constexpr sbp_msg_type_t id = SbpMsgSsrOrbitClockBounds;
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 @@ -948,6 +948,12 @@ struct MessageTraits<msg_ssr_orbit_clock_bounds_t> {
};


template<>
struct MessageTraits<msg_ssr_orbit_clock_bounds_degradation_t> {
static constexpr u16 id = 1503;
};


template<>
struct MessageTraits<msg_ssr_code_biases_t> {
static constexpr u16 id = 1505;
Expand Down
52 changes: 52 additions & 0 deletions c/include/libsbp/legacy/ssr.h
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,58 @@ typedef struct SBP_ATTR_PACKED {
couple. */
} msg_ssr_code_phase_biases_bounds_t;

/** None
*
* Orbit and clock bound degradation.
*/

typedef struct SBP_ATTR_PACKED {
u8 orb_radial_bound_mu_dot; /**< Orbit Bound Mean Radial First
derivative degradation parameter (range
0-0.255) [0.001 m/s] */
u8 orb_along_bound_mu_dot; /**< Orbit Bound Mean Along-Track First
derivative degradation parameter (range
0-0.255) [0.001 m/s] */
u8 orb_cross_bound_mu_dot; /**< Orbit Bound Mean Cross-Track First
derivative degradation parameter (range
0-0.255) [0.001 m/s] */
u8 orb_radial_bound_sig_dot; /**< Orbit Bound Standard Deviation Radial
First derivative degradation parameter
(range 0-0.255) [0.001 m/s] */
u8 orb_along_bound_sig_dot; /**< Orbit Bound Standard Deviation Along-
Track First derivative degradation
parameter (range 0-0.255) [0.001 m/s] */
u8 orb_cross_bound_sig_dot; /**< Orbit Bound Standard Deviation Cross-
Track First derivative degradation
parameter (range 0-0.255) [0.001 m/s] */
u8 clock_bound_mu_dot; /**< Clock Bound Mean First derivative
degradation parameter (range 0-0.255) [0.001 m/s]
*/
u8 clock_bound_sig_dot; /**< Clock Bound Standard Deviation First
derivative degradation parameter (range
0-0.255) [0.001 m/s] */
} orbit_clock_bound_degradation_t;

typedef struct SBP_ATTR_PACKED {
bounds_header_t header; /**< Header of a bounds
message. */
u8 ssr_iod; /**< IOD of the SSR bound degradation
parameter. */
u8 const_id; /**< Constellation ID to which the SVs
belong. */
u64 sat_bitmask; /**< Satellite Bit Mask. Put 1 for
each satellite where the
following degradation parameters
are applicable, 0 otherwise. */
orbit_clock_bound_degradation_t
orbit_clock_bounds_degradation; /**< Orbit
and
Clock
Bounds
Degradation
Parameters */
} msg_ssr_orbit_clock_bounds_degradation_t;

/** \} */

SBP_PACK_END
Expand Down
2 changes: 2 additions & 0 deletions c/include/libsbp/sbp_msg_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ typedef enum {
SbpMsgSsrGriddedCorrectionNoStdDepA =
SBP_MSG_SSR_GRIDDED_CORRECTION_NO_STD_DEP_A,
SbpMsgSsrGriddedCorrection = SBP_MSG_SSR_GRIDDED_CORRECTION,
SbpMsgSsrOrbitClockBoundsDegradation =
SBP_MSG_SSR_ORBIT_CLOCK_BOUNDS_DEGRADATION,
SbpMsgSsrOrbitClockBounds = SBP_MSG_SSR_ORBIT_CLOCK_BOUNDS,
SbpMsgSsrOrbitClockDepA = SBP_MSG_SSR_ORBIT_CLOCK_DEP_A,
SbpMsgSsrOrbitClock = SBP_MSG_SSR_ORBIT_CLOCK,
Expand Down
13 changes: 13 additions & 0 deletions c/include/libsbp/ssr_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -512,4 +512,17 @@
*/
#define SBP_MSG_SSR_CODE_PHASE_BIASES_BOUNDS_ENCODED_OVERHEAD 13u

/**
* Encoded length of sbp_orbit_clock_bound_degradation_t (V4 API) and
* orbit_clock_bound_degradation_t (legacy API)
*/
#define SBP_ORBIT_CLOCK_BOUND_DEGRADATION_ENCODED_LEN 8u

#define SBP_MSG_SSR_ORBIT_CLOCK_BOUNDS_DEGRADATION 0x05DF
/**
* Encoded length of sbp_msg_ssr_orbit_clock_bounds_degradation_t (V4 API) and
* msg_ssr_orbit_clock_bounds_degradation_t (legacy API)
*/
#define SBP_MSG_SSR_ORBIT_CLOCK_BOUNDS_DEGRADATION_ENCODED_LEN 28u

#endif /* LIBSBP_SSR_MACROS_H */
15 changes: 15 additions & 0 deletions c/include/libsbp/v4/sbp_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ typedef union {
sbp_msg_ssr_gridded_correction_no_std_dep_a_t
ssr_gridded_correction_no_std_dep_a;
sbp_msg_ssr_gridded_correction_t ssr_gridded_correction;
sbp_msg_ssr_orbit_clock_bounds_degradation_t
ssr_orbit_clock_bounds_degradation;
sbp_msg_ssr_orbit_clock_bounds_t ssr_orbit_clock_bounds;
sbp_msg_ssr_orbit_clock_dep_a_t ssr_orbit_clock_dep_a;
sbp_msg_ssr_orbit_clock_t ssr_orbit_clock;
Expand Down Expand Up @@ -729,6 +731,9 @@ static inline s8 sbp_message_encode(uint8_t *buf, uint8_t len,
case SbpMsgSsrGriddedCorrection:
return sbp_msg_ssr_gridded_correction_encode(
buf, len, n_written, &msg->ssr_gridded_correction);
case SbpMsgSsrOrbitClockBoundsDegradation:
return sbp_msg_ssr_orbit_clock_bounds_degradation_encode(
buf, len, n_written, &msg->ssr_orbit_clock_bounds_degradation);
case SbpMsgSsrOrbitClockBounds:
return sbp_msg_ssr_orbit_clock_bounds_encode(
buf, len, n_written, &msg->ssr_orbit_clock_bounds);
Expand Down Expand Up @@ -1314,6 +1319,9 @@ static inline s8 sbp_message_decode(const uint8_t *buf, uint8_t len,
case SbpMsgSsrGriddedCorrection:
return sbp_msg_ssr_gridded_correction_decode(
buf, len, n_read, &msg->ssr_gridded_correction);
case SbpMsgSsrOrbitClockBoundsDegradation:
return sbp_msg_ssr_orbit_clock_bounds_degradation_decode(
buf, len, n_read, &msg->ssr_orbit_clock_bounds_degradation);
case SbpMsgSsrOrbitClockBounds:
return sbp_msg_ssr_orbit_clock_bounds_decode(
buf, len, n_read, &msg->ssr_orbit_clock_bounds);
Expand Down Expand Up @@ -1812,6 +1820,9 @@ static inline size_t sbp_message_encoded_len(sbp_msg_type_t msg_type,
case SbpMsgSsrGriddedCorrection:
return sbp_msg_ssr_gridded_correction_encoded_len(
&msg->ssr_gridded_correction);
case SbpMsgSsrOrbitClockBoundsDegradation:
return sbp_msg_ssr_orbit_clock_bounds_degradation_encoded_len(
&msg->ssr_orbit_clock_bounds_degradation);
case SbpMsgSsrOrbitClockBounds:
return sbp_msg_ssr_orbit_clock_bounds_encoded_len(
&msg->ssr_orbit_clock_bounds);
Expand Down Expand Up @@ -2347,6 +2358,10 @@ static inline int sbp_message_cmp(sbp_msg_type_t msg_type, const sbp_msg_t *a,
case SbpMsgSsrGriddedCorrection:
return sbp_msg_ssr_gridded_correction_cmp(&a->ssr_gridded_correction,
&b->ssr_gridded_correction);
case SbpMsgSsrOrbitClockBoundsDegradation:
return sbp_msg_ssr_orbit_clock_bounds_degradation_cmp(
&a->ssr_orbit_clock_bounds_degradation,
&b->ssr_orbit_clock_bounds_degradation);
case SbpMsgSsrOrbitClockBounds:
return sbp_msg_ssr_orbit_clock_bounds_cmp(&a->ssr_orbit_clock_bounds,
&b->ssr_orbit_clock_bounds);
Expand Down
2 changes: 2 additions & 0 deletions c/include/libsbp/v4/ssr.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <libsbp/v4/ssr/MSG_SSR_GRID_DEFINITION_DEP_A.h>
#include <libsbp/v4/ssr/MSG_SSR_ORBIT_CLOCK.h>
#include <libsbp/v4/ssr/MSG_SSR_ORBIT_CLOCK_BOUNDS.h>
#include <libsbp/v4/ssr/MSG_SSR_ORBIT_CLOCK_BOUNDS_DEGRADATION.h>
#include <libsbp/v4/ssr/MSG_SSR_ORBIT_CLOCK_DEP_A.h>
#include <libsbp/v4/ssr/MSG_SSR_PHASE_BIASES.h>
#include <libsbp/v4/ssr/MSG_SSR_SATELLITE_APC.h>
Expand All @@ -41,6 +42,7 @@
#include <libsbp/v4/ssr/MSG_SSR_TILE_DEFINITION.h>
#include <libsbp/v4/ssr/MSG_SSR_TILE_DEFINITION_DEP.h>
#include <libsbp/v4/ssr/OrbitClockBound.h>
#include <libsbp/v4/ssr/OrbitClockBoundDegradation.h>
#include <libsbp/v4/ssr/PhaseBiasesContent.h>
#include <libsbp/v4/ssr/STECHeader.h>
#include <libsbp/v4/ssr/STECHeaderDepA.h>
Expand Down
Loading