Skip to content

serial-protocols: document GPS, and list the missing protocols - #550

Draft
MUSTARDTIGERFPV wants to merge 1 commit into
ExpressLRS:masterfrom
MUSTARDTIGERFPV:serial-gps
Draft

serial-protocols: document GPS, and list the missing protocols#550
MUSTARDTIGERFPV wants to merge 1 commit into
ExpressLRS:masterfrom
MUSTARDTIGERFPV:serial-gps

Conversation

@MUSTARDTIGERFPV

Copy link
Copy Markdown
Member

The protocol list on this page names seven protocols. The receiver offers ten (RXParameters.cpp). MAVLink, DisplayPort and GPS were all absent, and there was no GPS section at all even though the protocol has shipped since 4.0.

GPS Notes

A new section covering the parts a user has to get right, all taken from SerialGPS.cpp and rx_main.cpp:

Documented Source
Wiring is one way, GPS TX to receiver Serial RX only SerialGPS::sendQueuedData() has an empty body, the receiver never transmits
115200 baud, 8N1, no baud detection serialBaud = 115200 for Serial 1 and Serial1.begin(115200, SERIAL_8N1, ...) for Serial2; serialConfig defaults to SERIAL_8N1 and is only changed for SBUS and HoTT
Only GGA, VTG and RMC are read processSentence()
Talker ID is not checked the match is on sentence[3..5], so $GP, $GN and others all work
GGA sends the position frame, VTG is folded into the next GGA frame, RMC sends the time frame sendTelemetryFrame() on GGA, the VTG call is commented out with "VTG usually comes before GGA, only generate one telemetry frame with both combined", sendGpsTimeTelemetryFrame() on RMC
A bad NMEA checksum discards the sentence isValidChecksum()
Serial2 is ESP32 only #if defined(PLATFORM_ESP32) guard around setupSerial1()

The baud rate is the one that matters in practice. It is hardcoded and there is no detection, while most GPS modules ship set to 9600 baud, so a stock module produces no telemetry at all. That has a warning.

Two other corrections

  • The intro list was missing MAVLink and DisplayPort as well as GPS. Added, with a note that Tramp and SmartAudio are Serial2 only and MAVLink is Serial 1 only.
  • The Lua page said Protocol 2 "has the same options as the setting above". Serial2 has no MAVLink option, so that is now stated.

GPS is also added to the Lua Protocol list, which omitted it.

Not included

I did not document EdgeTX sensor names or a required EdgeTX version for the GPS time frame. Those cannot be verified from the firmware, so they are better added by someone who can confirm them on a handset.

NMEA is added to .wordlist.txt for the spellcheck. wordlist.dic is left alone since it is generated.

The protocol list on this page named seven protocols. The receiver
offers ten. GPS, MAVLink and DisplayPort were all absent, and the page
had no GPS section at all even though the protocol has shipped since
4.0.

Add a GPS Notes section covering the parts a user has to get right:

- Wiring is one way. Only the GPS TX to receiver Serial RX line is
  needed, because SerialGPS never transmits.
- The port is opened at 115200 baud 8N1 and there is no auto detection.
  Most modules ship at 9600 baud, so this is the likely first failure.
- GGA, VTG and RMC are the only sentences read, and the talker ID is
  not checked, so any prefix works. GGA sends the position frame, VTG
  is folded into the next GGA frame, and RMC sends the time frame.
- Each GGA produces a telemetry frame, so the GPS output rate has a
  direct cost in telemetry bandwidth.

Note which protocols are restricted to one interface. Tramp and
SmartAudio are Serial2 only, and MAVLink is Serial 1 only. The Lua page
claimed Protocol 2 had the same options as Protocol, which is not true
for MAVLink.

Add GPS to the Lua Protocol list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant