hexagram/include/hexagram/telemetry/dash.h

86 lines
1.8 KiB
C
Raw Normal View History

2023-12-17 21:28:40 -05:00
#ifndef _HEXAGRAM_TELEMETRY_DASH_H
#define _HEXAGRAM_TELEMETRY_DASH_H
#include <inttypes.h>
#include <hexagram/types.h>
#pragma pack(push)
#pragma pack(1)
2023-12-17 21:28:40 -05:00
typedef struct _hexagram_telemetry_dash_car {
int32_t id,
class,
performance_index,
drivetrain_type,
engine_cylinders;
hexagram_coord position;
float speed, power, torque;
hexagram_corner tire_temp;
float boost,
fuel,
odometer;
2023-12-17 21:28:40 -05:00
} hexagram_telemetry_dash_car;
2023-12-17 21:28:40 -05:00
typedef struct _hexagram_telemetry_dash_race {
float lap_best,
lap_last,
lap_current,
race_time_current;
uint16_t lap_number;
uint8_t race_position,
throttle,
2024-01-09 16:47:09 -05:00
brake,
clutch,
handbrake,
gear;
int8_t steer,
normalized_driving_line,
normalized_ai_brake_difference;
hexagram_corner tire_wear;
int32_t track_id;
2023-12-17 21:28:40 -05:00
} hexagram_telemetry_dash_race;
2023-12-17 21:28:40 -05:00
typedef struct _hexagram_telemetry_dash_packet {
int32_t race_on;
uint32_t timestamp_ms;
struct {
float max, idle, current;
} engine_rpm;
hexagram_coord acceleration,
velocity,
angular_velocity;
float yaw, pitch, roll;
hexagram_corner normalized_suspension_travel,
tire_slip_ratio,
wheel_rotation;
struct {
int32_t front_left, front_right, rear_left, rear_right;
} wheel_on_rumble_strip;
hexagram_corner wheel_in_puddle_depth,
surface_rumble,
tire_slip_angle,
tire_combined_slip,
suspension_travel;
2023-12-17 21:28:40 -05:00
hexagram_telemetry_dash_car car;
hexagram_telemetry_dash_race race;
} hexagram_telemetry_dash_packet;
#pragma pack(pop)
2023-12-17 21:28:40 -05:00
#endif /* _HEXAGRAM_TELEMETRY_DASH_H */