28 for (
const char*
port : {
"COM1",
"COM2",
"USB1",
"USB2",
"USB3",
"USB4"}) {
29 add(result,
"setDataInOut," + QByteArray(
port) +
",,-RTCMv3-RTCMv2-CMRv2", {.required =
false});
36 const QByteArray name =
port.toByteArray();
38 add(result,
"setSBFOutput, Stream1, " + name +
", none, off");
40 if (
port.startsWith(
"COM")) {
41 add(result,
"setCOMSettings, " + name +
", baud" + QByteArray::number(baud));
43 add(result,
"setDataInOut, " + name +
", Auto, SBF");
45 add(result,
"setGeodeticDatum, WGS84");
51 const QByteArray name =
port.toByteArray();
53 add(result,
"setDataInOut, " + name +
", Auto, RTCMv3+SBF");
54 if (
const auto* fixed = std::get_if<GPSBaseStationConfig::Fixed>(&
base.mode)) {
55 const auto& position = fixed->position;
57 "setStaticPosGeodetic, Geodetic1, " +
gpsFixedDecimal(position.latitudeDegrees, 9) +
", " +
60 {.label =
"setStaticPosGeodetic (fixed position)"});
61 add(result,
"setAntennaOffset, Main, 0.000000, 0.000000, 0.000000");
62 add(result,
"setReceiverDynamics, Low, Static");
63 add(result,
"setPVTMode, Static, , Geodetic1");
65 add(result,
"setPVTMode, Static, All, auto");
67 add(result,
"setSBFOutput, Stream1, " + name +
", +PVTGeodetic, msec500");
GPSCommandSequence::Command gpsCommand(QByteArray wire, std::chrono::milliseconds timeout, std::variant< GPSTextMatcher, GPSCommandSequence::RawReply > reply, GPSCommandOptions options={})
QByteArray gpsFixedDecimal(double value, int decimals)
GPSCommandSequence sequence(std::span< const Setting > settings, char port)
settings for port, each acknowledged by an ACK.
GPSCommandSequence::Command command(QByteArrayView body, GPSTextMatcher reply, std::chrono::milliseconds timeout)
body labelled by its text, framed as a sentence, and completed by reply within timeout.
constexpr std::chrono::milliseconds COMMAND_TIMEOUT
Per attempt, unless a command gives its own.
GPSCommandSequence base(QByteArrayView port, const GPSBaseStationConfig &base)
Streams RTCM3 corrections and the PVTGeodetic survey status over port in the mode base selects.
GPSCommandSequence port(QByteArrayView port, unsigned baud)
Clears the SBF output of port, keeps a serial port at the link's baud, and selects SBF and the WGS84 ...
GPSCommandSequence silenceCorrectionOutput()
Configuration used only by the RTK base-station role.
Matched in the raw received bytes, for replies that need not be complete frames (see GPSRawAckMatcher...
std::vector< Command > steps