ZZ-Cat / CRSFforArduino

An Arduino Library for communicating with ExpressLRS and TBS Crossfire receivers.
GNU Affero General Public License v3.0
162 stars 27 forks source link

GPS telemetry #15

Closed ZZ-Cat closed 1 year ago

ZZ-Cat commented 1 year ago

Overview

After my disastrous first attempt at doing telemetry, I have decided to split adding full telemetry support up into smaller & easier to manage modules, based on the types of telemetry being added. These are:

Each module will have its own Issue, Development Branch & Pull Request associated with it, with the end goal of CRSF for Arduino eventually having full telemetry support. Over time, I will make my way through each module, starting with GPS (because this is what I already have on-hand).

What's needed

This Issue is to remind myself to add GPS telemetry to CRSF for Arduino.

Therefore, I need to write code that reads GPS NMEA 0183 sentences & converts that into meaningful data that the CRSF protocol can work with. I will need to write a new GPS hardware driver as well.

The new driver will have similar features to my previous attempt, plus a few extra goodies:

Once I have this working, you will be able to view Location, Ground Speed, Heading, Altitude & Number of Satellites in View on your EdgeTX controller.

Additional

Gear list

The gear that I am using for this is as follows:

Also...

Despite what #3 & #5 will have you believe, I somehow managed to totally obliterate all existence of that code & I managed to do a "clean commit". This means that no code relating to any sensor hardware drivers exist, despite things like Pull Requests & Commits alike referencing them being added.

Still to this day, I have no idea how I even managed to do that, but it totally yeeted all of my work regarding telemetry. Because of that, I am having to start this portion of CRSF for Arduino from scratch all over again. Yay. =-/.-= ...& it has taken me this long to get back into it & convince myself that it's definitely worth doing. Especially now that I know that other people are benefiting from my project.

ZZ-Cat commented 1 year ago

I have decided against writing my own hardware GPS driver for this. There is no need for me to reinvent the wheel, & create unnecessary work for myself.

To allow for greater flexibility, I will bring up all relevant GPS telemetry fields to the API. That way, anyone that wants to use CRSF for Arduino, they can provide their own GPS drivers & parsing libraries, then pass that into CRSF for Arduino in order to use GPS telemetry.

What I will do is, I will include an example firmware that demonstrates how a third party GPS driver can be used to provide data for CRSF for Arduino's GPS telemetry.

This will be the format with other telemetry modules going forward.