Come configurare i dati di telemetria in Liftoff

Liftoff: FPV Drone Racing allows you to stream drone telemetry data to external locations. This way you can analyze flights or diagnose issues with external programs that interface with Liftoff.

Who is this for?

The Drone Telemetry feature is not something the average Liftoff: FPV player will find a use for. It is however, useful to players wanting some extremely detailed feedback or researchers interested in analyzing a drone’s behavior, to plot out data in other software, or to train certain data models for A.I.

Impostare

The Drone Telemetry feature can be enabled by placing a file in a specific directory. This location depends on the operating system running Liftoff:

finestre:

C:\Users\%userprofile%\AppData\LocalLow\LuGus Studios\Liftoff\

Mac OS:

~/Library/Application Support/LuGus Studios/Liftoff/

Linux:

~/.config/unity3d/LuGus Studios/Liftoff/

Within this directory, create a new file named TelemetryConfiguration.json to enable the drone telemetry.

Currently there is no way to enable or configure this feature from within Liftoff itself. This might be added in a future update.

Configuring the telemetry data

The Drone Telemetry data stream is configured using the TelemetryConfiguration.json file. We’ll go over each of the parameters in this section. The example configurations section below provides a few practical examples.

There are two main parameters that can be configured:

  • The data end point: all telemetry data are sent over a UDP packet stream. Il EndPoint value allows you to configure where it is sent to. This value is formatted in IP end point notation, per esempio. 127.0.0.1:9001, where you specify the intended IP address and port number.
  • The stream format: you can configure which telemetry data points you’re interested in, as well as the sequence in which they are sent. Il StreamFormat string array defines the sequence. The supported data points and their data layout are listed below:
    • Timestamp (1 galleggiante – single precision – 4 bytes/float) – current timestamp of the drone’s flight. This value is reset to zero when the drone is reset.
    • Position (3 floatssingle precision – 4 bytes/float) – the drone’s world position as a 3D coordinate. Each position component can be addressed individually as PositionXPositionY, o PositionZ.
    • Attitude (4 floatssingle precision – 4 bytes/float) – the drone’s world attitude as a quaternion. Each quaternion component can be addressed individually as AttitudeXAttitudeYAttitudeZ e AttitudeW.
    • Gyro (3 floatssingle precision – 4 bytes/float) – the drone’s angular velocity rates, represented with three components in the order: pitch, roll and yaw. Each component can also be addressed individually as GyroPitchGyroRoll e GyroYaw.
    • Input (4 floatssingle precision – 4 bytes/float) – the drone’s input at that time, represented with four components in the following order: throttle, yaw, pitch and roll. Each input can be addressed individually as InputThrottleInputYawInputPitch e InputRoll.

Note that this data stream is only available for drones that are actively being simulated by Liftoff. It won’t work for drones being spectated in multiplayer or during a replay session.

Modifying the configuration while in-game

Each time the drone is reset, Liftoff will check whether the telemetry configuration file has been changed, and reload it if so. This allows you to tweak and change parameters without restarting Liftoff.

If the configuration file contains an error, Liftoff will display a popup message after the drone has been reset. Fix the error, reset the drone again, and the new telemetry configuration will be loaded.

Example configurations

Some example configurations of the TelemetryConfiguration.json file.

Qualunque cosa

A configuration that will send over all telemetry data to a local end point.

{
  "EndPoint": "127.0.0.1:9001",
  "StreamFormat": [
    "Timestamp",
    "Position",
    "Attitude",
    "Gyro",
    "Input"
  ]
}

The total size of each data frame being sent would be 60 byte.

Horizontal position over time

A configuration that will only send the position of the drone in the XZ-plane, along with the timestamp, to an end point in the local network.

{
  "EndPoint": "192.168.1.6:6808",
  "StreamFormat": [
    "Timestamp",
    "PositionX",
    "PositionZ"
  ]
}

The total size of each data frame being sent would be 12 byte.

From input to gyroscope

A configuration that correlates input axes to the drone’s gyroscope, without a timestamp.

{
  "EndPoint": "127.0.0.1:9001",
  "StreamFormat": [
    "InputPitch",
    "GyroPitch",
    "InputRoll",
    "GyroRoll",
    "InputYaw",
    "GyroYaw"
  ]
}

The total size of each data frame being sent would be 24 byte.

Questa guida su Liftoff è stato scritto da JuniorDiscart. Puoi visitare la pubblicazione originale da questo collegamento. In caso di dubbi su questa guida, per favore non esitate a contattarci qui.

Circa l'autore