QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
UnicorePlan.h
Go to the documentation of this file.
1#pragma once
2
3#include <array>
4#include <chrono>
5#include <cstdint>
6
7#include <QtCore/QByteArray>
8#include <QtCore/QList>
9
10#include "GPSProtocolMath.h"
11
15namespace Unicore::Plan {
16
18inline constexpr std::chrono::milliseconds COMMAND_TIMEOUT{1500};
19
22enum class Reply : uint8_t
23{
25 Version,
26 RoverMode,
28 FixedMode,
30};
31
32struct Command
33{
34 QByteArray text;
37 QByteArray label{};
38};
39
41inline constexpr std::chrono::milliseconds CONFIGURATION_TIMEOUT{45000};
43inline constexpr std::array BAUD_RATES{115200u, 230400u, 460800u, 921600u, 57600u, 38400u, 19200u, 9600u};
44
46[[nodiscard]] Command identify();
47
50{
52 QList<Command> role;
54 QList<Command> output;
55};
56
58[[nodiscard]] BaseStation averagingBase(std::chrono::seconds maximum);
59
61[[nodiscard]] BaseStation fixedBase(const GPSProtocolMath::Ecef& position);
62
63} // namespace Unicore::Plan
constexpr std::array BAUD_RATES
Rates the identity query probes, in order.
Definition UnicorePlan.h:43
Command identify()
Sent at each candidate rate. Nothing changes before a supported receiver answers.
constexpr std::chrono::milliseconds COMMAND_TIMEOUT
Per command.
Definition UnicorePlan.h:18
@ Version
#VERSIONA names a UM980 from R4.10Build7923 or a UM982 from R4.10Build7650 (section 3....
@ RoverMode
#MODE reports MODE ROVER.
@ FixedPosition
#BESTNAVXYZA reports FIXEDPOS at the commanded coordinates.
@ FixedMode
#MODE reports MODE BASE.
@ AveragingMode
#MODE reports MODE BASE TIME.
constexpr std::chrono::milliseconds CONFIGURATION_TIMEOUT
For the whole configuration after validation.
Definition UnicorePlan.h:41
BaseStation fixedBase(const GPSProtocolMath::Ecef &position)
A fixed base at position, in ECEF metres.
BaseStation averagingBase(std::chrono::seconds maximum)
Receiver-managed averaging for at most maximum.
The commands after identification.
Definition UnicorePlan.h:50
QList< Command > output
Sent once base status is monitored: the fixed-position readback, then base status and RTCM3 output.
Definition UnicorePlan.h:54
QList< Command > role
Stops logs, forces a fresh role transition through the rover role, enables NMEA output and sets the b...
Definition UnicorePlan.h:52
QByteArray label
Names the command in evidence, error details and logs when its text carries base coordinates.
Definition UnicorePlan.h:37