Telemetry interface

Maniaplanet 4, Trackmania Turbo and Trackmania 2020 provide telemetry data via a shared memory interface.

Interface
The data is written continuously to a non-persisted memory mapped file in virtual memory. External applications have direct access to it. The name of the file mapping object is ManiaPlanet_Telemetry.

The interface is active immediately after the start of the game. If Maniaplanet and Trackmania Turbo are running at the same time (or multiple instances of the same game), it is not possible to determine from which instance the data originates.

It is not known when or how often the data is updated. An export of the telemetry data by UDP streaming is not available. The data can only be received on the PC on which the game is running.

The following information is provided:
 * Game state - Information about the current state of the game
 * Race state - Information about the current state of the race
 * Object state - State of the vehicle within the virtual world
 * Vehicle state - Current information about the vehicle itself
 * Device state - Information for virtual chairs
 * Player state - Information about the current player (TM2020)

The complete data structure can be taken from the header file maniaplanet_telemetry.h:

Using the data
Nadeo has provided an example program (including source code) in the closed Maniaplanet 4 Beta forums. The tool displays all of the provided telemetry data items live in a window.

To process the data, we need to know when and how the individual data records are provided. The following C++ source code allows you to create a simple console application that will output some of the telemetry data live:

UpdateNumer is used to synchronize the data between the game and the receiver. The variable is incremented once before the values are changed and once thereafter.

For timing information, the object state and vehicle state structures each contain a Timestamp variable. The resolution of the included time is 10 milliseconds.

A few notes about the race data:
 * A new race starts when the race state changes from BeforeState to Running.
 * A race ends when the race state changes from Running to Finished or BeforeState. In order to distinguish between finish and restart, it's necessary to check whether the checkpoint count has increased.
 * It is not guaranteed that the checkpoint time has been updated at the same time as the checkpoint number is raised.
 * The current lap of a multi-lap race can be determined by dividing NbCheckpoints by NbCheckpointsPerLap.
 * The provided telemetry data records are not cleared after a race ends.

Hardware and software that use the telemetry interface

 * MMOne Project
 * D-BOX Technologies Inc. motion-cueing systems
 * SimHub, Sim Racing Dashboard and Hardware
 * SIM Dashboard Android App
 * TrackMania Telemetry Monitor
 * SymProjects SimDash, Sim Monitor
 * RGB effects for the Wooting one keyboard