Hello Fellow Yuneec Pilot!
Join our free Yuneec community and remove this annoying banner!
Sign up

Reverse engineering CGO3+ UART

I was just amazed that AI wrote anything remotely useful. The first iteration assumed 50Hz. The 2nd iteration based on 250Hz used the following to assign the pulse widths:

Code:
dutyCycle = map(flightControllerSignal, 1000, 2000, 0, 180);  // Mapping to servo position

Then used the write function with the duty cycle. I haven't analyzed it any depth.

Edit:

The 2nd iteration ChatGPT used the ESP32Servo Library which is essentially a wrapper for the ledc functions for Arduino from Espressif. The AI code probably could have be written or modified to explicitly set the frequency at 250Hz.
 
Last edited:
I made some updates in github. Link above. The sensor messages (msgID 255) are pretty clear now, stuff moved to q500log2kml - decoding sensor files.
Also could read some data from camera as calibration tool does. But I have no idea what to write or how the calibration process goes.
ToDo: The first part of the control message (msgID 1) still unclear (except velocity). Measurement units needs clarification, Gimbal position is not confirmed, only guessing.
 
Typical AI nonsense. It takes some information found in different sources in the internet and offer it in a differnet structured (sometimes well structured) way. Some misinterpretions occur per default from AI.
AI is based on neuronal network that is trained with a huge amont of data. Training means it stores probabilities of decisions in the neuronal network (OK, a pure simplification but may help to understand). AI is NOT a knowledge database. All results are highly probable but not reallity.
Example:
Many people (and me too) put a time stamp when it was taken before the recorded data. For the AI this makes it highly probable that time is part of the message but it isn't while AI says it is. Same for CRC. CGO3 UART protocol has a CRC (16bit CCITT) but AI says it has not. The experts call this hallucinating (no joke).

All what is written there we already know. But on the other hand, the AI results as it was made are a good base for a documentation if you know the reality and edit it.
 
I was surprised that AI even came close to understanding what I fed it. As for the CRC unless it knew which bit/field contained it, AI would be best guess.
 

New Posts

Members online

No members online now.

Forum statistics

Threads
21,190
Messages
244,322
Members
27,968
Latest member
Hippiatric