1.2. FrSky Taranis Telemetry - athertop/MavLink_FrSkySPort GitHub Wiki
Once connected and running, the Teensy code provides the FrSky X series receiver with a host of telemetry information which it sends in the form of SmartPort telemetry sensors. These emulated sensors are downlinked by the X series receiver to the Taranis radio.
If you are running OpenTx version 2.0.x then the telemetry screen provided in the s-c-l-v-rc branch will display this telemetry on your Taranis without further setup being required.
For OpenTx versions 2.1.x however, due to refactoring of the telemetry system, this now requires additional telemetry configuration within the telemetry page of your model. For a new model, its telemetry page starts out blank, and requires that SmartPort (or in our case Teensy-emulated SmartPort) sensors are 'discovered' by the Taranis. Fortunately sensor discovery option is provided in OpenTx, and its essential to use this option as the basis of sensor configuration:
-
Its best if we start with a blank model telemetry page. If items already exist on your model's telemetry page, then clear the page using the Delete Sensors option:
-
Ensure the craft is powered and the Teensy is fully connected and operational. Once ArduCopter (or ArduPlane) initialises, and the tones are heard suggesting all Pre-Arm tests were successful, the teensy will start to send telemetry along the smartport bus - and down to the Taranis. This will not yet be available on the Taranis until sensors are configured in the next step.
-
On the Telemetry page, please ensure that the option 'Ignore Instances' is un-checked, and then choose 'Discover New Sensors'. All sensors presented by the Teensy, plus any others also connected to SmartPort will be added to the telemetry page. (in some cases other sensors may be daisy chained to the SmartPort bus - one popular sensor is the FLVSS LiPo monitor, which works well in combination with the Teensy)
-
Once the sensor list stops growing in size, this signifies that all available sensors have been discovered. At this point choose 'Stop Discovery' and the Taranis will cease its search, leaving the Sensor list static from this point on.
-
The order of the sensors on the telemetry page is not important, as long as all the required ones are present and properly configured. The following table details the telemetry sensors which should appear during the Discovery process:
Parameter | Description | Type | ID | Instance | Unit of Measure | Precision | Ratio | Offset |
---|---|---|---|---|---|---|---|---|
RSSI | Radio signal strength value as reported by the Taranis.[dB] | Custom | F101 | 25 | RF Power (dB) | 0 | - | 0 |
RxBt | Battery voltage of the receiver [V] | Custom | F104 | 25 | Voltage (V) | 1 | 13.2 | 0 |
SWR | Standing Wave Ratio | Custom | F105 | 25 | Raw | 0 | - | 0 |
Alt | Altitude from baro. [m] | Custom | 0100 | 1 | Meters (m) | 1 | - | 0.0 |
VSpd | Vertical speed [m/s] | Custom | 0110 | 1 | Speed (m/s) | 2 | - | 0.00 |
Cels | Battery voltage from FrSky FLVSS sensor [V] | Custom | 0300 | 2 | Voltage (V) | 1 | - | 0.0 |
Curr | Current as reported by the current sensor [A] | Custom | 0200 | 3 | Current (A) | 1 | - | 0.0 |
VFAS | Voltage from LiPo - either from Mavlink or FAS sensor [V] | Custom | 0210 | 3 | Voltage (V) | 2 | - | 0.00 |
GAlt | Altitude from GPS [m] | Custom | 0820 | 4 | Meters (m) | 1 | - | 0.0 |
GPS | GPS Coordinates [lat/long] | Custom | 0800 | 4 | ||||
GSpd | Ground Speed [m/s] | Custom | 0830 | 4 | Speed (kts) - leave as kts | 1 | - | 0.0 |
ASpd | Air Speed [m/s] | Custom | 0A00 | 10 | Speed (kts) - leave as kts | 1 | - | 0.0 |
Hdg | Compass heading [deg] | Custom | 0840 | 4 | Heading (°) | 1 | - | 0 |
A2 | HDOP value * 10 | Custom | F103 | 4 | V (amend to raw) | 1 | 13.2 (amend to 0) | 0.0 |
Tmp1 | GPS status = ap_sat_visible*10) + ap_fixtype | Custom | 0400 | 5 | DegC | 0 | - | 0 |
Tmp2 | Armed Status and Mavlink Messages :- 16 bit value: bit 1: armed - bit 2-5: severity +1 (0 means no message - bit 6-15: number representing a specific text | Custom | 0410 | 5 | DegC | 0 | - | 0 |
RPM | Throttle when ARMED [%] *100 + % battery remaining as reported by Mavlink | Custom | 0500 | 5 | Raw | 0 | - | 0 |
AccX | X Axis average vibration m/s | Custom | 0700 | 6 | Acceleration (g) | 2 | - | 0.00 |
AccY | Y Axis average vibration m/s | Custom | 0710 | 6 | Acceleration (g) | 2 | - | 0.00 |
AccZ | Z Axis average vibration m/s | Custom | 0720 | 6 | Acceleration (g) | 2 | - | 0.00 |
A3 | Roll angle from -Pi to +Pi radians, converted to a value between 0 and 1024 | Custom | 0900 | 7 | Raw | 0 | - | 300 |
A4 | Pitch angle from -Pi/2 to +Pi/2 radians, converted to a value between 0 and 1024 | Custom | 0910 | 7 | Raw | 0 | - | 300 |
Fuel | Current Flight Mode reported by Mavlink | Custom | 0600 | 8 | Raw | 0 | - | 0 |
If the SEND_STATUS_TEXT_MESSAGE option is enabled (it is by default), the following value should also be discovered:
Parameter | Description | Type | ID | Instance | Unit of Measure | Precision | Ratio | Offset |
---|---|---|---|---|---|---|---|---|
Fuel (rename to MSG) | APM Statustext | Custom | 0600 | 9 | Raw | 0 | - | 0 |
Note - some discovered sensors require to be edited before continuing:
- Fuel - (This second instance of the Fuel sensor - instance 9 as mentioned above) must be renamed to MSG, and unit changed to '-' (raw). This will only be discovered if the option SEND_STATUS_TEXT_MESSAGE is enabled in MavLink_FrSkySPort.ino, and is used by the txtmsg.lua telemetry page.
- A2 - will be created with a ratio of 13.2 and a unit of V. These should be changed to '-', and '-' (raw) respectively.
Additionally Note - ASpd & GSpd- These sensors will be discovered with the unit of kts configured - even though the value it displays will actually be in m/s. Do not change the units of these sensors - leave as kts and the telemetry screen will display their values correctly in the chosen scale (chosen in the telemetry screen configuration).
- Next, three Calculated sensors need to be manually added and configured as follows:
Parameter | Description | Type | Method | Source1 | Source2 | Source3 | Param | Unit of Measure | Precision |
---|---|---|---|---|---|---|---|---|---|
Cmin | value of lowest voltage LiPo cell [V] | Calculated | Cel | Cels | Lowest | Voltage (V) | n/a | ||
mAh | flight battery current consumption [mAh] | Calculated | Consumption | Curr | mAh | n/a | |||
Watt | flight battery power consumption [Wh] | Calculated | Multiply | Curr | VFAS | Power (W) | 2 |
- (optional) Nice to have Values
These are not needed for this telemetry solution, but maybe useful for custom telemetry screens:
Parameter | Description | Type | Method | Source1 | Source2 | Source3 | Param | Unit of Measure | Precision |
---|---|---|---|---|---|---|---|---|---|
Z1 | Voltage level of Cell 1 [V] | Calculated | n/a | Cels/Cell1 | Voltage (V) | n/a | |||
Z2 | Voltage level of Cell 2 [V] | Calculated | n/a | Cels/Cell2 | Voltage (V) | n/a | |||
Z3 | Voltage level of Cell 3 [V] | Calculated | n/a | Cels/Cell3 | Voltage (V) | n/a |
- Dual FLVSS sensor telemetry configuration
As mentioned above (from OpenTx 2.1) it is possible to configure two FLVSS LiPo sensors in your model. This is a great solution if you have two LiPos connected in Parallel (for double capacity and C rating), or in series (for double s count/voltage). In either case, we need to be able to monitor for the lowest voltage cell from both batteries, and so implementing two FLVSS sensors allows us to do this perfectly. The connectivity and sensor ID configuration is discussed in section 1.0 Setup. For configuring the telemetry sensors:
- Locate the 'Cels' sensor (this will have ID: 2), and rename it Bat1.
- Locate the second FLVSS sensor (this will have ID: 15 if the setup guide was followed), and rename it Bat2.
- Next, create two new Calculated sensors as follows:
Parameter | Description | Type | Formula | Source1 | Source2 | Source3 | Cell Index | Unit of Measure | Precision |
---|---|---|---|---|---|---|---|---|---|
CMn1 | value of lowest voltage LiPo cell [V] | Calculated | Cel | Bat1 | Lowest | Voltage (V) | n/a | ||
CMn2 | value of lowest voltage LiPo cell [V] | Calculated | Cel | Bat2 | Lowest | Voltage (V) | n/a |
- Next, edit the Cmin calculated sensor as follows (this replaces the Cmin config described in section 6. above):
Parameter | Description | Type | Formula | Source1 | Source2 | Source3 | Unit of Measure | Precision |
---|---|---|---|---|---|---|---|---|
Cmin | lowest value of CMn1 and CMn2 [V] | Calculated | Min | CMn1 | CMn2 | Voltage (V) | 2 |
Keep in mind generally that telemetry sensor naming is case sensitive, so its important to get the case of each telemetry sensor name spelled correctly for the telemetry scripts to display data properly. e.g. 'Cmin' is not equal to 'CMin'
- Finally, configure the telemetry screen to display the required scripts. Screen 1 should be set to Script and main chosen. Screen 2 is optional, and again set to Script and txtmsg chosen. Having both scripts selected, the telemetry page should look as follows:
Use of the optional txtmsg script is reliant upon the line #define SEND_STATUS_TEXT_MESSAGE being enabled in MavLink_FrSkySPort.ino before uploading the teensy sketch (this is enabled by default in the code, but can be commented out if not required), and also relies upon a MSG sensor having been configured (see the foot of point 5 above for details). This provides a status messages telemetry screen in addition to the main screen which looks like this:
Please note that this screen is still quite experimental and prone to some data corruption, but can be quite useful, so worth persevering with.