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.10.2 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-6)
};

Note for the version all submissions should be three digits and should not use any decimal points.
So version 1.10.2 would be sent as 1102 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 {
int structType; // 1 = Z1Driver; 2 = Z1CarData; 3 = Z1DriverData; 4 = Z1DriverPositions
int status; // The status of the app; 1=okay; 2=sim exited;3=Z1 server app exited
unsigned long packetID; // The current packet ID
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 (in the z1 folders)
char sessionType[64]; // The type of session (practice, race, etc)
float trackLength; // The length of the track in meters
float pitSpeedLimit; // The pit lane speed limit in kph (0 if not known)
unsigned char registered; // 0 if not registered; 1 if registered as a private user; 2 if registered as a commercial user
bool simHasWheelSpeed; // True if the sim reports wheel speed
bool simHasWheelRPS; // True if the sim reports wheel RPS
bool simHasFuelPress; // True if the sim reports fuel pressure
bool simHasOilTemp; // True if the sim reports oil temperature
bool simHasWaterTemp; // True if the sim reports water temperature
};

Requesting car telemetry (option 3):
The following data is returned:
struct {
bool inCar; // True if the driver is in the car
bool blueFlag; // True if the blue flag is displayed to the driver
bool yellowFlag; // True if the yellow flag is showing
bool localYellowFlag; // True if a local yellow flag is showing
bool inPitStall; // True if the driver is in their pits stall
bool inPitLane; // True if the driver is in the pit lane
bool newLap; // True if a new lap just began
bool unlimitedLaps; // True if there are unlimited laps allowed in the session
bool isRace; // True if this is a race session
bool timedEvent; // True if this is a timed event
bool gotInCar; // True if the driver just got in the car

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
bool dynamic; // True if weather is dynamic (changable)
int skies; // The type of skies (0=clear;1=partly cloudy;2=mostly cloudy;3=overcast)
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

bool pitLimiter; // True if the pit limiter is engaged
bool revLimiter; // True if the rev limiter is engaged
bool waterTempWarning; // True if there is a water temperature warning
bool oilPressureWarning; // True if there is an oil pressure warning
bool fuelPressureWarning; // True if there is a fuel pressure warning

float rpm; // The current RPM of the engine
float maxRPMReached; // The maximum RPM the engine has reached in the session
float waterTemp; // The current water temp (in celcius)
float waterPress; // The current water pressure (in bar)
float oilPress; // The current oil pressure (in bar)
float oilTemp; // current oil temp (in celcius)
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 lastLapTime; // The last lap time in seconds
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 (celcius)
float middleTempLF; // Middle surface temp (celcius)
float outerTempLF; // Outer surface temp (celcius)
float innerCTempLF; // Inner carcass temp (celcius)
float middleCTempLF; // Middle carcass temp (celcius)
float outerCTempLF; // Outer carcass temp (celcius)
float pressureLF; // 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 (celcius)
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 (celcius)
float middleTempLR; // Middle surface temp (celcius)
float outerTempLR; // Outer surface temp (celcius)
float innerCTempLR; // Inner carcass temp (celcius)
float middleCTempLR; // Middle carcass temp (celcius)
float outerCTempLR; // Outer carcass temp (celcius)
float pressureLR; // 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 (celcius)
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 (celcius)
float middleTempRF; // Middle surface temp (celcius)
float outerTempRF; // Outer surface temp (celcius)
float innerCTempRF; // Inner carcass temp (celcius)
float middleCTempRF; // Middle carcass temp (celcius)
float outerCTempRF; // Outer carcass temp (celcius)
float pressureRF; // 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 (celcius)
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 (celcius)
float middleTempRR; // Middle surface temp (celcius)
float outerTempRR; // Outer surface temp (celcius)
float innerCTempRR; // Inner carcass temp (celcius)
float middleCTempRR; // Middle carcass temp (celcius)
float outerCTempRR; // Outer carcass temp (celcius)
float pressureRR; // 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 (celcius)
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

int structType; // 1 = Z1Driver; 2 = Z1CarData; 3 = Z1DriverData; 4 = Z1DriverPositions
int status; // The status of the app; 1=okay;2=sim exited;3=Z1 server app exited
int gear; // The current gear (-1 = R; 0 = N; 1,2,3...)
int maxRevsAllowed; // The redline of the car
int carIdx; // The driver's car ID
int position; // The driver's current position in the session
int currentSector; // The current sector (zero based)
int totalSplits; // The total number of sectors in the lap
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 trackSurface; // 0 = Off Track, 1 = In Pit Stall, 2 = Approaching Pits, 3 = On Track
int drsStatus; // 0 = inactive; 1 = avaiable at next zone; 2 = available and in zone; 3 = active
int sessionNum; // The session number

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

Requesting competitor car data (option 4):
The following is returned:
struct {
int structType; // 1 = Z1Driver; 2 = Z1CarData; 3 = Z1DriverData; 4 = Z1DriverPositions
int status; // The status of the app; 1=okay;2=sim exited;3=Z1 server app exited
unsigned long packetID; // The current packet ID
int maxDriverIndex; // The total number of drivers that have registered
int driverIndex; // The index of the current driver being sent
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
int carClassID; // The car class ID
float fastLapTime; // The fastest lap time
float lastLapTime; // The last lap time
float lapPercent; // The position on track
char driverName[64]; // The name of this driver
char carName[10]; // The name of the car
char sRating[10]; // The driver's safety rating
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)
int location; // The location of the car
int buttonAction; // The index of any button actions that happened
};

Requesting competitor car locations (option 5):
The following is returned:
struct Z1DriverPositions {
int structType; // 1 = Z1Driver; 2 = Z1CarData; 3 = Z1DriverData; 4 = Z1DriverPositions
int status; // The status of the app; 1=okay;2=sim exited;3=Z1 server app exited
unsigned long packetID; // The current packet ID
int maxDriverIndex; // The total number of drivers that have registered
float lapPercent1; // The position on track of driver 1
float lapPercent2; // The position on track of driver 2
float lapPercent3; // The position on track of driver 3
float lapPercent4; // The position on track of driver 4
float lapPercent5; // The position on track of driver 5
float lapPercent6; // The position on track of driver 6
float lapPercent7; // The position on track of driver 7
float lapPercent8; // The position on track of driver 8
float lapPercent9; // The position on track of driver 9
float lapPercent10; // The position on track of driver 10
float lapPercent11; // The position on track of driver 11
float lapPercent12; // The position on track of driver 12
float lapPercent13; // The position on track of driver 13
float lapPercent14; // The position on track of driver 14
float lapPercent15; // The position on track of driver 15
float lapPercent16; // The position on track of driver 16
float lapPercent17; // The position on track of driver 17
float lapPercent18; // The position on track of driver 18
float lapPercent19; // The position on track of driver 19
float lapPercent20; // The position on track of driver 20
float lapPercent21; // The position on track of driver 21
float lapPercent22; // The position on track of driver 22
float lapPercent23; // The position on track of driver 23
float lapPercent24; // The position on track of driver 24
float lapPercent25; // The position on track of driver 25
float lapPercent26; // The position on track of driver 26
float lapPercent27; // The position on track of driver 27
float lapPercent28; // The position on track of driver 28
float lapPercent29; // The position on track of driver 29
float lapPercent30; // The position on track of driver 30
float lapPercent31; // The position on track of driver 31
float lapPercent32; // The position on track of driver 32
float lapPercent33; // The position on track of driver 33
float lapPercent34; // The position on track of driver 34
float lapPercent35; // The position on track of driver 35
float lapPercent36; // The position on track of driver 36
float lapPercent37; // The position on track of driver 37
float lapPercent38; // The position on track of driver 38
float lapPercent39; // The position on track of driver 39
float lapPercent40; // The position on track of driver 40
float lapPercent41; // The position on track of driver 41
float lapPercent42; // The position on track of driver 42
float lapPercent43; // The position on track of driver 43
float lapPercent44; // The position on track of driver 44
float lapPercent45; // The position on track of driver 45
float lapPercent46; // The position on track of driver 46
float lapPercent47; // The position on track of driver 47
float lapPercent48; // The position on track of driver 48
float lapPercent49; // The position on track of driver 49
float lapPercent50; // The position on track of driver 50
float lapPercent51; // The position on track of driver 51
float lapPercent52; // The position on track of driver 52
float lapPercent53; // The position on track of driver 53
float lapPercent54; // The position on track of driver 54
float lapPercent55; // The position on track of driver 55
float lapPercent56; // The position on track of driver 56
float lapPercent57; // The position on track of driver 57
float lapPercent58; // The position on track of driver 58
float lapPercent59; // The position on track of driver 59
float lapPercent60; // The position on track of driver 60
float lapPercent61; // The position on track of driver 61
float lapPercent62; // The position on track of driver 62
float lapPercent63; // The position on track of driver 63
float lapPercent64; // The position on track of driver 64
int buttonAction; // The index of any button actions that happened
};





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