13 std::array<MsgOutKey, 4>
keys;
25constexpr uint32_t LEGACY_PORT_MODE_8N1 = 0x08d0;
26constexpr uint16_t LEGACY_PROTOCOL_UBX = 1 << 0;
27constexpr uint16_t LEGACY_PROTOCOL_NMEA = 1 << 1;
28constexpr uint16_t LEGACY_PROTOCOL_RTCM3 = 1 << 5;
31uint32_t accuracyWireUnits(
double accuracyMeters)
38struct FixedPositionWire
52 const auto height =
static_cast<int64_t
>(
position.altitudeMeters * 1e4);
53 return {
static_cast<int32_t
>(
latitude / 100),
static_cast<int8_t
>(
latitude % 100),
55 static_cast<int32_t
>(
height / 100),
static_cast<int8_t
>(
height % 100)};
114 .warning =
"Jamming monitor not supported by this receiver",
124 .warning =
"GPS L5 health override not supported by this receiver",
139 .warning =
"Could not disable unused messages",
176 const auto position = fixedPositionWire(fixed.
position);
190 const auto& on = compactObservations ? MSM4 : MSM7;
191 const auto& off = compactObservations ? MSM7 : MSM4;
213std::array<uint8_t, 2 * WIRE_SIZE<CfgPrt>>
legacyPorts(uint32_t baudrate)
215 std::array<uint8_t, 2 * WIRE_SIZE<CfgPrt>> payload{};
216 auto next = payload.begin();
218 const uint16_t nmea =
id ==
LEGACY_PORT_USB ? LEGACY_PROTOCOL_NMEA : 0;
221 .mode = LEGACY_PORT_MODE_8N1,
222 .baudRate = baudrate,
223 .inProtoMask = LEGACY_PROTOCOL_UBX,
224 .outProtoMask =
static_cast<uint16_t
>(LEGACY_PROTOCOL_UBX | nmea | LEGACY_PROTOCOL_RTCM3)});
225 next = std::copy(port.begin(), port.end(), next);
256 const auto& observations = compactObservations ? MSM4 : MSM7;
268 .svinMinDur =
static_cast<uint32_t
>(survey.
duration.count()),
274 const auto position = fixedPositionWire(fixed.
position);
275 return {.flags = 2 | (1 << 8),
276 .ecefXOrLat = position.latitude,
277 .ecefYOrLon = position.longitude,
278 .ecefZOrAlt = position.height,
279 .ecefXOrLatHP = position.latitudeHp,
280 .ecefYOrLonHP = position.longitudeHp,
281 .ecefZOrAltHP = position.heightHp,
std::array< MsgOutKey, 4 > keys
std::array< MessageId, 4 > messages
GPSPositionReport position(const GPSDecodedPosition &source, const GPSIntegrityReport &diagnostic, uint64_t nowUs)
std::optional< uint32_t > tenthMillimeters(double meters)
meters in 0.1 mm, truncated toward zero. Empty when not finite, negative or beyond a 32-bit unsigned ...
constexpr MsgOutKey MSGOUT_UBX_NAV_PVT
constexpr auto TMODE_LON_HP
constexpr MsgOutKey MSGOUT_RTCM_3X_TYPE1005
constexpr auto USBINPROT_SPARTN
constexpr auto USBOUTPROT_UBX
constexpr auto TMODE_SVIN_MIN_DUR
constexpr auto TMODE_FIXED_POS_ACC
constexpr MsgOutKey MSGOUT_UBX_RXM_SFRBX
constexpr auto ITFM_ENABLE
constexpr auto USBINPROT_NMEA
constexpr MsgOutKey MSGOUT_UBX_NAV_SVIN
constexpr auto ODO_OUTLPCOG
constexpr MsgOutKey MSGOUT_RTCM_3X_TYPE1097
constexpr auto TMODE_HEIGHT
constexpr auto UART1OUTPROT_NMEA
constexpr MsgOutKey MSGOUT_RTCM_3X_TYPE1094
constexpr auto USBINPROT_UBX
constexpr auto UART1_BAUDRATE
constexpr auto NAVSPG_UTCSTANDARD
constexpr auto TMODE_HEIGHT_HP
constexpr auto SEC_JAMDET_SENSITIVITY_HI
constexpr MsgOutKey MSGOUT_UBX_NAV_RELPOSNED
constexpr MsgOutKey MSGOUT_RTCM_3X_TYPE1087
constexpr MsgOutKey MSGOUT_UBX_RXM_RAWX
constexpr auto UART1_PARITY
constexpr auto TMODE_POS_TYPE
constexpr auto UART1_STOPBITS
constexpr auto TMODE_MODE
constexpr auto TMODE_SVIN_ACC_LIMIT
constexpr auto UART1INPROT_SPARTN
constexpr MsgOutKey MSGOUT_RTCM_3X_TYPE1084
constexpr MsgOutKey MSGOUT_RTCM_3X_TYPE1077
constexpr auto USBINPROT_RTCM3X
constexpr auto SIGNAL_HEALTH_L5
constexpr auto UART1OUTPROT_RTCM3X
constexpr MsgOutKey MSGOUT_RTCM_3X_TYPE1124
constexpr MsgOutKey MSGOUT_UBX_NAV_STATUS
constexpr MsgOutKey MSGOUT_RTCM_3X_TYPE1230
constexpr MsgOutKey MSGOUT_UBX_NAV_DOP
constexpr auto UART1INPROT_RTCM3X
constexpr auto NAVHPG_DGNSSMODE
constexpr auto USBOUTPROT_NMEA
constexpr MsgOutKey MSGOUT_RTCM_3X_TYPE1127
constexpr MsgOutKey MSGOUT_UBX_NAV_EOE
constexpr MsgOutKey MSGOUT_RTCM_3X_TYPE1074
constexpr auto NAVSPG_FIXMODE
constexpr auto UART1OUTPROT_UBX
constexpr MsgOutKey MSGOUT_UBX_MON_RF
constexpr auto ODO_USE_COG
constexpr auto NAVSPG_DYNMODEL
constexpr auto UART1INPROT_UBX
constexpr auto UART1_DATABITS
constexpr auto UART1INPROT_NMEA
constexpr auto ODO_USE_ODO
constexpr auto TMODE_LAT_HP
constexpr MsgOutKey MSGOUT_UBX_NAV_TIMEGPS
constexpr auto USBOUTPROT_RTCM3X
constexpr MsgOutKey MSGOUT_UBX_NAV_SAT
constexpr auto RATE_TIMEREF
constexpr MsgOutKey MSGOUT_UBX_SEC_SIG
constexpr MsgOutKey MSGOUT_UBX_NAV_HPPOSLLH
constexpr auto ODO_OUTLPVEL
constexpr MessageId NAV_SVIN
constexpr MessageId RTCM3_1074
constexpr MessageId MON_HW
constexpr MessageId RTCM3_1124
constexpr MessageId RTCM3_1077
constexpr MessageId RTCM3_1127
constexpr MessageId NAV_STATUS
constexpr MessageId NAV_DOP
constexpr MessageId RTCM3_1097
constexpr MessageId RTCM3_1230
constexpr MessageId RTCM3_1087
constexpr MessageId NAV_SVINFO
constexpr MessageId RTCM3_1005
constexpr MessageId RTCM3_1084
constexpr MessageId NAV_PVT
constexpr MessageId RTCM3_1094
ValsetBatch rtcmOutput(bool compactObservations)
Base output at 1 Hz: station position, observations in the selected MSM format and GLONASS biases.
constexpr uint8_t NO_OUTPUT
ValsetBatch fixedBase(const GPSBaseStationConfig::Fixed &fixed)
ValsetBatch jammingDetection()
Probes CFG-SEC-JAMDET, which F9 HPG 1.50+, F9 L1L5 and X20 have instead of CFG-ITFM.
std::array< MessageRate, 5 > legacyMessageOutput()
NAV-PVT, status, satellite and MON-HW (antenna and jamming) rates during the survey.
ValsetBatch disableRTCMOutput()
Stops RTCM output, including observations a previous session left in the other MSM format.
constexpr uint8_t SURVEY_SATELLITE_RATE
NAV-SAT every tenth survey epoch.
ValsetBatch interferenceMonitor()
Enables the interference monitor of firmware without CFG-SEC-JAMDET.
constexpr uint16_t BASE_MEASUREMENT_PERIOD_MS
RTCM output only needs 1 Hz; the survey keeps the faster navigation rate because it converges faster.
constexpr std::chrono::milliseconds PORT_TIMEOUT
constexpr uint8_t BASE_SATELLITE_INFO_RATE
ValsetBatch uart1Baudrate(uint32_t baudrate)
constexpr uint16_t LEGACY_PORT_UART1
std::vector< ValsetBatch > portsAndNavigation(const ReceiverProfile &profile)
Protocol 27+ configuration before jamming detection: ports, navigation, odometer and RTK.
std::array< MessageRate, 10 > legacyDisableRTCMOutput()
Written without waiting for acknowledgements.
CfgTmode3 legacySurveyIn(const GPSBaseStationConfig::SurveyIn &survey)
@ WriteOnly
Required, but written without awaiting the reply.
@ Warn
Optional, but worth a warning.
@ Tolerate
Optional: firmware without these keys rejects them, or the configuration flow decides.
std::vector< ValsetBatch > messageOutput(const ReceiverProfile &profile)
Protocol 27+ configuration after jamming detection: message output and receiver-specific extras.
ValsetBatch uart1Protocols()
Protocol 27+ port setup at the detected baud rate: UBX only on UART1, 8N1.
std::array< uint8_t, 2 *WIRE_SIZE< CfgPrt > > legacyPorts(uint32_t baudrate)
std::array< RTCMOutput, 6 > legacyRTCMOutput(bool compactObservations)
ValsetBatch disableTimeMode()
CfgTmode3 legacyFixedBase(const GPSBaseStationConfig::Fixed &fixed)
ValsetBatch surveyIn(const GPSBaseStationConfig::SurveyIn &survey)
constexpr uint16_t LEGACY_PORT_USB
constexpr uint8_t SURVEY_STATUS_RATE
ValsetBatch disableMessage(MsgOutKey key)
Disables unexpected output; the reply is not awaited.
std::array< MessageRate, 2 > legacyBaseStatus()
Survey status and satellite rates for the 1 Hz base; rejections are ignored.
constexpr uint8_t STATIONARY_DYNAMIC_MODEL
Base stations always use the stationary navigation model.
constexpr std::array< uint8_t, SIZE< T > > encode(const T &value)
GPSEllipsoidPosition position
std::chrono::seconds duration
WGS84 geodetic position with ellipsoid height, not mean-sea-level altitude.
uint16_t flags
mode in bits 7..0, lla in bit 8
A CFG-MSGOUT output rate key family, named by its I2C key.
std::chrono::milliseconds timeout
std::vector< ValsetItem > items
uint16_t measurementPeriodMs
bool l5HealthOverride
GPS L5 is broadcast unhealthy while pre-operational; L1/L5 receivers take the L1 health flag instead.