/// 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 waypoints; }