Z1 Server UDP Data


The Z1 Server sends out data via UDP. This data is then read and displayed by the Z1 Dashboard application. However, if you would like to use the Z1 Server to send data out to your own applications you may do so.

Note, the Z1 Server application may not be used in any commercial product, regardless of whether that product is freeware or purchased by the user, without express permission from zBlueSoftware.

The following structures are used in version 1.15.0 of the Z1 Server.

Requests are sent to the Z1 Server using the following structure:
struct {
int option; // What you would like returned
int version; // The version of the Z1 Server you are expecting
bool resetButtonAction; // True if you have processed the last button action sent by the server
int fuelBuffer; // The amount of extra fuel to be added to the car during a pit stop (in liters)
float fuelPerLap; // The amount (in the user's currently selected units) of fuel used per lap in a race (zero if auto calculated by app)
float timingLapsToUse; // The number of laps or minimum lap time to consider when creating average laps times
bool useFirstPlaceLapTime; // True if the first place driver's fast lap should be used when calculating laps remaining in a timed race
int callerID; // The ID of the calling dashboard or app (1-12)
};

Note for the version all submissions should be three digits and should not use any decimal points.
So version 1.15.0 would be sent as 1150 and version 1.9.0 would be sent as 190.

The option can be set to the following values:
1 - Opening the connection
2 - Requesting driver data
3 - Requesting car telemetry
4 - Requesting competitor car data
5 - Requesting competitor car locations
10 - Closing the connection

Opening the connection (option 1):
If a connection is established the server will return the following:
struct {
int version; // The version of the server.
unsigned long packetID; // The current packet ID
unsigned char registered; // 0 if not registered; 1 if registered as a private user; 2 if registered as a commercial user
};

Requesting driver data (option 2):
The following is returned:
struct {
unsigned long packetID; // The current packet ID
float trackLength; // The length of the track in meters
float pitSpeedLimit; // The pit lane speed limit in kph (0 if not known)
float fuelDensity; // The density of the fuel (kg/liter) (0.75 by default)
char carName[64]; // The short name of the car
char carDisplayName[64]; // The full name of the car
char driverName[64]; // The name of the driver
char trackName[64]; // The short name of the track
char trackDisplayName[64]; // The full name of the track
char simName[50]; // The name of the sim
char simFileName[50]; // The name of the file name for this sim (this would usually be the sim name with spaces removed)
char sessionType[20]; // The type of session (practice, race, etc)
unsigned char structTypeStatus; // First four bits (0-3) specify the type of this struct (1 = Z1Driver; 2 = Z1CarData; 3 = Z1DriverData; 4 = Z1DriverPositions)
// Second four bits (4-7) specify the status of the Server (1 = okay; 2 = sim exited; 3 = Z1 server app exited)
unsigned char registered; // 0 if not registered; 1 or higher if registered
unsigned char simOptions; // Bits showing the options for this sim:
// Bit 0 set if the sim reports wheel speed
// Bit 1 set if the sim reports wheel RPS
// Bit 2 set if the sim reports fuel pressure
// Bit 3 set if the sim reports oil temperature
// Bit 4 set if the sim reports water temperature
// Bit 5 set if the sim reports camber
// Bit 6 set if the sim reports tire temperature
// Bit 7 set if the sim reports tire carcass temperature
};

Requesting car telemetry (option 3):
The following data is returned:
struct {
double lastLapTime; // The last lap time in seconds (xx.xxx)
double lastSectorTime; // The last sector time in seconds (xx.xxx)

unsigned char structTypeStatus; // First four bits (0-3) specify the type of this struct (1 = Z1Driver; 2 = Z1CarData; 3 = Z1DriverData; 4 = Z1DriverPositions)
// Second four bits (4-7) specify the status of the Server (1 = okay; 2 = sim exited; 3 = Z1 server app exited)

unsigned char params1; // Bits showing various parameters for the car
// Bit 0 set if the driver is in the car
// Bit 1 set if the blue flag is displayed to the driver
// Bit 2 set if the yellow flag is showing
// Bit 3 set if a local yellow flag is showing
// Bit 4 set if the driver is in their pits stall
// Bit 5 set if the driver is in the pit lane
// Bit 6 set if a new lap just began
// Bit 7 set if there are unlimited laps allowed in the session

unsigned char params2; // Bits showing various parameters for the car
// Bit 0 set if this is a race session
// Bit 1 set if this is a timed event
// Bit 2 set if the driver just got in the car
// Bit 3 set if the pit limiter is engaged
// Bit 4 set if the rev limiter is engaged
// Bit 5 set if there is a water temperature warning
// Bit 6 set if there is an oil pressure warning
// Bit 7 set if there is a fuel pressure warning

unsigned char skies; // The type of skies (0=clear;1=partly cloudy;2=mostly cloudy;3=overcast)
// The 7th bit is set if the weather is dynamic (changable)
float trackTempAtSF; // The temperature of the track at the S/F line in C
float trackTempAverage; // The average temperature of the track in C
float airTemp; // The temperature of the air in C
float airDensity; // Density if the air in kg/m^3
float airPressure; // Pressure of the air in Hg
float windVelocity; // Wind velocity in m/s
float windDirection; // Wind direction in radians
float humidity; // Relative humidity (percentage)
float fogLevel; // Fog level (percentage)
float rain; // The percentage of rain forecasted

float rpm; // The current RPM of the engine
float maxRPMReached; // The maximum RPM the engine has reached in the session
float engineTorque; // The current engine torque (in newton meters)
float waterTemp; // The current water temp (in celsius)
float cylinderHeadTemp; // The current cylinder head temp (in celcius)
float waterPress; // The current water pressure (in bar)
float waterLevel; // The current water level (in liters)
float oilPress; // The current oil pressure (in bar)
float oilTemp; // current oil temp (in celsius)
float speed; // The current speed (in kph)
float fuelPress; // The current fuel pressure (in bar)
float fuelRemaining; // The fuel in the tank (in liters)
float fuelLevelPercent; // The percentage of the fuel tank currently full
float voltage; // The electrical system voltage (in volts)

float latAccel; // The lateral acceleration (m/s^2)
float longAccel; // The longitudinal acceleration (m/s^2)
float vertAccel; // The vertical acceleration (m/s^2)
float yawNorth; // Yaw orientation relative to north (radians)
float throttle; // The amount of throttle (0 - 100 percentage)
float brake; // The amount of brake (0 - 100 percentage)
float throttleRaw; // The amount of raw throttle (0 - 100 percentage)
float brakeRaw; // The amount of raw brake (0 - 100 percentage)
float clutch; // The amount of clutch (0 - 100 percentage)
float steeringPercent; // Percent (0 - 100) of steering applied
float steeringAngle; // The steering angle (radians)
float steeringTorque; // The torque on the steering shaft (newton meters)
float lapPercent; // The percentage (0 - 100) of the way round the track
float totalSessionTime; // The length of the current session in seconds
float sessionTime; // The amount of time in seconds since the session started
float sessionTimeRemain; // The amount of time in seconds remaining in the session

float powerMGUK; // Engine MGU - K mechanical power (Watts)
float torqueMGUK; // Engine MGU-K mechanical torque (Nm)
float powerMGUH; // Engine MGU-H mechanical power (Watts)

float mgukDeployFixedAdj; // Current MGU K Deploy Fixed adjustment setting
float mgukDeployAdaptAdj; // Current MGU K Deploy Adaptive setting
float mgukRegenGainAdj; // Current MGU K Regen Gain setting
float peakBrakeBiasAdj; // Current peak brake bias setting
float diffPreloadAdj; // Current diff preload setting
float antiRollFrontAdj; // Current front anti-roll bar adjustment setting
float antiRollRearAdj; // Current rear anti-roll bar adjustment setting
float fuelMixtureAdj; // Current fuel mixture setting
float boostLevelAdj; // Current boost level setting
float revLimiterAdj; // Current rev limiter adjustment setting
float weightJackerLeftAdj; // Current left weight jacker adjustment setting
float weightJackerRightAdj; // Current right weight jacker adjustment setting
float absAdj; // Current ABS setting
float tractionControl1Adj; // Current traction control 1 setting
float tractionControl2Adj; // Current traction control 2 setting
float wingFrontAdj; // Current front wing adjustment setting
float wingRearAdj; // Current rear wing adjustment setting
float diffEntryAdj; // Current diff entry adjustment setting
float diffMiddleAdj; // Current diff middle adjustment setting
float diffExitAdj; // Current diff exit adjustment setting
float engineBrakingAdj; // Current engine braking adjustment setting
float enginePowerAdj; // Current engine power adjustment setting
float throttleShapingAdj; // Current throttle shaping setting
float brakeBiasAdj; // Current brake bias adjustment setting

float cfsRideHeight; // Center front splitter right height (meters)
float cfShockDeflection; // Center front shock deflection (meters)
float cfShockVelocity; // Center front shock velocity (meters/second)
float crShockDeflection; // Center rear shock deflection (meters)
float crShockVelocity; // Center rear shock velocity (meters/second)

float innerTempLF; // Inner surface temp (celsius)
float middleTempLF; // Middle surface temp (celsius)
float outerTempLF; // Outer surface temp (celsius)
float innerCTempLF; // Inner carcass temp (celsius)
float middleCTempLF; // Middle carcass temp (celsius)
float outerCTempLF; // Outer carcass temp (celsius)
float tirePressLF; // Tire pressure (KPA)
float rideHeightLF; // The ride height (meters)
float shockDeflectionLF; // The shock deflection (meters)
float shockVelocityLF; // The shock velocity (meters/second)
float brakeTempLF; // Brake temp (celsius)
float brakePressLF; // The brake line pressure (bar)
float tireWearLF; // How much of the tire remains (0 - 100 with 100 being a new tire)
float speedLF; // Wheel speed in meters per second
float rpsLF; // Wheel speed in revolutions per second
float camberLF; // Wheel camber in degrees

float innerTempLR; // Inner surface temp (celsius)
float middleTempLR; // Middle surface temp (celsius)
float outerTempLR; // Outer surface temp (celsius)
float innerCTempLR; // Inner carcass temp (celsius)
float middleCTempLR; // Middle carcass temp (celsius)
float outerCTempLR; // Outer carcass temp (celsius)
float tirePressLR; // Tire pressure (KPA)
float rideHeightLR; // The ride height (meters)
float shockDeflectionLR; // The shock deflection (meters)
float shockVelocityLR; // The shock velocity (meters/second)
float brakeTempLR; // Brake temp (celsius)
float brakePressLR; // The brake line pressure (bar)
float tireWearLR; // How much of the tire remains (0 - 100 with 100 being a new tire)
float speedLR; // Wheel speed in meters per second
float rpsLR; // Wheel speed in revolutions per second
float camberLR; // Wheel camber in degrees

float innerTempRF; // Inner surface temp (celsius)
float middleTempRF; // Middle surface temp (celsius)
float outerTempRF; // Outer surface temp (celsius)
float innerCTempRF; // Inner carcass temp (celsius)
float middleCTempRF; // Middle carcass temp (celsius)
float outerCTempRF; // Outer carcass temp (celsius)
float tirePressRF; // Tire pressure (KPA)
float rideHeightRF; // The ride height (meters)
float shockDeflectionRF; // The shock deflection (meters)
float shockVelocityRF; // The shock velocity (meters/second)
float brakeTempRF; // Brake temp (celsius)
float brakePressRF; // The brake line pressure (bar)
float tireWearRF; // How much of the tire remains (0 - 100 with 100 being a new tire)
float speedRF; // Wheel speed in meters per second
float rpsRF; // Wheel speed in revolutions per second
float camberRF; // Wheel camber in degrees

float innerTempRR; // Inner surface temp (celsius)
float middleTempRR; // Middle surface temp (celsius)
float outerTempRR; // Outer surface temp (celsius)
float innerCTempRR; // Inner carcass temp (celsius)
float middleCTempRR; // Middle carcass temp (celsius)
float outerCTempRR; // Outer carcass temp (celsius)
float tirePressRR; // Tire pressure (KPA)
float rideHeightRR; // The ride height (meters)
float shockDeflectionRR; // The shock deflection (meters)
float shockVelocityRR; // The shock velocity (meters/second)
float brakeTempRR; // Brake temp (celsius)
float brakePressRR; // The brake line pressure (bar)
float tireWearRR; // How much of the tire remains (0 - 100 with 100 being a new tire)
float speedRR; // Wheel speed in meters per second
float rpsRR; // Wheel speed in revolutions per second
float camberRR; // Wheel camber in degrees

float xPos; // Car's X position in the world
float yPos; // Car's Y positions in the world
float zPos; // Car's Z position in the world
float pitStallLocation; // The location of the driver's pit stall (percentage of the way around the track)

float ersLevel; // ERS charge level
float ersMaxLevel; // The maximum ERS charge
float maxERSPerLap; // The maximum ERS allowed to be used in the lap (Joules)
float ersUsedThisLap; // The amount of ERS used so far this lap (in KiloJoules)

int maxRPMAllowed; // The redline of the car
int carIdx; // The driver's car ID
int simLapNumber; // The lap number the sim is reporting
int lapsComplete; // The number of laps the driver has completed
int lapsTotal; // The total number of laps for this session (ie 40 for a 40 lap race)
int buttonAction; // The action number for the button that was just clicked
int sessionNum; // The session number

long currentDelta; // The current delta at the car's current position
unsigned long packetID; // The current packet ID

char gear; // The current gear (-1 = R; 0 = N; 1,2,3...)
char position; // The driver's current position in the session (0-64)
char currentSector; // The current sector (zero based) (0-19; max of 20 sectors)
char totalSplits; // The total number of sectors in the lap (max of 20 sectors)
char carLeftRight; // Determines if there is a car to our left or right
unsigned char trackDRSStatus; // First 4 bits are the track surface (0 = Off Track, 1 = In Pit Stall, 2 = Approaching Pits, 3 = On Track);
// Second 4 bits are the DRS status (0 = inactive; 1 = available at next zone; 2 = available and in zone; 3 = active)
};

Requesting competitor car data (option 4):
The following is returned:
struct {
double fastLapTime; // The fastest lap time in seconds (xx.xxx)
double lastLapTime; // The last lap time in seconds (xx.xxx)
unsigned long packetID; // The current packet ID

char driverName[64]; // The name of this driver
char carName[64]; // The name of the car
char sRating[10]; // The driver's safety rating

unsigned char structTypeStatus; // First four bits (0-3) specify the type of this struct (1 = Z1Driver; 2 = Z1CarData; 3 = Z1DriverData; 4 = Z1DriverPositions)
// Second four bits (4-7) specify the status of the Server (1 = okay; 2 = sim exited; 3 = Z1 server app exited)
char maxDriverIndex; // The total number of drivers that have registered (max of 64)
char driverIndex; // The index of the current driver being sent (0-63)
char location; // The location of the car (in garage; on track; off track; in pits; not in world)

int carIdx; // The ID of this driver
int fastLapNum; // The lap on which the fast lap occurred
int lapsComplete; // Number of laps completed by this driver
int iRating; // The driver's iRating (iRacing only)
int userID; // The driver's user ID (iRacing only)
int carClassID; // The car class ID
int buttonAction; // The index of any button actions that happened
float lapPercent; // The position on track
float ccRed; // The red value of the car color (0-1)
float ccGreen; // The green value of the car color (0-1)
float ccBlue; // The blue value of the car color (0-1)
float srRed; // The SR red value of the car color (0-1)
float srGreen; // The SR green value of the car color (0-1)
float srBlue; // The SR blue value of the car color (0-1)
};

Requesting competitor car locations (option 5):
The following is returned:
struct Z1DriverPositions {
unsigned long packetID; // The current packet ID
float lapPercent[64]; // the position on track of the specified driver (0-63)
int buttonAction; // The index of any button actions that happened
unsigned char structTypeStatus; // First four bits (0-3) specify the type of this struct (1 = Z1Driver; 2 = Z1CarData; 3 = Z1DriverData; 4 = Z1DriverPositions)
// Second four bits (4-7) specify the status of the Server (1 = okay; 2 = sim exited; 3 = Z1 server app exited)
char maxDriverIndex; // The total number of drivers that have registered (max of 64)
};





(c) zBlueSoftware 2019 | Partners | Forums | Contact Us | Warranty/Terms Of Use | Privacy Policy