SIMPHYNITY Game Plugin
Example game plugin DLL for SIMPHYNITY
 All Classes Files Functions Enumerations Pages
TELEMETRY_DATA Struct Reference

#include <dllmain.h>

Public Attributes

bool useLocalVals
 
float localAccel [3]
 
float localVel [3]
 
float globalVel [3]
 
float rotationMatrix [3][3]
 
DWORD packetTimeMillis
 

Detailed Description

Represents a single packet of telemetry data. Simphynity calls the GetTelemetryData function to update the output of any connected devices. GetTelemetryData receives a TELEMETRY_DATA structure as its parameter which must be populated.

For convenience, the values required can be either the longitudinal, lateral and vertical local acceleration and local velocity values (set useLocalVals to 'true'), or the global velocity values accompanied by the vehicle rotation matrix relative to global co-ordinates (set useLocalVals to 'false'). In the case of the former, the local acceleration must include world gravity. In the case of the latter, the acceleration is derived automatically by Simphynity from the global velocity (folded into the rotationMatrix) and packetTime.

In both cases, the packetTime is required to be updated each frame whenever the game is active (i.e. not paused or in a menu state). This is to inform Simphynity to read the acceleration values and output them rather than fall back to its idle state.

Members:-

bool useLocalVals

Instructs Simphynity to use the local values specified in localAccel and localVel. Any values specified in globalVel or rotationMatrix will be ignored. Similarly, if set to 'false', any values in localAccel or localVel will be ignored.

float localAccel[3]

The longitudinal[0] (+ve = forward), lateral[1] (+ve = right) and vertical[2] (+ve = down) acceleration values local to the vehicle's co-ordinate system, in M/S/S (meters per second per second). Must include world gravity. Only required if useLocalVals is set to 'true'.

float localVel[3]

The longitudinal[0] (+ve = forward), lateral[1] (+ve = right) and vertical[2] (+ve = down) velocity values local to the vehicle's co-ordinate system, in M/S (meters per second). Only required if useLocalVals is set to 'true'.

float globalVel[3]

The X[0], Y[1] and Z[2] velocity values of the vehicle relative to the world (global) co-ordinate system, in M/S (meters per second). Only required if useLocalVals is set to 'false'.

float rotationMatrix[3]

The rotation matrix representing the rotation of the vehicle relative to the world (global) co-ordinate system. Only required if useLocalVals is set to 'false'.

DWORD packetTimeMillis

The world (game) time this packet pertains to, in milliseconds. It is compulsory this is changing whenever we intend to output data to any connected devices, and in the case of global values being used this must be the exact time of the frame as represented by the physics engine of the game (as it is used to calculate velocity values).


The documentation for this struct was generated from the following file: