Implement production vertical slice foundation

This commit is contained in:
chindit committed 2026-10-02 15:27:48 +02:00
1 parent 9d4a89f355
commit a18e82eb44
104 files changed
+10595 -268

No files matched your search

+38
View File
@@ -0,0 +1,38 @@
class_name DiveTelemetrySample
extends RefCounted
var depth_m: float
var longitudinal_effort: float
var steering_effort: float
var vertical_effort: float
var high_thrust_active: bool
func _init(
p_depth_m: float = 0.0,
p_longitudinal_effort: float = 0.0,
p_steering_effort: float = 0.0,
p_vertical_effort: float = 0.0,
p_high_thrust_active: bool = false
) -> void:
depth_m = p_depth_m
longitudinal_effort = p_longitudinal_effort
steering_effort = p_steering_effort
vertical_effort = p_vertical_effort
high_thrust_active = p_high_thrust_active
func validation_error() -> String:
if not is_finite(depth_m) or depth_m < 0.0:
return "telemetry depth must be finite and non-negative"
if not _is_normalized(longitudinal_effort):
return "longitudinal effort must be between -1 and 1"
if not _is_normalized(steering_effort):
return "steering effort must be between -1 and 1"
if not _is_normalized(vertical_effort):
return "vertical effort must be between -1 and 1"
return ""
func _is_normalized(value: float) -> bool:
return is_finite(value) and value >= -1.0 and value <= 1.0