-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNewStarTelemetryData.cs
More file actions
165 lines (140 loc) · 5.04 KB
/
Copy pathNewStarTelemetryData.cs
File metadata and controls
165 lines (140 loc) · 5.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
using System.Runtime.InteropServices;
namespace com.drowhunter.NewStarGPTelemetryMod
{
[StructLayout(LayoutKind.Sequential)]
internal struct NewStarTelemetryData
{
/// <summary>
/// Vehicle pitch angle.
/// Unity Euler angle component.
/// Unit: degrees.
/// </summary>
public float Pitch;
/// <summary>
/// Vehicle yaw/heading angle.
/// Unity Euler angle component.
/// Unit: degrees.
/// </summary>
public float Yaw;
/// <summary>
/// Vehicle roll/bank angle.
/// Unity Euler angle component.
/// Unit: degrees.
/// </summary>
public float Roll;
/// <summary>
/// Local angular velocity around X axis.
/// Unit: radians per second (Unity Rigidbody angular velocity convention unless converted upstream).
/// </summary>
public float AngularVelocityX;
/// <summary>
/// Local angular velocity around Y axis.
/// Unit: radians per second (Unity Rigidbody angular velocity convention unless converted upstream).
/// </summary>
public float AngularVelocityY;
/// <summary>
/// Local angular velocity around Z axis.
/// Unit: radians per second (Unity Rigidbody angular velocity convention unless converted upstream).
/// </summary>
public float AngularVelocityZ;
/// <summary>
/// Centripetal-related value from telemetry extractor.
/// Unit depends on extractor formula:
/// - v^2 / r => m/s^2
/// - (v^2 / r) / 9.81 => g
/// - m * v^2 / r => N
/// </summary>
public float cForce;
/// <summary>
/// Local velocity X component.
/// Unit: meters per second (m/s).
/// </summary>
public float VelocityX;
/// <summary>
/// Local velocity Y component.
/// Unit: meters per second (m/s).
/// </summary>
public float VelocityY;
/// <summary>
/// Local velocity Z component.
/// Unit: meters per second (m/s).
/// </summary>
public float VelocityZ;
/// <summary>
/// Local acceleration X component.
/// Unit: meters per second squared (m/s^2), unless normalized upstream.
/// </summary>
public float AccelX;
/// <summary>
/// Local acceleration Y component.
/// Unit: meters per second squared (m/s^2), unless normalized upstream.
/// </summary>
public float AccelY;
/// <summary>
/// Local acceleration Z component.
/// Unit: meters per second squared (m/s^2), unless normalized upstream.
/// </summary>
public float AccelZ;
/// <summary>
/// Scalar speed.
/// Unit: meters per second (m/s).
/// </summary>
public float Speed;
/// <summary>
/// Normalized engine RPM ratio.
/// Computed as engine.RPM / engine.maxRPM.
/// Unit: unitless ratio (typically 0..1), not raw RPM.
/// </summary>
public float RPM;
/// <summary>
/// Current gearbox target gear.
/// Unit: unitless integer.
/// </summary>
public int CurrentGear;
/// <summary>
/// Front-left wheel vertical relative motion rate.
/// Derived from wheel Y delta (relative to average wheel Y) divided by fixedDeltaTime.
/// Unit: meters per second (m/s).
/// </summary>
public float TireFL;
/// <summary>
/// Front-right wheel vertical relative motion rate.
/// Derived from wheel Y delta (relative to average wheel Y) divided by fixedDeltaTime.
/// Unit: meters per second (m/s).
/// </summary>
public float TireFR;
/// <summary>
/// Back-left wheel vertical relative motion rate.
/// Derived from wheel Y delta (relative to average wheel Y) divided by fixedDeltaTime.
/// Unit: meters per second (m/s).
/// </summary>
public float TireBL;
/// <summary>
/// Back-right wheel vertical relative motion rate.
/// Derived from wheel Y delta (relative to average wheel Y) divided by fixedDeltaTime.
/// Unit: meters per second (m/s).
/// </summary>
public float TireBR;
/// <summary>
/// Number of wheels currently on track.
/// Unit: count.
/// </summary>
public int WheelsOnTrack;
/// <summary>
/// Whether slipstream boost is active.
/// </summary>
public bool IsBoosting;
/// <summary>
/// Whether driving input/state allows active driving.
/// </summary>
internal bool AllowDriving;
/// <summary>
/// Whether race state is currently "Racing".
/// </summary>
internal bool IsRacing;
/// <summary>
/// Whether the current challenge event is over.
/// </summary>
internal bool IsEventOver;
}
}