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 2022.3.x of the Z1 Server.

Requests are sent to the Z1 Server using the following structure:
Size: 24 bytes
struct {
unsigned char option; // What you would like returned
unsigned char param1; // Any additional parameters that need to be sent in the request
bool resetButtonAction; // True if you have processed the last button action sent by the server
bool useFirstPlaceLapTime; // True if the first place driver's fast lap should be used when calculating laps remaining in a timed race
int version; // The version of the Z1 Server you are expecting
int fuelBuffer; // The amount of extra fuel to be added to the car during a pit stop (in liters)
int callerID; // The ID of the calling dashboard or app (1-6)
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
};

Note for the version all submissions should be sequential digits and should not use any decimal points.
So version 2022.3 would be sent as 20223.

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
6 - Requesting custom data channel names
7 - Requesting custom data channel data
10 - Closing the connection

Opening the connection (option 1):
If a connection is established the server will return the following:
Size: 32 bytes
struct {
unsigned char structTypeStatus; // First four bits (0-3) specify the type of this struct (1 = Z1Confirm; 2 = Z1SimData; 3 = Z1TelemetryData;
// 4 = Z1DriverData; 5 = Z1DriverPositions; 6 = Z1CustomDataChannelNames; 7 = Z1CustomDataChannelData)
// Second four bits (4-7) specify the status of the Server
// (1 = sim running; 2 = sim exited; 3 = Z1 server app exited; 4 = Sim paused)
unsigned char registered; // 0 (not registered); 1 (private user); 2 (commercial); 3 (educational)
int version; // The version of the server
unsigned long packetID; // The current packet ID
char orderNumber[17]; // The registered order number
};

Requesting driver data (option 2):
The following is returned:
Size: 476 bytes
struct {
unsigned char structTypeStatus; // First four bits (0-3) specify the type of this struct (1 = Z1Confirm; 2 = Z1SimData; 3 = Z1TelemetryData;
// 4 = Z1DriverData; 5 = Z1DriverPositions; 6 = Z1CustomDataChannelNames; 7 = Z1CustomDataChannelData)
// Second four bits (4-7) specify the status of the Server
// (1 = sim running; 2 = sim exited; 3 = Z1 server app exited; 4 = Sim paused)
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
unsigned char simOptions2; // Bits showing the options for this sim:
// Bit 0 set if the current sim time should be used to determine the current lap time
// Bit 1 set if custom data channels should be requested
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)
int shiftRPM; // The RPM at which shift alerts should be displayed (iRacing only at this time)
int firstShiftLightRPM; // The RPM at which the first shift light should illuminate (iRacing only at this time)
int lastShiftLightRPM; // The RPM at which the last shift light should illuminate (iRacing only at this time)
int shiftLightBlinkRPM; // The RPM at which the shift lights should blink (iRacing only at this time)
char carName[64]; // The short name of the car (UTF-8)
char carDisplayName[64]; // The full name of the car (UTF-8)
char driverName[64]; // The name of the driver (UTF-8)
char trackName[64]; // The short name of the track (UTF-8)
char trackDisplayName[64]; // The full name of the track (UTF-8)
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) (UTF-8)
};

Requesting car telemetry (option 3):
The following data is returned:
Size: 968 bytes
struct {
unsigned char structTypeStatus; // First four bits (0-3) specify the type of this struct (1 = Z1Confirm; 2 = Z1SimData; 3 = Z1TelemetryData;
// 4 = Z1DriverData; 5 = Z1DriverPositions; 6 = Z1CustomDataChannelNames; 7 = Z1CustomDataChannelData)
// Second four bits (4-7) specify the status of the Server
// (1 = sim running; 2 = sim exited; 3 = Z1 server app exited; 4 = Sim paused)

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 params3; // Bits showing various parameters for the car
// Bit 0 set if ABS is active
// Bit 1 set if the engine is stalled
// Bit 2 set if the driver is on a joker lap
// Bit 3 set if push to pass is engaged
unsigned long packetID; // The current packet ID

unsigned long simTimeMS; // The current time within the sim in milliseconds - Used to calculate the current lap time if Z1Driver simOptions2 bit 0 is set
double lastLapTime; // The last lap time in seconds (xx.xxx)
double lastSectorTime; // The last sector time in seconds (xx.xxx)

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 cylinderHeadTemp; // The current cylinder head temp (in celcius)
float waterTemp; // The current water temp (in celsius)
float waterPress; // The current water pressure (in bar)
float waterLevel; // The current water level (in liters)
float oilTemp; // The current oil temp (in celsius)
float oilPress; // The current oil pressure (in bar)
float oilLevel; // The current oil level (in liters)
float speed; // The current speed (in m/s)
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 yaw; // Yaw orientation (in radians)
float pitch; // Pitch orientation (in radians)
float roll; // Roll orientation (in radians)
float yawRate; // Yaw rate (in radians/second)
float pitchRate; // Pitch rate (in radians/second)
float rollRate; // Roll rate (in radians/second)
float velocityZ; // Z velocity (in meters/second)
float velocityY; // Y velocity (in meters/second)
float velocityX; // X velocity (in meters/second)
float frontRollAngle; // The front roll angle (in radians)
float rearRollAngle; // The rear roll angle (in radians)

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 simTime; // The current time in the sim (seconds since midnight)

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 mgukDeployMode; // Current MGU-K deploy mode 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 tractionControl3Adj; // Current traction control 3 setting
float tractionControl4Adj; // Current traction control 4 setting
float tractionControlCutAdj; // In car traction control cut adjustment
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 brakeBiasFineAdj; // In car fine brake bias adjustment
float launchRPM; // The launch PRM value

float frontWingHeight; // Front wing height (meters)
float drag; // Drag
float frontDownforce; // Front downforce (meters)
float rearDownforce; // Rear downforce (meters)

float frontSplitterHeight; // Front splitter right height (meters)
float frontRideHeight; // Front ride height (meters)
float rearRideHeight; // Rear ride 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 tireLoadLF; // The tire load in newtons
float lateralForceLF; // The lateral force in newtons
float longitudinalForceLF; // The longitudinal force in newtons
float contactSlidingLF; // An approximation of what fraction of the contact patch is sliding (0.0 - 1.0)
float suspensionForceLF; // The suspension force in newtons
float lateralPatchVelLF; // Lateral velocity at contact patch (meters/second)
float longitudinalPatchVelLF; // Longitudinal velocity at contact patch (meters/second)
float lateralGroundVelLF; // Lateral velocity at contact patch (meters/second)
float longitudinalGroundVelLF; // Longitudinal velocity at contact patch (meters/second)
float toeLF; // Current toe angle with respect to the vehicle

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 tireLoadLR; // The tire load in newtons
float lateralForceLR; // The lateral force in newtons
float longitudinalForceLR; // The longitudinal force in newtons
float contactSlidingLR; // An approximation of what fraction of the contact patch is sliding (0.0 - 1.0)
float suspensionForceLR; // The suspension force in newtons
float lateralPatchVelLR; // Lateral velocity at contact patch (meters/second)
float longitudinalPatchVelLR; // Longitudinal velocity at contact patch (meters/second)
float lateralGroundVelLR; // Lateral velocity at contact patch (meters/second)
float longitudinalGroundVelLR; // Longitudinal velocity at contact patch (meters/second)
float toeLR; // Current toe angle with respect to the vehicle

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 tireLoadRF; // The tire load in newtons
float lateralForceRF; // The lateral force in newtons
float longitudinalForceRF; // The longitudinal force in newtons
float contactSlidingRF; // An approximation of what fraction of the contact patch is sliding (0.0 - 1.0)
float suspensionForceRF; // The suspension force in newtons
float lateralPatchVelRF; // Lateral velocity at contact patch (meters/second)
float longitudinalPatchVelRF; // Longitudinal velocity at contact patch (meters/second)
float lateralGroundVelRF; // Lateral velocity at contact patch (meters/second)
float longitudinalGroundVelRF; // Longitudinal velocity at contact patch (meters/second)
float toeRF; // Current toe angle with respect to the vehicle

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 tireLoadRR; // The tire load in newtons
float lateralForceRR; // The lateral force in newtons
float longitudinalForceRR; // The longitudinal force in newtons
float contactSlidingRR; // An approximation of what fraction of the contact patch is sliding (0.0 - 1.0)
float suspensionForceRR; // The suspension force in newtons
float lateralPatchVelRR; // Lateral velocity at contact patch (meters/second)
float longitudinalPatchVelRR; // Longitudinal velocity at contact patch (meters/second)
float lateralGroundVelRR; // Lateral velocity at contact patch (meters/second)
float longitudinalGroundVelRR; // Longitudinal velocity at contact patch (meters/second)
float toeRR; // Current toe angle with respect to the vehicle

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)
float ersDeployPercent; // The amount of ERS deployed this lap (0.0 - 1.0 as a percentage of the maximum allowed; -1 if unknown)
float ersBatteryPercentage; // The current battery charge as a percentage

int maxRPMAllowed; // The redline of the car
int carIdx; // The driver's car ID
int carClassID; // The driver's car class 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 (in milliseconds)

char teamIncidentCount; // the current team incident count
char myIncidentCount; // Your incident count
char driverIncidentCount; // The current team driver incident count
char jokerLapsRemain; // The number of joker laps remaining
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 totalSectors; // 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)
unsigned char drsCount; // The number of times the DRS has been activated;
unsigned char p2pCount; // The current count of push to pass

char sessionType[20]; // The type of session (practice, race, etc) (UTF-8)
char sessionState[20]; // The session state (warmup, parade laps, racing, etc.) (UTF-8)
};

Requesting competitor car data (option 4):
The following is returned:
Size: 360 bytes
struct {
unsigned char structTypeStatus; // First four bits (0-3) specify the type of this struct (1 = Z1Confirm; 2 = Z1SimData; 3 = Z1TelemetryData;
// 4 = Z1DriverData; 5 = Z1DriverPositions; 6 = Z1CustomDataChannelNames; 7 = Z1CustomDataChannelData)
// 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)

unsigned long packetID; // The current packet ID

double fastLapTime; // The fastest lap time in seconds (xx.xxx)
double lastLapTime; // The last lap time in seconds (xx.xxx)

char teamName[64]; // The name of this driver's team (UTF-8)
char driverName[64]; // The name of this driver (UTF-8)
char carName[64]; // The name of the car (UTF-8)
char carClassName[64]; // The name of the car's class (UTF-8)
char sRating[10]; // The driver's safety rating

char startPosition; // The starting position for this driver in the session
unsigned char params1; // Bits showing various parameters for the driver
// Bit 0 set if the driver is in the pit lane
// Bit 1 set if the driver is in their pit stall

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 carNumber; // The driver's car number
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)

char position; // The position in the session
char classPosition; // The position in class in the session
char driverIncidents; // The total number of incidents for this driver (iRacing)
char teamIncidents; // The total number of incicents for this team (iRacing)
};

Requesting competitor car locations (option 5):
The following is returned:
Size: 268 bytes
struct Z1DriverPositions {
unsigned char structTypeStatus; // First four bits (0-3) specify the type of this struct (1 = Z1Confirm; 2 = Z1SimData; 3 = Z1TelemetryData;
// 4 = Z1DriverData; 5 = Z1DriverPositions; 6 = Z1CustomDataChannelNames; 7 = Z1CustomDataChannelData)
// 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)
unsigned long packetID; // The current packet ID
float lapPercent[MAX_DRIVERS]; // the position on track of the specified driver (0-63)
int buttonAction; // The index of any button actions that happened
};





(c) zBlueSoftware 2023 | Partners | Discord | Contact Us | Privacy Policy