Skip to content

Commit 912b655

Browse files
committed
feature: vertical speed
1 parent 67dd436 commit 912b655

File tree

5 files changed

+26
-11
lines changed

5 files changed

+26
-11
lines changed

Packages/com.vrcau.flatradar/Runtime/Scripts/Terminal/FlightsPanel.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ private void LateUpdate()
167167
var groundVelocity = Vector3.ProjectOnPlane(position - _previousPositions[index], Vector3.up);
168168
var groundSpeed = groundVelocity.magnitude / (time - _previousTimes[index]) * 1.94384f;
169169

170+
var verticalSpeed = (position - _previousPositions[index]).y * 60f * 3.28084f;
171+
170172
_previousPositions[index] = position;
171173
_previousTimes[index] = time;
172174

@@ -187,7 +189,7 @@ private void LateUpdate()
187189
flightTag.transform.localRotation = Quaternion.Inverse(rotation);
188190

189191
flightTag.text = $"{callSign} {tailNumber}\n" +
190-
$"{(int)altitude}ft {(int)groundSpeed}kt\n" +
192+
$"{(int)altitude}ft {(int)groundSpeed}kt {(int)verticalSpeed}fpm\n" +
191193
$"{owner}";
192194

193195
// Update Flights Text

Packages/manifest.json

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"com.unity.textmeshpro": "2.1.6",
1313
"com.unity.timeline": "1.2.18",
1414
"com.unity.ugui": "1.0.0",
15+
"com.unity.xr.oculus.android": "2.38.6",
1516
"com.unity.xr.oculus.standalone": "2.38.4",
1617
"com.unity.xr.openvr.standalone": "2.0.5",
1718
"jp.virtualaviation.virtual-cns": "https://github.com/VirtualAviationJapan/Virtual-CNS.git?path=/Packages/jp.virtualaviation.virtual-cns",

Packages/packages-lock.json

+7
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,13 @@
160160
"com.unity.modules.imgui": "1.0.0"
161161
}
162162
},
163+
"com.unity.xr.oculus.android": {
164+
"version": "2.38.6",
165+
"depth": 0,
166+
"source": "registry",
167+
"dependencies": {},
168+
"url": "https://packages.unity.com"
169+
},
163170
"com.unity.xr.oculus.standalone": {
164171
"version": "2.38.4",
165172
"depth": 0,

ProjectSettings/GraphicsSettings.asset

+1-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ProjectSettings/ProjectSettings.asset

+14-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)