id: 061b4e71e2e34c4ea953c1894e8091b4
parent_id: 
item_type: 1
item_id: c6bd2c45938246fa9d61776deae9874b
item_updated_time: 1780733307541
title_diff: "[{\"diffs\":[[1,\"Project CARS 1 & 2 — UDP Telemetry Protocol Specification\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":57}]"
body_diff: "[{\"diffs\":[[1,\"# Project CARS 1 & 2 — UDP Telemetry Protocol Specification\\\n\\\n> Source: Verified against `leroythelegend/rough_idea_project_cars_cpp` C++ implementation and SMS official spec.  \\\n> Date researched: 2026-06-04\\\n\\\n---\\\n\\\n## Cross-References\\\n\\\n- **AC original protocol**: [Assetto Corsa — UDP Telemetry Protocol Specification](joplin://aed9f3be040943048273a16e05a8100f)\\\n- **ACC protocol**: [ACC — UDP Telemetry Protocol Specification](joplin://6ae7005d9810437093d63470cff98b59)\\\n- **AC EVO status**: [AC EVO — Telemetry Status & Research](joplin://2171d34ab9c1431ea3a979d30d206e23)\\\n- **AC Rally status**: [AC Rally — Telemetry Status & Research](joplin://b7b331aa87544b6ebe5db5b8d7bcd2a0)\\\n- **Main project plan**: [Sim Racing Telemetry Analysis Platform — Project Plan](joplin://6c0dcb2a567348fd9796f50c790082e4)\\\n\\\n---\\\n\\\n## 1. Overview\\\n\\\n| Property | PCARS 1 (Format 1) | PCARS 2 (Format 2) |\\\n|---|---|---|\\\n| **Default Port** | 5606 | 5606 |\\\n| **Format** | Binary, little-endian | Binary, little-endian |\\\n| **Update Rate** | ~10 Hz | Configurable (10/20/etc Hz) |\\\n| **Direction** | Game → Target IP:Port | Game → Target IP:Port |\\\n| **Binding** | Listener binds to port, game sends TO it | Same |\\\n| **Max Participants** | 56 | 32 |\\\n\\\nBoth games send UDP packets **to a configured IP:port**. You do NOT broadcast — you configure the target in-game.\\\n\\\n---\\\n\\\n## 2. Configuration\\\n\\\n### PCARS 1\\\n- In-game: **Options → Visual → UDP Protocol**\\\n- Set to \\\"Project CARS\\\" or \\\"Generic\\\" mode\\\n- Configure target IP and port (default 5606)\\\n\\\n### PCARS 2\\\n- In-game: **Options → System → UDP Protocol**\\\n- Select format: **1** = PCARS1-compatible, **2** = PCARS2 native (recommended)\\\n- Configure target IP, port, and update frequency\\\n- Config stored in game profile settings\\\n\\\n### Config File Locations\\\n- PCARS1: `Documents/C.A.M.S./Project CARS/settings.cfg`\\\n- PCARS2: `Documents/Project CARS 2/savegame/<profile>/race.bin` or via in-game menu\\\n\\\n---\\\n\\\n## 3. Packet Types\\\n\\\n### PCARS 1 (Format 1) — 3 Packet Types\\\n\\\n| Type ID | Name | Description |\\\n|---|---|---|\\\n| 0 | Telemetry Data | Main physics/telemetry packet (~1367 bytes) |\\\n| 1 | Participant Info Strings | Driver names (up to 56) |\\\n| 2 | Participant Info Strings Additional | Extra participant data |\\\n\\\n### PCARS 2 (Format 2) — 9 Packet Types\\\n\\\n| Type ID | Name | Sent? |\\\n|---|---|---|\\\n| 0 | Car Physics | Yes — main telemetry |\\\n| 1 | Race Definition | Yes |\\\n| 2 | Participants | Yes |\\\n| 3 | Timings | Yes |\\\n| 4 | Game State | Yes (includes weather) |\\\n| 5 | Weather State | No — merged into Game State |\\\n| 6 | Vehicle Names | No |\\\n| 7 | Time Stats | Yes |\\\n| 8 | Participant Vehicle Names | Yes |\\\n\\\n---\\\n\\\n## 4. PCARS 1 (Format 1) — Telemetry Packet Byte Structure\\\n\\\nTotal size: **1367 bytes**\\\n\\\n### Header (3 bytes)\\\n\\\n| Offset | Size | Type | Field | Notes |\\\n|---|---|---|---|---|\\\n| 0 | 2 | uint16_le | build_version | e.g. 1104 |\\\n| 2 | 1 | packed uint8 | sequence_number (MSB 6 bits) + packet_type (LSB 2 bits) | seq 0-63, type 0-2 |\\\n\\\n### Session & State (3 bytes)\\\n\\\n| Offset | Size | Type | Field | Notes |\\\n|---|---|---|---|---|\\\n| 3 | 1 | packed uint8 | session_state (MSB 3 bits) + game_state (LSB 3 bits) | See enums below |\\\n| 4 | 1 | int8 | viewed_participant_index | |\\\n| 5 | 1 | int8 | num_participants | |\\\n\\\n### Inputs (4 bytes)\\\n\\\n| Offset | Size | Type | Field |\\\n|---|---|---|---|\\\n| 6 | 1 | uint8 | unfiltered_throttle | 0-255 |\\\n| 7 | 1 | uint8 | unfiltered_brake | 0-255 |\\\n| 8 | 1 | int8 | unfiltered_steering | -127 to 127 |\\\n| 9 | 1 | uint8 | unfiltered_clutch | 0-255 |\\\n\\\n### Race Info (2 bytes)\\\n\\\n| Offset | Size | Type | Field |\\\n|---|---|---|---|\\\n| 10 | 1 | packed uint8 | race_state_flags (LSB 3 bits) |\\\n| 11 | 1 | uint8 | laps_in_event |\\\n\\\n### Timing (88 bytes — 22 × float32)\\\n\\\n| Offset | Size | Type | Field |\\\n|---|---|---|---|\\\n| 12 | 4 | float32_le | best_lap_time |\\\n| 16 | 4 | float32_le | last_lap_time |\\\n| 20 | 4 | float32_le | current_time |\\\n| 24 | 4 | float32_le | split_time_ahead |\\\n| 28 | 4 | float32_le | split_time_behind |\\\n| 32 | 4 | float32_le | split_time |\\\n| 36 | 4 | float32_le | event_time_remaining |\\\n| 40 | 4 | float32_le | personal_fastest_lap_time |\\\n| 44 | 4 | float32_le | world_fastest_lap_time |\\\n| 48 | 4 | float32_le | current_sector1_time |\\\n| 52 | 4 | float32_le | current_sector2_time |\\\n| 56 | 4 | float32_le | current_sector3_time |\\\n| 60 | 4 | float32_le | fastest_sector1_time |\\\n| 64 | 4 | float32_le | fastest_sector2_time |\\\n| 68 | 4 | float32_le | fastest_sector3_time |\\\n| 72 | 4 | float32_le | personal_fastest_sector1_time |\\\n| 76 | 4 | float32_le | personal_fastest_sector2_time |\\\n| 80 | 4 | float32_le | personal_fastest_sector3_time |\\\n| 84 | 4 | float32_le | world_fastest_sector1_time |\\\n| 88 | 4 | float32_le | world_fastest_sector2_time |\\\n| 92 | 4 | float32_le | world_fastest_sector3_time |\\\n\\\n### Flags & Pit (3 bytes)\\\n\\\n| Offset | Size | Type | Field |\\\n|---|---|---|---|\\\n| 96 | 2 | uint16_le | joy_pad |\\\n| 98 | 1 | packed | highest_flag_colour (MSB 2 bits) + highest_flag_reason (LSB 3 bits) |\\\n| 99 | 1 | packed | pit_schedule (MSB 2 bits) + pit_mode (LSB 3 bits) |\\\n\\\n### Engine & Fuel (18 bytes)\\\n\\\n| Offset | Size | Type | Field |\\\n|---|---|---|---|\\\n| 100 | 2 | int16_le | oil_temp_celsius |\\\n| 102 | 2 | uint16_le | oil_pressure_kpa |\\\n| 104 | 2 | int16_le | water_temp_celsius |\\\n| 106 | 2 | uint16_le | water_pressure_kpa |\\\n| 108 | 2 | uint16_le | fuel_pressure_kpa |\\\n| 110 | 1 | uint8 | car_flags |\\\n| 111 | 1 | uint8 | fuel_capacity |\\\n| 112 | 1 | uint8 | brake | 0-255 |\\\n| 113 | 1 | uint8 | throttle | 0-255 |\\\n| 114 | 1 | uint8 | clutch | 0-255 |\\\n| 115 | 1 | int8 | steering | -127 to 127 |\\\n\\\n### Vehicle Dynamics (16 bytes)\\\n\\\n| Offset | Size | Type | Field |\\\n|---|---|---|---|\\\n| 116 | 4 | float32_le | fuel_level |\\\n| 120 | 4 | float32_le | speed |\\\n| 124 | 2 | uint16_le | rpm |\\\n| 126 | 2 | uint16_le | max_rpm |\\\n| 128 | 1 | packed uint8 | num_gears (MSB 4 bits) + gear (LSB 4 bits) |\\\n| 129 | 1 | uint8 | boost_amount |\\\n| 130 | 1 | int8 | enforced_pit_stop_lap |\\\n| 131 | 1 | packed uint8 | crash_state (LSB 3 bits) |\\\n| 132 | 4 | float32_le | odometer_km |\\\n\\\n### Vectors — 7 × 3 floats = 84 bytes\\\n\\\n| Offset | Size | Type | Field |\\\n|---|---|---|---|\\\n| 136 | 12 | 3 × float32_le | orientation (pitch, yaw, roll) |\\\n| 148 | 12 | 3 × float32_le | local_velocity |\\\n| 160 | 12 | 3 × float32_le | world_velocity |\\\n| 172 | 12 | 3 × float32_le | angular_velocity |\\\n| 184 | 12 | 3 × float32_le | local_acceleration |\\\n| 196 | 12 | 3 × float32_le | world_acceleration |\\\n| 208 | 12 | 3 × float32_le | extents_centre |\\\n\\\n### Tyres & Suspension — Per-wheel data (4 wheels: FL, FR, RL, RR)\\\n\\\n| Offset | Size | Type | Field |\\\n|---|---|---|---|\\\n| 220 | 4 | 4 × uint8 | tyre_flags |\\\n| 224 | 4 | 4 × uint8 | terrain |\\\n| 228 | 16 | 4 × float32_le | tyre_y |\\\n| 244 | 16 | 4 × float32_le | tyre_rps |\\\n| 260 | 16 | 4 × float32_le | tyre_slip_speed |\\\n| 276 | 4 | 4 × uint8 | tyre_temp |\\\n| 280 | 4 | 4 × uint8 | tyre_grip |\\\n| 284 | 16 | 4 × float32_le | tyre_height_above_ground |\\\n| 300 | 16 | 4 × float32_le | tyre_lateral_stiffness |\\\n| 316 | 4 | 4 × uint8 | tyre_wear |\\\n| 320 | 4 | 4 × uint8 | brake_damage |\\\n| 324 | 4 | 4 × uint8 | suspension_damage |\\\n| 328 | 8 | 4 × int16_le | brake_temp_celsius |\\\n| 336 | 8 | 4 × uint16_le | tyre_tread_temp |\\\n| 344 | 8 | 4 × uint16_le | tyre_layer_temp |\\\n| 352 | 8 | 4 × uint16_le | tyre_carcass_temp |\\\n| 360 | 8 | 4 × uint16_le | tyre_rim_temp |\\\n| 368 | 8 | 4 × uint16_le | tyre_internal_air_temp |\\\n| 376 | 16 | 4 × float32_le | wheel_local_position_y |\\\n| 392 | 16 | 4 × float32_le | ride_height |\\\n| 408 | 16 | 4 × float32_le | suspension_travel |\\\n| 424 | 16 | 4 × float32_le | suspension_velocity |\\\n| 440 | 8 | 4 × uint16_le | air_pressure |\\\n\\\n### Engine & Weather (14 bytes)\\\n\\\n| Offset | Size | Type | Field |\\\n|---|---|---|---|\\\n| 448 | 4 | float32_le | engine_speed |\\\n| 452 | 4 | float32_le | engine_torque |\\\n| 456 | 1 | uint8 | aero_damage |\\\n| 457 | 1 | uint8 | engine_damage |\\\n| 458 | 1 | int8 | ambient_temperature |\\\n| 459 | 1 | int8 | track_temperature |\\\n| 460 | 1 | uint8 | rain_density |\\\n| 461 | 1 | int8 | wind_speed |\\\n| 462 | 1 | int8 | wind_direction_x |\\\n| 463 | 1 | int8 | wind_direction_y |\\\n\\\n### Participant Info (56 entries × 16 bytes = 896 bytes)\\\n\\\nEach participant entry (16 bytes):\\\n\\\n| Sub-Offset | Size | Type | Field |\\\n|---|---|---|---|\\\n| 0 | 6 | 3 × int16_le | world_position (x, y, z) |\\\n| 6 | 2 | uint16_le | current_lap_distance |\\\n| 8 | 1 | packed uint8 | is_active (MSB 1 bit) + race_position (7 bits) |\\\n| 9 | 1 | packed uint8 | lap_invalidated (MSB 1 bit) + laps_completed (7 bits) |\\\n| 10 | 1 | uint8 | current_lap |\\\n| 11 | 1 | packed uint8 | same_class (1 bit) + sector (2 bits) + ? (2 bits) + ? (3 bits) |\\\n| 12 | 4 | float32_le | last_sector_time |\\\n\\\n56 entries at offset 464: [464, 1360)\\\n\\\n### Trailer (7 bytes)\\\n\\\n| Offset | Size | Type | Field |\\\n|---|---|---|---|\\\n| 1360 | 4 | float32_le | track_length |\\\n| 1364 | 2 | 2 × uint8 | wings (front, rear) |\\\n| 1366 | 1 | uint8 | dpad |\\\n\\\n**Total PCARS 1 Telemetry Packet: 1367 bytes**\\\n\\\n---\\\n\\\n## 5. PCARS 2 (Format 2) — Car Physics Packet Byte Structure\\\n\\\nTotal size: **559 bytes**\\\n\\\n### Base Header (12 bytes — all Format 2 packets share this)\\\n\\\n| Offset | Size | Type | Field | Notes |\\\n|---|---|---|---|---|\\\n| 0 | 4 | uint32_le | packet_number | Incrementing counter |\\\n| 4 | 4 | uint32_le | category_packet_number | |\\\n| 8 | 1 | uint8 | partial_packet_index | For multi-packet messages |\\\n| 9 | 1 | uint8 | partial_packet_number | |\\\n| 10 | 1 | uint8 | packet_type | 0=Car Physics, 1=Race Def, etc. |\\\n| 11 | 1 | uint8 | packet_version | |\\\n\\\n### Inputs (5 bytes)\\\n\\\n| Offset | Size | Type | Field |\\\n|---|---|---|---|\\\n| 12 | 1 | int8 | viewed_participant_index |\\\n| 13 | 1 | uint8 | unfiltered_throttle | 0-255 |\\\n| 14 | 1 | uint8 | unfiltered_brake | 0-255 |\\\n| 15 | 1 | int8 | unfiltered_steering | -127 to 127 |\\\n| 16 | 1 | uint8 | unfiltered_clutch | 0-255 |\\\n\\\n### Engine & Fuel (22 bytes)\\\n\\\n| Offset | Size | Type | Field |\\\n|---|---|---|---|\\\n| 17 | 1 | uint8 | car_flags |\\\n| 18 | 2 | int16_le | oil_temp_celsius |\\\n| 20 | 2 | uint16_le | oil_pressure_kpa |\\\n| 22 | 2 | int16_le | water_temp_celsius |\\\n| 24 | 2 | uint16_le | water_pressure_kpa |\\\n| 26 | 2 | uint16_le | fuel_pressure_kpa |\\\n| 28 | 1 | uint8 | fuel_capacity |\\\n| 29 | 1 | uint8 | brake |\\\n| 30 | 1 | uint8 | throttle |\\\n| 31 | 1 | uint8 | clutch |\\\n| 32 | 4 | float32_le | fuel_level |\\\n| 36 | 4 | float32_le | speed |\\\n| 40 | 2 | uint16_le | rpm |\\\n| 42 | 2 | uint16_le | max_rpm |\\\n| 44 | 1 | int8 | steering |\\\n| 45 | 1 | packed uint8 | num_gears (MSB 4 bits) + gear (LSB 4 bits) |\\\n| 46 | 1 | uint8 | boost_amount |\\\n| 47 | 1 | uint8 | crash_state |\\\n| 48 | 4 | float32_le | odometer_km |\\\n\\\n### Vectors — 7 × 3 floats = 84 bytes\\\n\\\n| Offset | Size | Type | Field |\\\n|---|---|---|---|\\\n| 52 | 12 | 3 × float32_le | orientation |\\\n| 64 | 12 | 3 × float32_le | local_velocity |\\\n| 76 | 12 | 3 × float32_le | world_velocity |\\\n| 88 | 12 | 3 × float32_le | angular_velocity |\\\n| 100 | 12 | 3 × float32_le | local_acceleration |\\\n| 112 | 12 | 3 × float32_le | world_acceleration |\\\n| 124 | 12 | 3 × float32_le | extents_centre |\\\n\\\n### Tyres & Suspension (4 wheels: FL, FR, RL, RR)\\\n\\\n| Offset | Size | Type | Field |\\\n|---|---|---|---|\\\n| 136 | 4 | 4 × uint8 | tyre_flags |\\\n| 140 | 4 | 4 × uint8 | terrain |\\\n| 144 | 16 | 4 × float32_le | tyre_y |\\\n| 160 | 16 | 4 × float32_le | tyre_rps |\\\n| 176 | 4 | 4 × uint8 | tyre_temp |\\\n| 180 | 16 | 4 × float32_le | tyre_height_above_ground |\\\n| 196 | 4 | 4 × uint8 | tyre_wear |\\\n| 200 | 4 | 4 × uint8 | brake_damage |\\\n| 204 | 4 | 4 × uint8 | suspension_damage |\\\n| 208 | 8 | 4 × int16_le | brake_temp_celsius |\\\n| 216 | 8 | 4 × uint16_le | tyre_tread_temp |\\\n| 224 | 8 | 4 × uint16_le | tyre_layer_temp |\\\n| 232 | 8 | 4 × uint16_le | tyre_carcass_temp |\\\n| 240 | 8 | 4 × uint16_le | tyre_rim_temp |\\\n| 248 | 8 | 4 × uint16_le | tyre_internal_air_temp |\\\n| 256 | 8 | 4 × uint16_le | tyre_temp_left |\\\n| 264 | 8 | 4 × uint16_le | tyre_temp_center |\\\n| 272 | 8 | 4 × uint16_le | tyre_temp_right |\\\n| 280 | 16 | 4 × float32_le | wheel_local_position_y |\\\n| 296 | 16 | 4 × float32_le | ride_height |\\\n| 312 | 16 | 4 × float32_le | suspension_travel |\\\n| 328 | 16 | 4 × float32_le | suspension_velocity |\\\n| 344 | 8 | 4 × uint16_le | suspension_ride_height |\\\n| 352 | 8 | 4 × uint16_le | air_pressure |\\\n\\\n### Engine & Misc (25 bytes)\\\n\\\n| Offset | Size | Type | Field |\\\n|---|---|---|---|\\\n| 360 | 4 | float32_le | engine_speed |\\\n| 364 | 4 | float32_le | engine_torque |\\\n| 368 | 2 | 2 × uint8 | wings (front, rear) |\\\n| 370 | 1 | uint8 | handbrake |\\\n| 371 | 1 | uint8 | aero_damage |\\\n| 372 | 1 | uint8 | engine_damage |\\\n| 373 | 4 | uint32_le | joy_pad_0 |\\\n| 377 | 1 | uint8 | d_pad |\\\n| 378 | 160 | 4 × char[40] | tyre_compound (4 strings × 40 chars) |\\\n| 538 | 4 | float32_le | turbo_boost_pressure |\\\n| 542 | 12 | 3 × float32_le | full_position (x, y, z) |\\\n| 554 | 1 | uint8 | brake_bias |\\\n| 555 | 4 | uint32_le | tick_count |\\\n\\\n**Total PCARS 2 Car Physics Packet: 559 bytes**\\\n\\\n---\\\n\\\n## 6. PCARS 2 (Format 2) — Game State Packet (Type 4)\\\n\\\n### Base Header (12 bytes) — same as above\\\nPlus:\\\n\\\n| Offset | Size | Type | Field |\\\n|---|---|---|---|\\\n| 12 | 2 | uint16_le | build_version |\\\n| 14 | 1 | packed uint8 | game_state (MSB 3 bits) + session_state (LSB 3 bits) |\\\n| 15 | 1 | int8 | ambient_temperature |\\\n| 16 | 1 | int8 | track_temperature |\\\n| 17 | 1 | uint8 | rain_density |\\\n| 18 | 1 | uint8 | snow_density |\\\n| 19 | 1 | int8 | wind_speed |\\\n| 20 | 1 | int8 | wind_direction_x |\\\n| 21 | 1 | int8 | wind_direction_y |\\\n\\\nTotal: ~22 bytes\\\n\\\n---\\\n\\\n## 7. PCARS 2 (Format 2) — Timing Packet (Type 3)\\\n\\\n### Base Header (12 bytes) — same as above\\\nPlus:\\\n\\\n| Offset | Size | Type | Field |\\\n|---|---|---|---|\\\n| 12 | 1 | int8 | num_participants |\\\n| 13 | 4 | uint32_le | participants_changed_timestamp |\\\n| 17 | 4 | float32_le | event_time_remaining |\\\n| 21 | 4 | float32_le | split_time_ahead |\\\n| 25 | 4 | float32_le | split_time_behind |\\\n| 29 | 4 | float32_le | split_time |\\\n| 33 | N/A | 32 × participant_info | participants (32 entries × 32 bytes = 1024 bytes) |\\\n| 1057 | 2 | uint16_le | local_participant_index |\\\n| 1059 | 4 | uint32_le | tick_count |\\\n\\\n### V2 Participant Info Entry (32 bytes each)\\\n\\\n| Sub-Offset | Size | Type | Field |\\\n|---|---|---|---|\\\n| 0 | 6 | 3 × int16_le | world_position |\\\n| 6 | 6 | 3 × int16_le | orientation |\\\n| 12 | 2 | uint16_le | current_lap_distance |\\\n| 14 | 1 | packed uint8 | is_active (MSB 1 bit) + race_position (7 bits) |\\\n| 15 | 1 | packed uint8 | sector (MSB 4 bits) + ? (LSB 4 bits) |\\\n| 16 | 1 | packed uint8 | highest_flag_colour (MSB 3 bits) + highest_flag_reason (LSB 3 bits) |\\\n| 17 | 1 | packed uint8 | pit_mode (MSB 4 bits) + pit_schedule (LSB 4 bits) |\\\n| 18 | 2 | packed uint16 | car_index (MSB 1 bit = local_player) + value (15 bits) |\\\n| 20 | 1 | packed uint8 | race_state (MSB 1 bit = invalid_lap) + value |\\\n| 21 | 1 | uint8 | current_lap |\\\n| 22 | 4 | float32_le | current_time |\\\n| 26 | 4 | float32_le | current_sector_time |\\\n| 30 | 2 | uint16_le | mp_participant_index |\\\n\\\n---\\\n\\\n## 8. Enumerations\\\n\\\n### Game State\\\n```\\\n0 = GAME_EXITED\\\n1 = GAME_FRONT_END\\\n2 = GAME_INGAME_PLAYING\\\n3 = GAME_INGAME_PAUSED\\\n4 = GAME_INGAME_INMENU_TIME_TICKING (V2 only)\\\n5 = GAME_INGAME_RESTARTING (V2 only)\\\n6 = GAME_INGAME_REPLAY (V2 only)\\\n7 = GAME_FRONT_END_REPLAY (V2 only)\\\n```\\\n\\\n### Session State\\\n```\\\n0 = SESSION_INVALID\\\n1 = SESSION_PRACTICE\\\n2 = SESSION_TEST\\\n3 = SESSION_QUALIFY\\\n4 = SESSION_FORMATION_LAP\\\n5 = SESSION_RACE\\\n6 = SESSION_TIME_ATTACK\\\n```\\\n\\\n### Race State\\\n```\\\n0 = RACESTATE_INVALID\\\n1 = RACESTATE_NOT_STARTED\\\n2 = RACESTATE_RACING\\\n3 = RACESTATE_FINISHED\\\n4 = RACESTATE_DISQUALIFIED\\\n5 = RACESTATE_RETIRED\\\n6 = RACESTATE_DNF\\\n```\\\n\\\n### Flag Colour\\\n```\\\n0 = NONE\\\n1 = GREEN\\\n2 = BLUE\\\n3 = WHITE\\\n4 = YELLOW\\\n5 = DOUBLE_YELLOW\\\n6 = BLACK\\\n7 = CHEQUERED\\\n```\\\n\\\n### Pit Mode (V1)\\\n```\\\n0 = PIT_MODE_NONE\\\n1 = PIT_MODE_DRIVING_INTO_PITS\\\n2 = PIT_MODE_IN_PIT\\\n3 = PIT_MODE_DRIVING_OUT_OF_PITS\\\n4 = PIT_MODE_IN_GARAGE\\\n```\\\n\\\n### Pit Schedule (V2)\\\n```\\\n0 = PIT_SCHEDULE_NONE\\\n1 = PIT_SCHEDULE_PLAYER_REQUESTED\\\n2 = PIT_SCHEDULE_ENGINEER_REQUESTED\\\n3 = PIT_SCHEDULE_DAMAGE_REQUESTED\\\n4 = PIT_SCHEDULE_MANDATORY\\\n5 = PIT_SCHEDULE_DRIVE_THROUGH\\\n6 = PIT_SCHEDULE_STOP_GO\\\n7 = PIT_SCHEDULE_PITSPOT_OCCUPIED\\\n```\\\n\\\n### Car Flags (bitmask)\\\n```\\\nbit 0 = CAR_HEADLIGHT\\\nbit 1 = CAR_ENGINE_ACTIVE\\\nbit 2 = CAR_ENGINE_WARNING\\\nbit 3 = CAR_SPEED_LIMITER\\\nbit 4 = CAR_ABS\\\nbit 5 = CAR_HANDBRAKE\\\nbit 6 = CAR_STABILITY\\\nbit 7 = CAR_TRACTION_CONTROL\\\n```\\\n\\\n### Crash State\\\n```\\\n0 = CRASH_DAMAGE_NONE\\\n1 = CRASH_DAMAGE_OFFTRACK\\\n2 = CRASH_DAMAGE_LARGE_PROP\\\n3 = CRASH_DAMAGE_SPINNING\\\n4 = CRASH_DAMAGE_ROLLING\\\n```\\\n\\\n---\\\n\\\n## 9. Key Differences Between PCARS 1 and PCARS 2\\\n\\\n| Feature | PCARS 1 | PCARS 2 |\\\n|---|---|---|\\\n| Header | 3 bytes (u16 + packed u8) | 12 bytes (2×u32 + 4×u8) |\\\n| Packet types | 3 | 9 |\\\n| Timing data | In telemetry packet | Separate Timings packet (type 3) |\\\n| Weather data | In telemetry packet | Separate Game State packet (type 4) |\\\n| Participant info | In telemetry packet (56 × 16 bytes) | Separate Participants/Timings packets (32 × 32 bytes) |\\\n| Tyre compound | Not present | 4 × 40-char strings in telemetry |\\\n| Turbo boost pressure | Not present | Present (f32) |\\\n| Full 3D position | Not present | Present (3 × f32) |\\\n| Brake bias | Not present | Present (u8) |\\\n| Tick count | Not present | Present (u32) |\\\n| Handbrake | Not present | Present (u8) |\\\n| Suspension ride height | Not present | Present (4 × u16) |\\\n| Tyre temp L/C/R | Not present | Present (3 × 4 × u16) |\\\n| Snow density | Not present | In Game State packet |\\\n| Tyre slip speed | Present (4 × f32) | Not present |\\\n| Tyre grip | Present (4 × u8) | Not present |\\\n| Tyre lateral stiffness | Present (4 × f32) | Not present |\\\n\\\n---\\\n\\\n## 10. Rust Implementation Notes\\\n\\\n### Detection Strategy\\\n1. Read first 2 bytes as `u16_le` — if **≥ 3** bytes of header, check byte 2 for packed data\\\n2. If packet size ~1367 → PCARS 1 telemetry\\\n3. If packet starts with 12-byte base header → PCARS 2; read `packet_type` at offset 10\\\n\\\n### Recommended Port for rusty-telemetry\\\n| Port | Use |\\\n|---|---|\\\n| 5606 | PCARS/PCARS2 primary telemetry |\\\n\\\n### Parser Pseudocode\\\n```rust\\\nfn parse_packet(data: &[u8]) -> Result<Packet> {\\\n    if data.len() >= 12 {\\\n        let packet_number = u32_le(data, 0);\\\n        let packet_type = data[10];\\\n        // PCARS 2 format\\\n        match packet_type {\\\n            0 => parse_car_physics(data),\\\n            3 => parse_timings(data),\\\n            4 => parse_game_state(data),\\\n            // ...\\\n        }\\\n    } else if data.len() >= 3 {\\\n        let build_version = u16_le(data, 0);\\\n        let seq_type = data[2];\\\n        let packet_type = seq_type & 0x03;\\\n        // PCARS 1 format\\\n        match packet_type {\\\n            0 => parse_telemetry_v1(data),\\\n            1 => parse_participant_strings(data),\\\n            2 => parse_participant_strings_additional(data),\\\n        }\\\n    }\\\n}\\\n```\\\n\\\n---\\\n\\\n## 11. Reference Implementation\\\n\\\n- **C++ decoder**: `https://github.com/leroythelegend/rough_idea_project_cars_cpp`\\\n- Key files: `inc/packettelemetrydatav1.h`, `inc/packettelemetrydata.h`, `inc/packetbase.h`, `inc/consts.h`\\\n- Source files: `src/packettelemetrydatav1.cpp`, `src/packettelemetrydata.cpp`\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":18981}]"
metadata_diff: {"new":{"id":"c6bd2c45938246fa9d61776deae9874b","parent_id":"55866206478b4d37aafd7c426d5eab91","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1780557267324,"markup_language":1,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2026-06-06T08:14:09.643Z
created_time: 2026-06-06T08:14:09.643Z
type_: 13