EnRouteSegment.WithReplacedLegs
| Eigenschaft |
Wert |
| Modul |
FlightPlan |
| Klasse |
EnRouteSegment |
| Typ |
Function |
| Sichtbarkeit |
Public |
| Datei |
FlightPlan/FlightPlanModels.vb |
Beschreibung
Ersetzt die gesamte Leg-Liste des EnRouteSegments durch eine neue Sammlung und gibt ein neues EnRouteSegment zurueck. Das urspruengliche Segment bleibt unveraendert (immutable). Wird intern von FlightPlan.ReplaceLeg und FlightPlan.UpdatePposLegPosition verwendet, wenn Legs im EnRoute-Bereich aktualisiert werden.
Signatur
Public Function WithReplacedLegs(newLegs As IEnumerable(Of FlightPlanLeg)) As EnRouteSegment
Parameter
| Name |
Typ |
Beschreibung |
Standard |
| newLegs |
IEnumerable(Of FlightPlanLeg) |
Die neue vollstaendige Leg-Liste fuer das Segment |
— |
Rückgabewert
| Typ |
Beschreibung |
| EnRouteSegment |
Neues EnRouteSegment mit der uebergebenen Leg-Liste |
Ablaufdiagramm
flowchart TD
A[Start] --> B[Neues EnRouteSegment mit newLegs erstellen]
B --> C[Neues EnRouteSegment zurueckgeben]
Aufgerufen von
| Modul |
Sub/Function |
Kontext |
| FlightPlanModels |
FlightPlan.ReplaceLeg |
Ersetzt ein einzelnes Leg im EnRoute-Segment |
| FlightPlanModels |
FlightPlan.UpdatePposLegPosition |
Aktualisiert PPOS-Leg-Position im EnRoute-Segment |
| TmpyActor |
SID-Auswahl |
Ersetzt EnRoute-Legs bei SID-Neuaufbau |
Ruft auf
| Modul |
Sub/Function |
Kontext |
| FlightPlanModels |
EnRouteSegment.New(IEnumerable) |
Erzeugt neues Segment mit der uebergebenen Leg-Liste |
Beispiel
Dim seg As New EnRouteSegment({
New FlightPlanLeg("WPT1", 49.0, 10.0, "TF", "", 90.0, 0.0, 0.0, 0.0, 50.0, 0.0, 0.0,
0, "", 0, 0, 0, False, 0, False, "", FlightPlanLegType.Normal)
})
Dim newLegs = {
New FlightPlanLeg("WPT_A", 48.0, 9.0, "TF", "", 270.0, 0.0, 0.0, 0.0, 40.0, 0.0, 0.0,
0, "", 0, 0, 0, False, 0, False, "", FlightPlanLegType.Normal),
New FlightPlanLeg("WPT_B", 48.5, 9.5, "TF", "", 90.0, 0.0, 0.0, 0.0, 35.0, 0.0, 0.0,
0, "", 0, 0, 0, False, 0, False, "", FlightPlanLegType.Normal)
}
Dim updated = seg.WithReplacedLegs(newLegs)
' updated.Legs.Count = 2
' updated.Legs(0).WaypointIdent = "WPT_A"
Änderungshistorie
| Version |
Datum |
Änderung |
| 1.0 |
2026-04-16 |
Erstdokumentation |