feat(ground-suite): add local vehicle catalog
This commit is contained in:
1 parent
2fe54fb053
commit
cc9e9919db
18 files changed
+778
-6
No files matched your search
@@ -0,0 +1,46 @@
|
||||
import '../../vehicle_workspace/domain/vehicle_definition.dart';
|
||||
|
||||
/// An operator-created fleet unit in the local planning workspace.
|
||||
///
|
||||
/// It deliberately contains no received identity, platform, authority, or
|
||||
/// physical pose. Those must arrive through separate reviewed bindings later.
|
||||
class FleetUnit {
|
||||
const FleetUnit({
|
||||
required this.localUnitId,
|
||||
required this.displayName,
|
||||
required this.definition,
|
||||
required this.localPlacement,
|
||||
});
|
||||
|
||||
final String localUnitId;
|
||||
final String displayName;
|
||||
final VehicleDefinition definition;
|
||||
final LocalScenePoint localPlacement;
|
||||
|
||||
FleetUnit copyWith({String? displayName}) => FleetUnit(
|
||||
localUnitId: localUnitId,
|
||||
displayName: displayName ?? this.displayName,
|
||||
definition: definition,
|
||||
localPlacement: localPlacement,
|
||||
);
|
||||
}
|
||||
|
||||
/// A normalized placement in the operator's local tactical scene.
|
||||
///
|
||||
/// This is deliberately not a geographic position, vehicle pose, or received
|
||||
/// location. A future map binding will keep reported coordinates separate.
|
||||
class LocalScenePoint {
|
||||
const LocalScenePoint({required this.x, required this.y})
|
||||
: assert(x >= 0 && x <= 1),
|
||||
assert(y >= 0 && y <= 1);
|
||||
|
||||
final double x;
|
||||
final double y;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
other is LocalScenePoint && other.x == x && other.y == y;
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(x, y);
|
||||
}
|
||||
Reference in new issue
Block a user