QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
Ashtech::Plan Namespace Reference

Classes

struct  Setting

Functions

GPSCommandOutcome rejection (std::string_view reply)
 A NAK rejects any command.
GPSCommandOutcome acknowledgement (std::string_view reply)
 A $PASHS setting is acknowledged by an ACK.
QByteArray line (std::string_view command)
 command as one CR/LF-terminated line.
QByteArray line (std::string_view command, char port)
 command for port as one CR/LF-terminated line.
QByteArray surveyStart (std::chrono::seconds duration)
QByteArray fixedPosition (const GPSEllipsoidPosition &position)
GPSCommandSequence::Command fixedPositionCommand (const GPSEllipsoidPosition &position)
 The fixedPosition() command, acknowledged by an ACK and labelled without its coordinates.
GPSCommandSequence sequence (std::span< const Setting > settings, char port)
 settings for port, each acknowledged by an ACK.

Variables

constexpr std::chrono::milliseconds RESPONSE_TIMEOUT {200}
 Per attempt, for every command.
constexpr std::array BAUD_RATES {9600u, 38400u, 19200u, 57600u, 115200u}
 Rates the port query probes, in order. Trimble receivers default to 115200.
constexpr std::string_view PORT_QUERY = "$PASHQ,PRT"
constexpr unsigned PORT_QUERY_ATTEMPTS = 2
constexpr unsigned LINK_BAUD = 115200
constexpr std::string_view LINK_SPEED = "$PASHS,SPD,{port},9"
constexpr std::chrono::milliseconds LINK_SPEED_SETTLE {200}
constexpr unsigned PORT_QUERY_ATTEMPTS_AT_LINK_BAUD = 10
constexpr std::string_view BOARD_QUERY = "$PASHQ,RID"
 Board identification; only an MB-Two (BASE_BOARD) can run as a base station.
constexpr std::string_view BASE_BOARD = "MB2"
constexpr std::array OUTPUTS
 Navigation output. Some receivers do not acknowledge some of these (GSV, for example), so none is required.
constexpr std::array STATION
 Station description once averaging has started (see surveyStart()).
constexpr std::array RTCM_OUTPUTS
 RTCM3 output once the base position is known.

Detailed Description

Ashtech/Trimble receiver configuration as data, in the order it is sent. $PASHS commands set and $PASHQ commands query; the receiver answers with $PASHR. "{port}" stands for the port letter the receiver reported in $PASHR,PRT.

Useful but unused: $PASHQ,VER (firmware), $PASHQ,OPTION (installed options; an MB-Two reports, among others, W,20HZ and K,RTKBASE) and $PASHS,RST (factory reset, followed by a reboot of about 15 s).

Function Documentation

◆ acknowledgement()

GPSCommandOutcome Ashtech::Plan::acknowledgement ( std::string_view reply)
nodiscard

A $PASHS setting is acknowledged by an ACK.

Definition at line 29 of file AshtechPlan.cc.

References Acknowledged, and rejection().

Referenced by fixedPositionCommand(), and sequence().

◆ fixedPosition()

QByteArray Ashtech::Plan::fixedPosition ( const GPSEllipsoidPosition & position)
nodiscard

Fixed base, sent after the first position, then RTCM_OUTPUTS: the $PASHS,POS line for position, with unsigned ddmm.mmmmmmmm and dddmm.mmmmmmmm and hemisphere letters, and the height in metres.

Definition at line 49 of file AshtechPlan.cc.

References gpsFixedDecimal().

Referenced by fixedPositionCommand().

◆ fixedPositionCommand()

GPSCommandSequence::Command Ashtech::Plan::fixedPositionCommand ( const GPSEllipsoidPosition & position)
nodiscard

The fixedPosition() command, acknowledged by an ACK and labelled without its coordinates.

Definition at line 58 of file AshtechPlan.cc.

References acknowledgement(), fixedPosition(), gpsCommand(), and RESPONSE_TIMEOUT.

◆ line() [1/2]

QByteArray Ashtech::Plan::line ( std::string_view command)
nodiscard

command as one CR/LF-terminated line.

Definition at line 34 of file AshtechPlan.cc.

Referenced by line(), and sequence().

◆ line() [2/2]

QByteArray Ashtech::Plan::line ( std::string_view command,
char port )
nodiscard

command for port as one CR/LF-terminated line.

Definition at line 39 of file AshtechPlan.cc.

References line().

◆ rejection()

GPSCommandOutcome Ashtech::Plan::rejection ( std::string_view reply)
nodiscard

A NAK rejects any command.

Definition at line 24 of file AshtechPlan.cc.

References Pending, and Rejected.

Referenced by acknowledgement().

◆ sequence()

GPSCommandSequence Ashtech::Plan::sequence ( std::span< const Setting > settings,
char port )
nodiscard

settings for port, each acknowledged by an ACK.

Definition at line 64 of file AshtechPlan.cc.

References acknowledgement(), gpsCommand(), line(), RESPONSE_TIMEOUT, and GPSCommandSequence::steps.

◆ surveyStart()

QByteArray Ashtech::Plan::surveyStart ( std::chrono::seconds duration)
nodiscard

Survey-in base, sent after the first position: the $PASHS,POS,AVG line averaging the position over duration. Its $PASHR,RECEIPT start receipt acknowledges it, and the finish receipt carries the averaged position.

Definition at line 44 of file AshtechPlan.cc.

Variable Documentation

◆ BASE_BOARD

std::string_view Ashtech::Plan::BASE_BOARD = "MB2"
inlineconstexpr

Definition at line 44 of file AshtechPlan.h.

◆ BAUD_RATES

std::array Ashtech::Plan::BAUD_RATES {9600u, 38400u, 19200u, 57600u, 115200u}
inlineconstexpr

Rates the port query probes, in order. Trimble receivers default to 115200.

Definition at line 31 of file AshtechPlan.h.

◆ BOARD_QUERY

std::string_view Ashtech::Plan::BOARD_QUERY = "$PASHQ,RID"
inlineconstexpr

Board identification; only an MB-Two (BASE_BOARD) can run as a base station.

Definition at line 43 of file AshtechPlan.h.

◆ LINK_BAUD

unsigned Ashtech::Plan::LINK_BAUD = 115200
inlineconstexpr

The link ends at LINK_BAUD. From another rate, LINK_SPEED (SPD code 9) switches the receiver without a reply; the host keeps receiving for LINK_SPEED_SETTLE, follows, and the port query confirms the receiver at the new rate.

Definition at line 37 of file AshtechPlan.h.

◆ LINK_SPEED

std::string_view Ashtech::Plan::LINK_SPEED = "$PASHS,SPD,{port},9"
inlineconstexpr

Definition at line 38 of file AshtechPlan.h.

◆ LINK_SPEED_SETTLE

std::chrono::milliseconds Ashtech::Plan::LINK_SPEED_SETTLE {200}
inlineconstexpr

Definition at line 39 of file AshtechPlan.h.

◆ OUTPUTS

std::array Ashtech::Plan::OUTPUTS
inlineconstexpr
Initial value:
{
Setting{"$PASHS,POP,20", false},
Setting{"$PASHS,SNS,SOL", false},
Setting{"$PASHS,NME,ALL,{port},OFF", false},
Setting{"$PASHS,ATM,ALL,{port},OFF", false},
Setting{"$PASHS,OUT,{port},ON", false},
Setting{"$PASHS,NME,ZDA,{port},ON,3", false},
Setting{"$PASHS,NME,GST,{port},ON,3", false},
Setting{"$PASHS,NME,POS,{port},ON,0.05", false},
Setting{"$PASHS,NME,GSV,{port},ON,1", false},
}

Navigation output. Some receivers do not acknowledge some of these (GSV, for example), so none is required.

Definition at line 47 of file AshtechPlan.h.

◆ PORT_QUERY

std::string_view Ashtech::Plan::PORT_QUERY = "$PASHQ,PRT"
inlineconstexpr

Definition at line 32 of file AshtechPlan.h.

◆ PORT_QUERY_ATTEMPTS

unsigned Ashtech::Plan::PORT_QUERY_ATTEMPTS = 2
inlineconstexpr

Definition at line 33 of file AshtechPlan.h.

◆ PORT_QUERY_ATTEMPTS_AT_LINK_BAUD

unsigned Ashtech::Plan::PORT_QUERY_ATTEMPTS_AT_LINK_BAUD = 10
inlineconstexpr

Definition at line 40 of file AshtechPlan.h.

◆ RESPONSE_TIMEOUT

std::chrono::milliseconds Ashtech::Plan::RESPONSE_TIMEOUT {200}
inlineconstexpr

Per attempt, for every command.

Definition at line 28 of file AshtechPlan.h.

Referenced by fixedPositionCommand(), and sequence().

◆ RTCM_OUTPUTS

std::array Ashtech::Plan::RTCM_OUTPUTS
inlineconstexpr
Initial value:
{
Setting{"$PASHS,NME,POS,{port},ON,0.2"},
Setting{"$PASHS,RT3,1074,{port},ON,1"},
Setting{"$PASHS,RT3,1084,{port},ON,1"},
Setting{"$PASHS,RT3,1094,{port},ON,1"},
Setting{"$PASHS,RT3,1114,{port},ON,1"},
Setting{"$PASHS,RT3,1124,{port},ON,1"},
Setting{"$PASHS,RT3,1006,{port},ON,1"},
Setting{"$PASHS,RT3,1033,{port},ON,31"},
Setting{"$PASHS,RT3,1013,{port},ON,1"},
Setting{"$PASHS,RT3,1029,{port},ON,1"},
Setting{"$PASHS,RT3,1230,{port},ON"},
Setting{"$PASHS,RT3,1005,{port},ON,1"},
Setting{"$PASHS,RT3,1077,{port},ON,1"},
Setting{"$PASHS,RT3,1087,{port},ON,1"},
}

RTCM3 output once the base position is known.

Definition at line 66 of file AshtechPlan.h.

◆ STATION

std::array Ashtech::Plan::STATION
inlineconstexpr
Initial value:
{
Setting{"$PASHS,ANP,OWN,TRM55971.00"},
Setting{"$PASHS,STI,0001"},
}

Station description once averaging has started (see surveyStart()).

Definition at line 60 of file AshtechPlan.h.