Skip to main content
Version: 5.0.0

Lightweight Telemetry (LTM)

LTM was defined by "KipK" for the Ghetto Station antenna tracking project and originally implemented in Taulabs and Baseflight. It was adopted by INAV due to its excellent characteristics for low data rate / high update rate telemetry.

Since its introduction to INAV, a number of extension have been added; these are documented below, in addition to the original frames.

Protocol Definition​

Overview​

The LTM protocol starts with "$T", followed by a function byte, the payload and a simple CRC checksum. Its weakness is that there is no length parameter (so the receiver needs to know, apriori,the length for each function), and the single byte checksum is not as robust as the multi-byte checksum in for example the ublox GPS protocol. However, the high data rate ensures that good data should be delivered over occasional transmission errors. In practice, LTM is an excellent light weight telemetry solution.

PositionByte
0$
1T
2G/A/S/O/N/X/T
3..nn bytes payload
n + 3CRC

LTM telemetry can be read by Ghettostation, LTM Telemetry OLED , EZGUI , MwpTools and others.

LTM can provide good telemetry down to 2400 (5Hz attitude updates). Due to restrictions in INAV 1.2 and earlier, 9600 was the lowest baud rate supported, which gives 10Hz attitude and 5Hz GPS data. More recently (INAV 1.7.0), LTM is available from 1200 baud and higher; the data transmission frequency is automatically determined from the baud rate, but can be overridden by the user where the baud rate can support the required update frequency. See the INAV Telemetry documentation and below for CLI settings.

The function consists of a single ASCII character, described below. Data is binary, little endian. The checksum is an XOR of the payload bytes.

The follow telemetry frames are supported:

Function ByteUsageFrequency
GGPS Frame5Hhz at > 2400 baud
AAttitude Frame10 Hz at > 2400 baud
SStatus Frame5Hhz at > 2400 baud
OOrigin Frame1 Hz rate
NNavigation Frame (iNav extension)~4 Hz rate
XGPS eXended data (iNav extension)1 Hz rate

In addition, LTM is used by NRF24L01 / deviationtx iNav protocol, which defines an additional frame for in-TX tuning. This frame is not transmitted for telemetry.

Function ByteUsage
TTuning frame (iNav extension)

GPS Frame (G)​

The payload is 14 bytes.

DataFormat
Latitudeint32 decimal degrees * 10,000,000 (1E7)
Longitudeint32 decimal degrees * 10,000,000 (1E7)
Ground Speeduchar m/s
Altitude(u)int32, cm (m / 100). In the original specification, this was unsigned. In iNav it is signed and should be so interpreted by consumers
Satsuchar. bits 0-1 : fix ; bits 2-7 : number of satellites

Attitide Frame (A)​

The payload is 6 bytes

DataFormat
Pitchint16, degrees
Rollint16, degrees
Headingint16, degrees. Course over ground

Status Frame (S)​

The payload is 7 bytes

DataFormat
Vbatuint16, mV
Battery Consumptionuint16, mAh
RSSIuchar
Airspeeduchar, m/s
Statusuchar

Airspeed (vice GPS ground speed in the G-frame) requires INAV 1.7.2 or later, with PITOT defined at build time, and a detected pitot sensor.

The status byte is used as

BitUsage
0armed
1failsafe
2 - 7status, as (shifted value):
Manual (0)
Rate (1)
Angle (2)
Horizon (3)
Acro (4)
Stabilised1 (5)
Stabilised2 (6)
Stabilised3 (7)
Altitude Hold (8)
GPS Hold (9)
Waypoints (10)
Head free (11)
Circle (12)
RTH (13)
Follow me (14)
Land (15)
Fly by wire A (16)
Fly by wire B (17)
Cruise (18)
Unknown (19)
Launch (20*)
Autotune (21*)

As a general purpose protocol, not all status can be mapped to INAV modes.

(*) indicates iNav extension, post 2019-02-28

Origin Frame (O)​

The payload is 14 bytes

DataUsage
Latitudeint32 decimal degrees * 10,000,000 (1E7)
Longitudeint32 decimal degrees * 10,000,000 (1E7)
Altitudeuint32, cm (m / 100) [always 0 in iNav]
OSD onuchar (always 1)
Fixuchar, home fix status (0 == no fix)

The payload is 6 bytes. Note that this frame largely mirrors the Multiwii-nav MSP_NAV_STATUS message and this contains redundancies and values that are not used in INAV.

DataUsage
GPS modeuchar
Nav modeuchar
Nav Actionuchar (not all used in inav)
Waypoint numberuchar, target waypoint
Nav Erroruchar
Flagsuchar (to be defined)

where:

GPS modeEnumeration
0None
1PosHold
2RTH
3Mission
Nav modeEnumeration
0None
1RTH Start
2RTH Enroute
3PosHold infinite
4PosHold timed
5WP Enroute
6Process next
7Jump
8Start Land
9Landing in Progress
10Landed
11Settling before landing
12Start descent
13Hover above home (iNav only)
14Emergency landing (iNav only)
15Critical GPS failure (yes 15, you never want to see this)

Note that these values were defined by Multiwii-nav and not all are applicable to INAV.

Nav ActionEnumeration
0UNASSIGNED
1WAYPOINT
2POSHOLD_UNLIM
3POSHOLD_TIME
4RTH
5SET_POI
6JUMP
7SET_HEAD
8LAND
Nav ErrorEnumeration
0Navigation system is working
1Next waypoint distance is more than the safety limit, aborting mission
2GPS reception is compromised - pausing mission
3Error while reading next waypoint from memory, aborting mission
4Mission Finished
5Waiting for timed position hold
6Invalid Jump target detected, aborting mission
7Invalid Mission Step Action code detected, aborting mission
8Waiting to reach return to home altitude
9GPS fix lost, mission aborted
10Disarmed, navigation engine disabled
11Landing is in progress, check attitude

GPS Extra Frame (X)​

The payload is 6 bytes.

DataUsage
HDOPuint16 HDOP * 100
hw statusuint8
LTM_X_counteruint8
Disarm Reasonuint8
(unused)1 byte

Note that hw status (hardware sensor status) is INAV 1.5 and later. If the value is non-zero, then a sensor has failed. A complementary update has been made to MSP_STATUS. Thus, on disarming, the sensor status may be evinced from the MSP_STATUS/sensor field.

The sensor hardware failure indication is backwards compatible with versions prior to 1.5 (and other Multiwii / Cleanflight derivatives).

The LTM_X_counter value is incremented each transmission and rolls over (modulo 256). It is intended to enable consumers to estimate packet loss.

iNav CLI Support​

LTM is transmit only, and can work at any supported baud rate. It was designed to operate over 2400 baud and does not benefit from (much) higher rates. It is thus usable on soft serial. The extra frames later introduced by INAV means that 4800 baud is required for the highest update rate.

A CLI variable ltm_update_rate may be used to configure the update rate and hence band-width used by LTM, with the following enumerations:

  • NORMAL: Legacy rate, currently 303 bytes/second (requires 4800 bps)
  • MEDIUM: 164 bytes/second (requires 2400 bps)
  • SLOW: 105 bytes/second (requires 1200 bps)

For many telemetry devices, there is direction correlation between the air-speed of the radio link and range; thus a lower value may facilitate longer range links.

Sample Data​

A couple of data samples are available from the mwptools project. Sample1 and Sample2 include raw dumps, structured data logs and READMEs explaining usage.

Other​

Tuning Frame (T)​

The payload is 12 bytes. This frame is not transmitted by iNav telemetry.

DataFormat
P-rolluint8
I-rolluint8
D-rolluint8
P-pitchuint8
P-pitchuint8
I-pitchuint8
D-yawuint8
I-yawuint8
rates-rolluint8
rates-pitchuint8
rates-yawuint8

Checksum Calculation​

To calculate the checksum of the payload bytes, use the following example (Python):

def checksum(payload):
value = 0
for d in payload:
value ^= d
return value