Add Flutter project skeleton (Android-only MVP)
Five-layer architecture per DMC_Architektur_und_Design.md: FlightControllerLink abstraction (Mock + MSP stub), protocol-neutral mission domain layer, App-Mode state machine with Ready-to-Fly gate, Drift persistence schema, and placeholder UI screens wired via go_router. App icon generated from design/Y2_pink_dark.svg. Verified with flutter analyze and flutter test. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
62d655fe8e
commit
346fcc2183
@@ -0,0 +1,61 @@
|
||||
/// Protokollneutrales Wegpunkt-Modell (Architektur-Doku 3.2).
|
||||
/// Divergenz zu MSP/MAVLink findet ausschliesslich im Encoder-Schritt statt
|
||||
/// (MspWaypointEncoder / MavlinkMissionEncoder), nicht in diesem Modell.
|
||||
library;
|
||||
|
||||
enum WaypointAction { none, loiter, landing, jump }
|
||||
|
||||
class Waypoint {
|
||||
const Waypoint({
|
||||
required this.lat,
|
||||
required this.lon,
|
||||
required this.altitudeM,
|
||||
required this.speedMs,
|
||||
required this.catchRadiusM,
|
||||
this.action = WaypointAction.none,
|
||||
this.jumpTargetIndex,
|
||||
this.jumpRepeatCount,
|
||||
});
|
||||
|
||||
final double lat;
|
||||
final double lon;
|
||||
final double altitudeM;
|
||||
final double speedMs;
|
||||
final double catchRadiusM;
|
||||
final WaypointAction action;
|
||||
|
||||
/// Nur bei action == jump gesetzt (iNAV Action-Code 6, Doku 7.1).
|
||||
final int? jumpTargetIndex;
|
||||
|
||||
/// Nur bei action == jump gesetzt; null bedeutet Endlos-Wiederholung.
|
||||
final int? jumpRepeatCount;
|
||||
|
||||
Waypoint copyWith({
|
||||
double? lat,
|
||||
double? lon,
|
||||
double? altitudeM,
|
||||
double? speedMs,
|
||||
double? catchRadiusM,
|
||||
WaypointAction? action,
|
||||
int? jumpTargetIndex,
|
||||
int? jumpRepeatCount,
|
||||
}) {
|
||||
return Waypoint(
|
||||
lat: lat ?? this.lat,
|
||||
lon: lon ?? this.lon,
|
||||
altitudeM: altitudeM ?? this.altitudeM,
|
||||
speedMs: speedMs ?? this.speedMs,
|
||||
catchRadiusM: catchRadiusM ?? this.catchRadiusM,
|
||||
action: action ?? this.action,
|
||||
jumpTargetIndex: jumpTargetIndex ?? this.jumpTargetIndex,
|
||||
jumpRepeatCount: jumpRepeatCount ?? this.jumpRepeatCount,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// Gemeinsame, protokollunabhaengige Datenstruktur aller Missionstypen.
|
||||
class FlatWaypointList {
|
||||
const FlatWaypointList(this.waypoints);
|
||||
|
||||
final List<Waypoint> waypoints;
|
||||
}
|
||||
Reference in New Issue
Block a user