FrSky telemetry converting raw data

General Help and support for the Taranis Radio.
Post Reply
syone201
Posts: 3
Joined: Tue Nov 03, 2020 2:08 pm
Country: -

FrSky telemetry converting raw data

Post by syone201 »

Hi guys, this is my first post here since registration, but i'm after some help understanding s.port telemetry data. I have a Taranis x9D being fed s.port telemetry data from an X8R that is connected to a Matek F405 wing. I have mirrored the telemetry data to the port in the battery bay, built a bluetooth module using a HC06 and configured it to talk to an android device. On the Android software i can see the input data stream in hex and all the data frames sent by the radio transmitter. I've found quite a few articles on seeing how the frames are constructed with the 0x7e start/stop bits, the next 2 being the Sensor discovery and the reply 0x10 sent if the sensor replies. The next 2 bytes being the Sensor ID eg 0xF101 if its RSSI, but where i'm stuck, is knowing how to convert the 4 byte raw data values, into the values shown on the telemetry page for sensor data i would like to see, like below:

7E 1B 10 00 04 02 00 00 00 E9 Tmp1 Sensor 02 00 00 00
7E 1B 10 10 09 6F 01 00 00 66 ADC4 6F 01 00 00
7E 1B 10 10 02 4D 04 00 00 8C VFAS 4D 04 00 00
7E 1B 10 00 02 02 00 00 00 EB Current 02 00 00 00
7E 1B 10 00 01 00 00 00 00 EE Altitude 00 00 00 00
7E 98 10 05 F1 00 36 07 A2 19 SWR. 00 36 07 A2
7E 98 10 01 F1 53 00 12 A2 F4 RSSI 53 00 23 A2
7E 98 10 04 F1 5A 00 12 A2 EA RxBatt 5A 00 12 A2
7E 1B 10 00 06 0C 00 00 00 DD Fuel 0C 00 00 00
7E 1B 10 10 01 FE FF FF FF DF vario FE FF FF FF
7E 1B 10 40 08 50 8C 00 00 CA Heading 50 8C 00 00
7E 1B 10 30 04 24 00 00 00 97 Pitch 24 00 00 00
7E 1B 10 40 04 85 00 00 00 26 Roll 85 00 00 00

There's been quite a few articles here of people talking about s.port, but i haven't yet found any explanations on decoding the raw data, so I'm hoping that someone might know the conversion algorithms or can link me to an article where this is explained. Also the last checksum byte is somehow linked to the entire data frame, anyone know how this is calculated. I've used crazydude1994's telemetry viewer to know that it is sending correct data, but i can't decipher in his codebase the methods used to get the values, hopefully a verbal explanation might help me. Many thanks in advance.

syone201
Posts: 3
Joined: Tue Nov 03, 2020 2:08 pm
Country: -

Re: FrSky telemetry converting raw data

Post by syone201 »

hi, thanks for your quick response. I have looked at that page before and again since you mentioned them, but i'm only 6 months into learning JAVA and 4 months into enjoying RC aircraft, let alone C++, so it's all quite new and i can't figure the code out. Are there any sites where it's explained what the conversion is?
syone201
Posts: 3
Joined: Tue Nov 03, 2020 2:08 pm
Country: -

Re: FrSky telemetry converting raw data

Post by syone201 »

ok, making some progress, well in respect of the checksum anyway thanks to an explanation by bobbdobbs here https://openrcforums.com/forum/viewtopi ... 3&start=30, at the bottom of the page, so i understand now in my data stream how the checksum is related to the rest of the packets, but still not getting the raw data translation for voltages, current, heading etc. (I think it was easier to read the description that trying to figure out the code somebody else had already written). I also found quite detailed explanations in the comments here https://github.com/jcheger/arduino-frsk ... rskySP.cpp, but i'm still not quite understanding how to get from raw data like 5A 00 12 A2 from 0xF104 (rxBt) to actual voltage values and CA 5D 00 00 from 0x0840(Heading) to Heading. This page "https://www.frsky-rc.com/wp-content/upl ... or_hub.pdf" was a helpful read, but the frame headers are different so maybe the telemetry hub is something different and is not quite the same data as what i'm seeing.

User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: FrSky telemetry converting raw data

Post by Kilrah »

Hub is different indeed.

From the links I gave you'll see that F104 is treated as SPORT_DATA_U8, so it's only one unsigned byte, the rest is garbage you ignore. Then that byte is the raw value of a 8-bit ADC with a reference voltage of 3.3V, to which the supply voltage is connected through a 4:1 resistive divider. 5A is thus (90/255)*3.3*4 = 4.66V.

Post Reply

Return to “General help (FrSky Taranis radio)”