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:
Constantin Leue
2026-07-26 21:28:25 +02:00
co-authored by Claude Sonnet 5
parent 62d655fe8e
commit 346fcc2183
45 changed files with 2884 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
import '../waypoint/flat_waypoint_list.dart';
/// Strategy-Pattern fuer erweiterbare Missionstypen (Architektur-Doku 3.2).
abstract class Mission {
String get name;
FlatWaypointList toFlatWaypointList();
}
/// Wegpunkt-Streckenmission - aktuell einziger implementierter Missionstyp.
class TrackMission implements Mission {
const TrackMission({required this.name, required this.waypoints});
@override
final String name;
final List<Waypoint> waypoints;
@override
FlatWaypointList toFlatWaypointList() => FlatWaypointList(waypoints);
}
// SurveyAreaMission (Flaechenabflug) und SearchAreaMission (Suchmuster) sind
// im Strategy-Pattern vorgesehen, aber noch nicht spezifiziert (Doku 6).
@@ -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;
}