Zum Inhalt

Migration

Diese Seite wurde aus der AirSimTech MediaWiki migriert.

A320 FMGC — Complete Function Reference

This page is the consolidated API reference for every public and friend function, sub, class, and module in the A320 FMGC .NET 8 codebase. It covers all subsystems: Kernel, Flight Plan, Trajectory, Navigation Database, INET, Guidance, MCDU Core, MCDU Pages, Diagnostic Forms, Recording, SimBrief, ACARS, and Userdata.

Generated from source files in A320_FMGC\. Every public Sub, Function, Class, and Module is documented below.


Kernel & Startup

FmgcSupervisor.vb — FmgcSupervisor Class

Top-level supervisor actor for the FMGC actor system. Creates and supervises all 13 child actors with OneForOneStrategy: restart only the failed actor without affecting its siblings.

Sub New (Constructor)

Parameter Type Description
formMain frmMain Reference to the main form for INET control access
config IniConfiguration INI configuration for database paths and settings

Returns: Nothing (Sub)

Purpose: Registers message handlers for KernelPong, InetConnected, PreloadComplete, and RegisterReceived (8999 routing-complete gate). Implements two-phase startup: first 8999 fires bulk CreateRoutes, second 8999 completes startup with SEQ 6.

Algorithm: On InetConnected: triggers NavDb preload. On PreloadComplete: subscribes to 8999. On first 8999: sends bulk CreateRoutes (90+ registers in VB6 order) and publishes SEQ 5. On second 8999: publishes SEQ 6, sends merged OPCAMI+AIRAC StatusSnapshot to both McduActors.

Called by: frmMain_Load via Props.Create.

Sub PreStart

Purpose: Creates all 13 child actors in order: KernelActor, TrajectoryActor, McduCaptainActor, McduFoActor, GuidanceActor, INetActor, NavDbActor, PrimaryFlightPlanActor, SecondaryFlightPlanActor, AcarsActor, UserdataActor, SimBriefActor, TmpyActor. Wires inter-actor refs via Tell messages. Loads OPCAMI.mdb synchronously. Subscribes to RegisterReceived on EventStream.

Algorithm:

  1. Creates actors via Context.ActorOf
  2. Sends InitINet to INetActor with frmMain reference
  3. Reads ASTNAV.mdb and Userdata.mdb paths from FMGC.INI with defaults
  4. Loads OPCAMI data via OpcamiData.ReadFromDatabase
  5. Wires SetFlightPlanActorRefs, SetTrajectoryActorRef, SetGuidanceActorRef, SetAcarsActorRef, SetUserdataActorRef
  6. Sends SetMcduRefs to both McduActors
  7. Sends SetStatusData (OPCAMI) to both McduActors
  8. Sends SetSimBriefRefs to SimBriefActor
  9. Sends SetTmpyActorRef to both McduActors
  10. Subscribes Self to RegisterReceived on EventStream

Function SupervisorStrategy

Returns: SupervisorStrategy — OneForOneStrategy with Directive.Restart on any exception.

Purpose: Restarts only the failed actor, leaving siblings running (D-07 pattern).


KernelActor.vb — KernelActor Class

Central FMGC computation actor. Receives periodic 1-second ticks via IWithTimers, caches INET register values, assembles trajectory computation inputs, publishes KernelStateSnapshot to EventStream, and drives the GuidanceActor.

Note: KernelActor.vb is large (700+ lines). Key message handlers are listed below.

Message Handlers

Message Action
KernelPing Replies with KernelPong to sender
KernelTick Assembles state snapshot, triggers trajectory computation, publishes KernelStateSnapshot
SetFlightPlanActorRefs Stores primary and secondary FlightPlanActor refs
SetTrajectoryActorRef Stores TrajectoryActor ref for tick-triggered computation
SetGuidanceActorRef Stores GuidanceActor ref for tick-triggered guidance
SetAcarsActorRef Stores AcarsActor ref
SetUserdataActorRef Stores UserdataActor ref
SetKernelZfw Updates ZFW (kg)
SetKernelFob Updates FOB (kg)
SetKernelCostIndex Updates cost index
SetKernelCrzAlt Updates cruise altitude (ft)
SetKernelFlightNumber Updates flight number string
SetKernelAltn Updates alternate airport ICAO
SetKernelCrzTemp Updates cruise temperature
SetKernelTaxiFuel Updates taxi fuel (kg)
SetKernelZfwCgAndZfw Updates ZFW CG and/or ZFW with CLR support
SetKernelBlockFuel Updates block fuel with CLR support
SetKernelTropopause Updates tropopause altitude (ft)
SetKernelClimbWind Updates climb wind table
SetKernelCruiseWind Updates cruise wind table
SetKernelDescentWind Updates descent wind table
SetKernelHistoryWind Updates history wind table
SetKernelPerfSnapshot Updates performance snapshot
SetKernelAirportAltitudes Updates ADEP/ADES elevations
SetKernelAdepCoordinates Updates ADEP LAT/LONG strings
ApplySimBriefOFP Atomically applies all SimBrief OFP fields
TriggerSimBriefFetch Relays to SimBriefActor
TriggerManualRecording Assembles state and calls RecordingService.SaveRecording
RequestTrajectoryRecompute Immediately triggers trajectory computation (optional plan override for TMPY)
InjectReplayState Overwrites cached state from recording for replay
RegisterReceived Caches inbound INET register values

KernelMessages.vb — Message Classes

Class Purpose
KernelPing Ping message for Receive(Of T) verification
KernelPong Pong reply from KernelActor
KernelTick Periodic 1-second tick (IWithTimers)
SetFlightPlanActorRefs Wires primary/secondary FlightPlanActor refs
SetTrajectoryActorRef Wires TrajectoryActor ref
SetGuidanceActorRef Wires GuidanceActor ref
ForwardToFlightPlan Envelope for forwarding commands to FlightPlanActor (target + payload)
KernelStateSnapshot Immutable snapshot of all KernelActor state (40+ fields: ZFW, FOB, CI, CRZ, winds, perf, fuel, aircraft state)
SetKernelZfw ZFW setter (Double ZfwKg)
SetKernelFob FOB setter (Double FobKg)
SetKernelCostIndex Cost index setter (Integer Ci)
SetKernelCrzAlt Cruise altitude setter (Long AltFt)
SetKernelFlightNumber Flight number setter (String)
SetKernelClimbWind Climb wind table setter
SetKernelCruiseWind Cruise wind table setter
SetKernelDescentWind Descent wind table setter
SetKernelHistoryWind History wind table setter
SetAcarsActorRef ACARS actor ref setter
SetUserdataActorRef Userdata actor ref setter
ApplySimBriefOFP SimBrief OFP application (carries SimBriefOFP)
BiteErrorEvent Actor exception event (ActorPath, Level, ErrorMessage, StackTrace, Timestamp)
SetKernelAltn Alternate airport ICAO setter
SetKernelCrzTemp Cruise temperature setter
SetKernelTaxiFuel Taxi fuel setter
SetKernelZfwCgAndZfw ZFW CG + ZFW combined setter with CLR support
SetKernelBlockFuel Block fuel setter with CLR support
SetKernelTropopause Tropopause altitude setter
TriggerSimBriefFetch SimBrief fetch trigger
SetKernelAirportAltitudes ADEP/ADES elevation setter (Long AdepAltFt, Long AdesAltFt)
SetKernelAdepCoordinates ADEP formatted LAT/LONG strings
SetKernelPerfSnapshot Performance snapshot setter
TriggerManualRecording Manual recording trigger
RequestTrajectoryRecompute Trajectory recompute trigger (optional FlightPlan override)
InjectReplayState Replay state injection (KernelStateSnapshot + InetCacheSnapshot)

frmMain.vb — frmMain Class

Main application form. Hosts ASTLibrary BroadcastRCV and INetClient controls. Creates the Akka actor system and FmgcSupervisor. Builds the Diagnostics menu.

Sub frmMain_Load

Purpose: Application startup sequence: NLog init, INI config load, perf DB test, codepage registration, INetClient module ID, Akka system creation, BiteNLogTarget registration, diagnostics menu build, BroadcastRCV discovery start, INI settings application.

Sub TestPerfDbConnection (Private)

Purpose: Verifies FMGCPERF1.MDB is accessible via OleDb. Logs warning on failure; does not throw.

Sub Broadcastrcv1_IPAddr

Purpose: BroadcastRCV server discovery handler. Initializes INetClient1 with discovered IP, closes BroadcastRCV.

Sub INetClient1_DataRx

Purpose: Inbound INET register handler. Forwards RegisterReceived to INetActor via Tell (thread-safe).

Sub INetClient1_Connected

Purpose: INET connection handler. Updates status bar, sends InetConnected to FmgcSupervisor.

Sub OnStartupProgress (Friend)

Purpose: Status bar update for startup SEQ 1-6 (airports, navaids, waypoints, procedures, server data, complete).

Sub EnsureFlightPlanActorRefs (Private)

Purpose: Lazy-resolves FlightPlanActor refs via ActorSelection (PreStart blocks during OPCAMI read).

Sub BuildDiagnosticsMenu (Private)

Purpose: Creates Diagnostics menu with Side View, Map View, RAW FPLN, RAW SEC FPLN, Layer 2 FPLN, Trajectory Log, BITE, Replay, SHOW DEBUG items.

Sub ShowDebugQuadrants (Private)

Purpose: Opens RAW FPLN, Computed FPLN, Map View, Side View in 2x2 quadrant layout on current screen.

Sub frmMain_FormClosing

Purpose: Closes BroadcastRCV, runs Akka CoordinatedShutdown with 10-second timeout, shuts down NLog.


Common\IniConfiguration.vb — IniConfiguration Class

Custom INI file parser replicating VB6 GetPrivateProfileString behavior. Case-insensitive section/key lookup.

Function Load (Shared)

Parameter Type Description
path String Full path to INI file

Returns: IniConfiguration — populated instance, or empty if file missing.

Purpose: Reads INI file, parses [Section] headers and Key=Value pairs. Supports ; and # comments.

Function GetValue

Parameter Type Description
section String Section name
key String Key name
defaultValue String Fallback value

Returns: String — value for section/key, or defaultValue if missing.

Function GetInteger

Returns: Integer — parsed value, or defaultValue if missing or unparseable.

Function GetBoolean

Returns: Boolean — "1"=True, "0"=False, else defaultValue.


Common\OpcamiData.vb — OpcamiData Class

Aircraft operator customization data from OPCAMI.mdb. Maps to VB6 OPCAMI_Type struct (24 fields).

Function ReadFromDatabase (Shared)

Parameter Type Description
dbPath String Path to OPCAMI.mdb

Returns: OpcamiData — populated from DB, or default instance if file missing or error.

Purpose: Reads SELECT * FROM OPCAMI, delegates to ParseFromIdValuePairs. Logs warnings on failure.

Function ParseFromIdValuePairs (Friend Shared)

Parameter Type Description
pairs IReadOnlyList(Of KeyValuePair(Of Integer, String)) ID/Value rows from OPCAMI table

Returns: OpcamiData — populated via Select Case ID matching VB6 ReadOPCAMI exactly.

Properties: WeightUnit, LengthUnit, MDAMDH, MaxGW, MaxRTERSV, MaxZFW, MaxBLOCK, ForceSPDLIM, ACType, EngType, ThrRedHeight, AccHeight, EOAccHeight, PerfFactor, IdleFactor, TaxiFuel, PercentageOfTripFuelForRTERSV, TimeFinalHoldingPattern, StandardTransAlt, SPDLIM_SPD, SPDLIM_ALT, DIRTO_Direct, Waypoint_Abbreviation.


Flight Plan

FlightPlanActor.vb — FlightPlanActor Class

ReceiveActor that owns and mutates a single FlightPlan instance. All mutations processed sequentially through the actor mailbox. Two instances: "PrimaryPlan" (active) and "SecondaryPlan" (revisions).

Sub New (Constructor)

Parameter Type Description
planName String "PrimaryPlan" or "SecondaryPlan"

Registered Handlers:

Message Action
GetFlightPlan Replies with FlightPlanSnapshot
GetFlightPlanDisplayRows Replies with FlightPlanDisplayRowsResult
SetOriginDestination _plan.WithOriginDestination
InitializeFlightPlan _plan.WithInitialLegs (ADEP/ADES with lat/lon/elevation)
SetDepartureInfo _plan.WithDepartureInfo (runway, SID, SID transition)
SetArrivalInfo _plan.WithArrivalInfo (runway, STAR, STAR transition, VIA, approach)
SetDepartureSegment _plan.WithDepartureSegment
SetEnRouteSegment _plan.WithEnRouteSegment
SetArrivalSegment _plan.WithArrivalSegment
SetApproachSegment _plan.WithApproachSegment
SetMissedApproachSegment _plan.WithMissedApproachSegment
InsertWaypoint _plan.InsertWaypoint(afterIndex, leg)
DeleteWaypoint _plan.DeleteWaypoint(index)
SetVerticalConstraint _plan.SetVerticalConstraint (alt type, alt1, alt2, speed)
ExecuteDirectTo _plan.ApplyDirectTo(targetIndex)
SetHoldingPattern _plan.WithHoldingPattern(index, holding)
RemoveHoldingPattern _plan.RemoveHoldingPattern(index)
SetFlightInfo _plan.WithFlightInfo (flight number, company route)
SetAlternate _plan.WithAlternate
CopyFromSecondary Replaces entire plan (promotion D-09)
ResetPlan Resets to FlightPlan.Empty()
UpdatePposPosition Updates PPOS leg lat/lon/elevation

FlightPlanModels.vb

Enum FlightPlanLegType

Adep(0), Climb(1), Normal(2), Ades(3), EndOfFlight(4), EndOfAlt(5), Discontinuity(6), VnavMarker(7), Internal(8), InternalCurve(9), MissedApproach(10).

Class FlightPlanLeg

Immutable waypoint leg with 20+ properties: WaypointIdent, Latitude, Longitude, ArinCCommand, TurnDirection, Course, ArcRadius, CenterLatitude, CenterLongitude, Distance, NavaidBearing, NavaidDistance, SpeedConstraint, AltConstraintType, AltConstraint1, AltConstraint2, NavaidDbId, IsOverfly, SourceDbId, InhibitNd, ViaToNext, LegType, NavaidType, Frequency.

Function WithVerticalConstraint

Returns: New FlightPlanLeg with updated altitude/speed constraints.

Function WithOverfly

Returns: New FlightPlanLeg with toggled IsOverfly flag.

Segment Classes

Class Purpose
DepartureSegment SID legs (RunwayTransitionLegs + SidLegs + EnRouteTransitionLegs)
EnRouteSegment Airways/direct legs
ArrivalSegment STAR legs
ApproachSegment Approach transition + final approach legs
MissedApproachSegment Missed approach legs

Each segment has: Legs property, Empty() factory, WithInsertedLeg, WithDeletedLeg, WithReplacedLegs.

Class HoldingPattern

FixIdent, Latitude, Longitude, InboundCourse, TurnDirection, TimeMinutes, SpeedKnots.

Class FlightPlanDisplayRow

SequenceNumber, SegmentName, and additional display-oriented fields for diagnostic ListView.


ComputedFlightPlanModels.vb

Class ComputedFlightPlanLeg

Immutable merged nav + trajectory prediction. 32 fields including: WaypointIdent, Latitude, Longitude, LegType, ArinCCommand, Course, Distance, AltConstraintType, AltConstraint1, SpeedConstraint, IsOverfly, ViaToNext, PredictedAltFt, PredictedIasKts, PredictedMach, PredictedFuelRemainingKg, PredictedEtaHhmm, PredictedWindDir, PredictedWindSpd, DistToNextNm, TrackToNextDeg, DistFromDepartureNm, DistToGoNm, PredictedGroundSpeedKts, FuelFlowKgH, VerticalSpeedFpm, PerfSourceMdb, SpdCstrMatch, AltCstrMatch, IsPseudoWaypoint, OriginalLeg, RawLegIndex, FlightPhase.

Function FromLeg (Shared)

Returns: ComputedFlightPlanLeg from FlightPlanLeg with zeroed predictions.

Function CreatePseudoWaypoint (Shared)

Returns: ComputedFlightPlanLeg for T/C or T/D marker with position and altitude.

Class ComputedFlightPlan

Immutable collection of merged legs. Properties: Legs, ComputedAt, HasTrajectory, ComputationDurationMs.

Function Empty (Shared)

Returns: Empty ComputedFlightPlan with no legs.

Class TrajectoryPathPoint

Layer 2 geometry point: Latitude, Longitude, AltitudeFt, DistanceFromDepartureNm, DistanceToGoNm, Phase, PointType, WaypointName, TrackDeg.

Class BuildResult

Two-layer result: Display (layer 1 nav waypoints), Path (layer 2 geometry points), ComputedAt, HasTrajectory, ComputationDurationMs.

Function Empty (Shared)

Returns: Empty BuildResult.


ComputedFlightPlanBuilder.vb — ComputedFlightPlanBuilder Module (Friend)

Function Build

Parameter Type Description
plan FlightPlan Navigation flight plan
trajectory TrajectoryResult Trajectory computation result (or Nothing)
kernelState KernelStateSnapshot Current kernel state for performance data

Returns: BuildResult — two-layer merged result with Display (layer 1) and Path (layer 2).

Purpose: Main merge orchestrator. Matches trajectory ProfilePoints to FlightPlanLegs, computes predictions, inserts VNAV markers (T/C, T/D, DECEL), builds layer 2 path geometry with abeam-projected waypoint names.

Function IsNavigationalLeg (Friend)

Returns: Boolean — True for leg types that represent navigational waypoints.


ComputedFlightPlanMessages.vb

Class Purpose
ComputedFlightPlanResult EventStream message wrapping active ComputedFlightPlan
TmpyComputedFlightPlanResult EventStream message wrapping TMPY ComputedFlightPlan
TmpyComputedFlightPlanCleared Published when TMPY no longer active
BuildResultPublished EventStream message wrapping active BuildResult
TmpyBuildResultPublished EventStream message wrapping TMPY BuildResult

Trajectory & Performance

This section incorporates the full trajectory function reference from the dedicated trajectory documentation.

TrajectoryActor.vb

TrajectoryActor Class

The main 4D trajectory computation actor. Runs on its own Akka.NET actor thread, receives ComputeTrajectory messages, and publishes TrajectoryResult via the EventStream.

Sub New (Constructor)
Entry Parameters Type Description
(none) Actor constructor; Akka calls this via Props.Create

Purpose: Initializes the actor with queue-latest-only concurrency (D-03 pattern). Registers the message handler that calls StartComputation.

How it works: Uses Akka ReceiveActor base class. The Receive(Of ComputeTrajectory) handler filters duplicate messages and delegates to StartComputation.

Called by: Akka actor system via Props.Create(Of TrajectoryActor)() in FmgcSupervisor.


Sub PreStart

Purpose: Preloads performance data from FMGCPERF1.MDB into the in-memory PerfDataStore (D-09, D-10). Falls back to formula-based model if MDB is unavailable.

How it works: Opens OleDb connection to performance database, reads all performance records into a tri-linear interpolation cache indexed by altitude, weight, and phase. Closes connection immediately after preload.


Sub StartComputation
Entry Parameters Type Description
msg ComputeTrajectory Contains flight plan legs, cruise altitude, ZFW, FOB, cost index, winds, IAS targets, UTC offset

Purpose: Main orchestrator. Filters navigation legs, resolves computed-position legs (CA/VA/FA), computes all three profiles, stitches them together, and publishes the result.

How it works:

  1. Filters legs to navigation-relevant types (Adep, Climb, Normal, Ades, EndOfFlight, EndOfAlt)
  2. Resolves 0,0 lat/lon legs via LegGeometry.ComputeLegGeometry
  3. Calls ComputeClimbProfile (forward from departure)
  4. Calls ComputeDescentProfile (backward from destination)
  5. If T/C >= T/D: activates short-route altitude capping via FindCrossoverAltitude
  6. Calls ComputeCruiseProfile (T/C to T/D at cruise altitude)
  7. Stitches all three profiles into allPoints list
  8. Publishes TrajectoryResult to EventStream

Function ComputeClimbProfile
Entry Parameters Type Description
msg ComputeTrajectory Full trajectory message with fuel, weight, speeds, winds
legs IReadOnlyList(Of FlightPlanLeg) Filtered navigation legs
totalRouteDistNm Double Total route distance in NM
crzAlt Double Target cruise altitude in feet
logEntries List(Of TrajectoryLogEntry) Diagnostic log accumulator (ByRef)
discAfter Boolean() Discontinuity-after flags per leg index

Returns: List(Of ProfilePoint) — Ordered climb profile points from departure to T/C.

Purpose: Computes the climb profile from departure to top-of-climb (T/C) using forward 5 NM step iteration.

How it works:

  1. Starts at ADEP altitude, initial fuel = FOB, weight = ZFW + FOB
  2. Each 5 NM step: interpolates lat/lon, looks up wind, computes IAS (250 kt cap below FL100), TAS, GS, Mach
  3. Queries PerfDataStore for fuel flow and vertical speed
  4. Applies energy modulation when IAS changes >= 10 kt between steps
  5. At waypoint boundaries: emits WaypointFix + CurvePoints via arc generators
  6. For overfly: GenerateFlyOverArc; for fly-by: GenerateFlyByArc; for RF legs: GenerateRfArc

Function ComputeCruiseProfile

Purpose: Fills the cruise segment between T/C and T/D at constant altitude. Iterates forward from tcDistNm to tdDistNm in 5 NM steps.


Function ComputeDescentProfile

Purpose: Computes the descent profile from destination backward to T/D. Iterates backward from destination in 5 NM steps. Below FL100: 250 kt IAS cap. Deceleration zone applies F-speed, S-speed, Green Dot transitions. Reverses points at end.


Function GenerateFlyByArc
Entry Parameters Type Description
fixLat, fixLon Double Waypoint fix coordinates
inboundTrack Double Inbound track degrees
outboundTrack Double Outbound track degrees
tasKts Double True airspeed for turn radius
lastPoint ProfilePoint Previous point for state
boundaryDistNm Double Optional phase boundary for T/C/T/D arc split

Returns: List(Of ProfilePoint) — CurvePoints along the fly-by turn arc at 5-degree intervals.

Purpose: Standard fly-by turn. Computes bank angle, turn radius, COT/EOT. 5 NM COT cap with intercept heading and capture fly-by for large turns. Phase-boundary arc split at T/C or T/D.


Function GenerateFlyOverArc

Purpose: Fly-over turn geometry. Two modes: Direct mode (CA/VA/FA legs) and Full intercept mode. Arc sweeps from inbound, straight segment on intercept heading, capture fly-by to outbound.


Function GenerateRfArc (Shared)

Purpose: RF (Radius-to-Fix) arc CurvePoints at 5-degree intervals with fixed center and radius.


Function EstimateOat (Shared)

Returns: Double — ISA temperature: 15.0 - 0.00198 * altFt, capped at -56.5 C above tropopause.

Function LookupWindByAltitude (Shared)

Returns: WindEntry — closest wind entry by altitude from wind table.

Function ComputeTotalRouteDistance (Shared)

Returns: Double — total great-circle route distance in NM.

Function ComputeLegDistances (Shared)

Returns: Double() — per-leg great-circle distances.

Function ComputeCumulativeLegDistances (Shared)

Returns: Double() — cumulative distance from departure per leg start.

Sub UpdatePositionAlongRoute (Shared)

Purpose: Interpolates lat/lon at given distance from departure along route segments.

Sub InterpolatePositionBackward (Shared)

Purpose: Interpolates position backward from destination (for descent).

Function FindCrossoverAltitude (Shared)

Returns: Double — altitude where climb meets descent (short-route capping).

Function InterpolateAltitudeAtDistance (Shared)

Returns: Double — linear altitude interpolation at given distance.


LegGeometry.vb — LegGeometry Module

ARINC 424 per-leg-type geometry computation. Routes each leg type to appropriate handler.

Function ComputeLegGeometry

Returns: LegGeometryResult (EndLat, EndLon, TrackDegrees, DistanceNm, TargetAltitudeFt).

Dispatches to: ComputeTfCf (TF/CF), ComputeDfDirect (DF/DIRECT), ComputeFc (FC), ComputeCa (CA), ComputeVa (VA), ComputeFd (FD), ComputeCd (CD), ComputeCr (CR), ComputeVd (VD), ComputeVm (VM), ComputeFm (FM), ComputeFa (FA), ComputeVi (VI), ComputeCi (CI), ComputeRf (RF).


GeoCalculations.vb — GeoCalculations Module

Pure geographic/navigation calculations. All Shared/Friend. No state.

Function Returns Purpose
DistanceNm(lat1,lon1,lat2,lon2) Double Great-circle distance in NM (haversine)
Bearing(lat1,lon1,lat2,lon2) Double Initial bearing [0,360)
PointAtDistanceBearing(lat,lon,distNm,bearingDeg) Tuple(Lat,Lon) Destination point
RadialRadialIntersection(lat1,lon1,brg1,lat2,lon2,brg2) Tuple(Lat,Lon) Intersection or (-999,-999)
CalcMaxBankAngle(tasKts) Double Standard fly-by bank 15-30 degrees
CalcTurnRadius(tasKts,bankAngleDeg) Double Turn radius in NM
CalcTurnData(inboundTrack,outboundTrack) Tuple(TurnAngle,TurnDirection) Angle and L/R
CalcCot(fixLat,fixLon,inbound,outbound,radius,direction) Tuple(Lat,Lon) Commence of Turn
CalcEot(fixLat,fixLon,inbound,outbound,radius,direction) Tuple(Lat,Lon) End of Turn
CalcTurnDataRf(center,radius,start,end,direction) Double RF arc distance in NM
CalcRfBankAngle(tasKts,radiusNm) Double RF bank angle
NormalizeDegrees(deg) Double Angle to [0,360)
ASinSafe / ACosSafe Double Clamped trig for domain safety
GetHdgWithWind(magTrack,tas,windDir,windSpd) Double Heading with wind correction

SpeedCalculations.vb — SpeedCalculations Module

Pure speed/atmosphere conversion functions. All Shared/Friend. No state.

Function Returns Purpose
CalcIasFromMach(mach,pa,oat) Integer IAS from Mach
CalcMachFromIas(ias,pa,oat) Double Mach from IAS
CalcTasFromIas(ias,pa,oat) Integer TAS from IAS
CalcGsFromTas(tas,trk,windSpd,windDir) Double Ground speed
CalcVls(stallSpeedKts) Integer VLS = 1.3 * stall
CalcFSpeed(grossWeightKg) Integer Flaps retraction speed
CalcSSpeed(grossWeightKg) Integer Slats retraction speed
CalcGreenDot(grossWeightKg,altFt) Integer Best L/D speed with altitude correction
CalcVApp(grossWeightKg,isFullConfig,headwindKts) Integer Approach speed with wind correction

EngineCalculations.vb / EngineDataStore.vb / PerfDataStore.vb / Perf1Engine.vb

EngineDataStore

Preloads engine performance data from FMGCPERF1.MDB tables. Provides tri-linear interpolation by altitude, weight, and phase.

PerfDataStore

In-memory cache of performance lookup results. GetPerformanceCached returns PerfResult (FuelFlow, VerticalSpeed, PerfSourceMdb).

Perf1Engine

Formula-based fallback performance model when FMGCPERF1.MDB is unavailable.

EngineCalculations

Engine-specific calculations: N1/EPR computation, thrust reduction factors.


TrajectoryModels.vb — Data Classes

Class/Enum Purpose
FlightPhase Enum: Climb(0), Cruise(1), Descent(2)
TrajectoryPointType Enum: Internal(0), CurvePoint(1), WaypointFix(2), VnavMarker(3)
ProfilePoint Immutable trajectory point (alt, speed, fuel, position, phase, type). 15 required + 5 optional parameters
ClimbProfile Container for climb ProfilePoint list
CruiseProfile Container for cruise ProfilePoint list
DescentProfile Container for descent ProfilePoint list
TrajectoryResult Complete result: 3 profiles, T/C, T/D, fuel/time totals, log entries, computation duration
TrajectoryLogEntry Diagnostic record per step (17 fields)
WindEntry Single wind entry: Direction, Speed, AltitudeOrIndex
PerfResult Performance lookup: FuelFlow, VerticalSpeed, PerfSourceMdb

ReceiveActor wrapping all navigation database access. Preloads airports, navaids, and waypoints into memory on startup. Handles synchronous OleDb queries on the actor thread.

Sub New (Constructor)

Parameter Type Description
dbPath String Path to ASTNAV.mdb
userDataPath String Path to Userdata.mdb

Registered Handlers:

Message Reply
StartPreload Preloads all data, replies PreloadComplete(AiracInfo)
LookupAirport AirportResult (Found, AirportRecord)
LookupNavaid NavaidResult (Found, List of NavaidRecord)
LookupWaypoint WaypointResult (Found, List of WaypointRecord)
SearchNavaidsNear NavaidResult (proximity search)
LoadSid ProcedureResult (procedures + legs)
LoadStar ProcedureResult
LoadApproach ProcedureResult
LoadAirway AirwayResult (Found, AirwayRecord)
ReadIlsCorrections IlsCorrectionResult
LoadCompanyRoutes (delegates to UserdataActor)
LookupByIdent IdentLookupResult (matches across airports, navaids, waypoints)

Function ReadAiracInfo (Private)

Returns: AiracInfo — reads AIRAC cycle dates from database for STATUS page display.


Query Message Result Message Purpose
LookupAirport(IcaoCode) AirportResult Airport by ICAO
LookupNavaid(Identifier) NavaidResult Navaid(s) by ident
LookupWaypoint(Identifier) WaypointResult Waypoint(s) by ident
SearchNavaidsNear(Lat,Lon,RangeNm) NavaidResult Proximity search
LoadSid(AirportIcao,RunwayDesignator) ProcedureResult SIDs for airport/runway
LoadStar(AirportIcao,RunwayDesignator) ProcedureResult STARs for airport/runway
LoadApproach(AirportIcao,Runway,ApproachName) ProcedureResult Approach procedure
LoadAirway(AirwayName,FromFix,ToFix) AirwayResult Airway segment
ReadIlsCorrections(IcaoCode) IlsCorrectionResult ILS correction data
LookupByIdent(Identifier) IdentLookupResult Cross-table ident search
StartPreload PreloadComplete(AiracInfo) Trigger preload
InetConnected (to supervisor) INET transport live
StartupProgress(Seq) (EventStream) SEQ 1-6 startup progress

Class Key Properties
AirportRecord Id, IcaoCode, Name, Latitude, Longitude, Elevation, Runways, IlsList
RunwayRecord Id, Designator, TrueHeading, Variation, LatBegin, LongBegin, LatEnd, LongEnd, Length
IlsRecord Id, Frequency, Course, Ident, RunwayId
NavaidRecord Id, Identifier, NavaidType, Frequency, Latitude, Longitude, Name
WaypointRecord Id, Identifier, Latitude, Longitude, CollocatedNavaidId
ProcedureLeg Id, TerminalId, TrackCode, WaypointId, Course, Distance, AltConstraint1/2, SpeedConstraint, Transition, LegType, TurnDirection, OverFly, ArcRadius, CenterLat/Lon, WaypointIdent/Lat/Lon
TerminalRecord Id, ProcedureType, Name, RunwayId, IlsId, AirportId
AirwayRecord AirwayName, Waypoints (List)
IlsCorrectionRecord IcaoCode, RunwayDesignator, Frequency, Course

Function Returns Purpose
ParseLatLong(raw) Double Parse DDMMSS hemisphere coordinate
ParseSignedDecimalCoord(raw) Double Parse signed decimal coordinate
ParseRunwayCoord(raw) Double Parse runway threshold coordinate
FormatNavaidFrequency(rawFreq,navaidType) String Format navaid frequency for display
FormatIlsFrequency(rawFreq) String Format ILS frequency for display

AirportQueryHandler.vb — AirportQueryHandler Class

Method Purpose
Sub PreloadAll() Preloads all airports, runways, ILS into memory
Function Lookup(icaoCode) Returns AirportResult by ICAO code
Function LookupById(id) Returns AirportRecord by database ID
Property AirportCount Number of preloaded airports

Method Purpose
Sub PreloadAll() Preloads all navaids and waypoints
Function Lookup(identifier) Returns NavaidResult by identifier
Function LookupNavaidById(id) Returns NavaidRecord by ID
Property NavaidCount Number of preloaded navaids
Property WaypointCount Number of preloaded waypoints

ProcedureQueryHandler.vb — ProcedureQueryHandler Class

Handles LoadSid, LoadStar, LoadApproach queries by reading terminal procedure legs from ASTNAV.mdb.


INET & ARINC 429

INetActor.vb — INetActor Class

Actor wrapping outbound INET register sends. Receives RegisterSend, CallCreateRoute, CallCreateRoutes, SendScreenBuffer messages. Uses BeginInvoke to marshal DataTX calls to the frmMain UI thread.

Sub New (Constructor)

Registered Handlers:

Message Action
InitINet Stores frmMain reference for BeginInvoke marshaling
RegisterSend Sends register via INetClient1.DataTX on UI thread
RegisterReceived Publishes to EventStream for subscriber actors
CallCreateRoute Calls INetClient1.CreateRoute on UI thread
CallCreateRoutes Batch CreateRoute calls in sequence
SendScreenBuffer Sends MCDU screen via Arinc429UdpSender

INetMessages.vb — Message Classes

Class Properties Purpose
InitINet FormMain Inject frmMain reference
RegisterSend RegisterNumber, TargetModule, Value Outbound register send
RegisterReceived Command, Data Inbound register event
CallCreateRoute RegisterNumber, ModuleId Subscribe to register
CallCreateRoutes Routes (list) Batch subscribe
SendScreenBuffer IsCaptain, ScreenData (Byte()), LstMcduLines (String()) MCDU screen update

Arinc429Constants.vb

Enum McduColor

White(0), Green(1), Cyan(2), Amber(3), Yellow(4), Magenta(5), Blue(6).

Enum McduFont

Large(0), Small(1).

Module Arinc429SpecialChars

MapSpecialChar(c) — maps special characters (degree, arrow, box) to ARINC 429 byte values.


Arinc429ScreenBuffer.vb — Arinc429ScreenBuffer Class

13x24 MCDU screen buffer with dirty-range differential encoding.

Method Purpose
Sub Clear() Resets all 312 cells to space/white/large
Sub WriteChar(line,col,charByte,color,font) Write single character
Sub WriteString(line,startCol,text,color,font) Write string at position
Sub SetControl(line,col,color,font) Set color/font without changing character
Function HasChanges() True if dirty range is non-empty
Function BuildDifferentialMessage(isCaptain) Builds UDP packet with only changed cells
Sub ResetDirtyRange() Clears dirty tracking after send
Function GetLineText(line) (Friend) Returns text content of a screen line

Constants: LINES=13, COLUMNS=24, BUFFER_SIZE=312.


Arinc429UdpSender.vb — Arinc429UdpSender Class

UDP sender for ARINC 429 screen data. Sends to configurable IP:port.

Method Purpose
Sub SendMessage(rawMessage As Byte()) Sends raw UDP packet
Sub Close() Closes UDP socket
Sub Dispose() IDisposable implementation

Guidance

GuidanceActor.vb — GuidanceActor Class

ReceiveActor processing GuidanceInput each tick. Computes lateral guidance (active waypoint, cross-track error, heading command), speed guidance (managed speeds, VLS, F/S/O speeds), and flight phase management.

Sub New (Constructor)

Registered Handlers:

Message Action
GuidanceInput ProcessGuidanceInput — full guidance computation cycle
SetINetActorRef Stores INetActor ref for register sends

Sub ProcessGuidanceInput (Private)

Purpose: Main guidance computation. Finds active waypoint, computes bearing/distance, cross-track error, heading command, speed guidance. Sends INET registers for FCU, speed tape, waypoint display.

Sub UpdateFlightPhase (Private)

Purpose: Manages flight phase transitions (Preflight -> Takeoff -> Climb -> Cruise -> Descent -> Approach -> GoAround -> Done).

Function ComputeSpeedGuidance (Private)

Returns: SpeedGuidanceResult (CmdSpeedKts, CmdMach, IsMachMode, VlsKts, GreendotKts, SSpeedKts, FSpeedKts, VAppKts).

Speed Calculation Functions (Friend Shared)

Function Returns Purpose
HasPassedAbeam(inboundTrack,acLat,acLon,wptLat,wptLon) Boolean Abeam passage detection
CalcCrossTrackError(acLat,acLon,fromLat,fromLon,toLat,toLon) Double XTK error in NM
CalcDecelDistanceNm(currentSpeed,targetSpeed) Double Deceleration distance
FormatMultiplexValue(subAddress,payload) String INET multiplex format
VlsCheckedSpeed(requestedSpeed,vls) Integer Speed floored at VLS
CalcGreendot(grossWeightKg,altitudeFt) Integer Green dot speed
CalcVstall(flapLever,grossWeightKg) Integer Stall speed by configuration
CalcVlsForConfig(onGround,thrustDetent,flapLever,grossWeightKg) Integer VLS for current config
CalcFSpeed(grossWeightKg) Integer F-speed
CalcSSpeed(grossWeightKg) Integer S-speed
CalcVApp(grossWeightKg) Integer VApp

GuidanceMessages.vb

Class Purpose
GuidanceStarted Startup confirmation marker
GuidanceInput Tick input: Trajectory + AircraftState + FlightPlan
GuidanceResult Computed result: FlightPhase, ActiveWaypoint, MagTrack, Distance, ETA, XTK, HdgToFcu, CmdSpeed, CmdMach, IsMachMode, ApproachPhaseActive, NavAllowed, VLS, GreenDot, S, F, VApp
SetINetActorRef Wire INetActor ref

GuidanceModels.vb

Class/Enum Purpose
GuidanceFlightPhase Enum: Preflight(0) through Done(8)
AircraftState Immutable state: Lat, Lon, TrueTrack, MagHeading, TrueHeading, TAS, GS, PressureAlt, Alt, Wind, FlapLever, ThrustDetent, OnGround, ManagedHdg, MagVar, GrossWeight, OAT
OldGuidanceCache Mutable change-detection cache for register sends
HoldStateMachine Hold step state: Activate(), AdvanceStep(), Reset(), IsActive, HoldStep

RadioNavModule.vb — RadioNavModule (Friend Module)

Radio navigation auto-tuning. Finds VOR/NDB/ILS ahead of aircraft position in flight plan.

Function Returns Purpose
FindAheadVorNdb(legs,activeIndex,navaids) RadioNavTuneResult First VOR/NDB ahead
FindAheadIls(legs,activeIndex,ilsList) RadioNavTuneResult ILS for arrival runway
FormatVorNdbRegisterValue(result) String INET register format for VOR/NDB
FormatIlsFrequencyRegisterValue(freqMhz) String INET register format for ILS freq
FormatIlsCourseRegisterValue(courseDeg) String INET register format for ILS course

Register constants: VorFreqRegister=5339, IlsFreqRegister=5111, IlsCourseRegister=5111, NdbFreqRegister=5339, AutotuneBitsRegister=2605.


MCDU Core

McduActor.vb — McduActor Class

Unified MCDU actor for Captain or First Officer side. Renders MCDU pages, processes keystrokes, maintains scratchpad and page state. Each instance has independent screen buffer and page registry.

Sub New (Constructor)

Parameter Type Description
side McduSide Captain or FirstOfficer

Key INET Registers:

Register Side Purpose
2258 CPT Scratchpad text
2260 CPT Keystroke (LSK 1000-1011)
2357 FO Scratchpad text
2358 FO Keystroke (LSK 1000-1011)
2254 CPT CLR key
2353 FO CLR key

Key Message Handlers: RegisterReceived (filters for side-specific registers), McduRender, SetMcduRefs, SetTmpyActorRef, SetStatusData, SetKernelPerformanceState, FlightPlanSnapshot, TrajectoryResult, GuidanceResult, ProcedureResultReceived, CoRteListReceived, WeatherResultReceived, SituationListReceived, SituationLoadReceived, SituationDeleteReceived, KernelStateSnapshot, TmpyPlanResult, TmpyPlanUpdated, TmpyCleared, TmpyErased.


McduMessages.vb — Message Classes

Class Purpose
McduStarted Startup marker
SetMcduRefs Wire INetActor, FlightPlanActor, KernelActor, AcarsActor, UserdataActor, NavDbActor, SecondaryFlightPlanActor refs
SetTmpyActorRef Wire shared TmpyActor ref
McduRender Trigger page re-render
SetKernelPerformanceState Cached ZFW, FOB, CI, CRZ, FlightNumber, CompanyRouteName
ProcedureResultReceived NavDb procedure query result
CoRteListReceived Company route list from UserdataActor
WeatherResultReceived ACARS weather text
SituationListReceived Saved situation list
SituationLoadReceived Situation load success/failure
SituationDeleteReceived Situation delete result
SetStatusData Aircraft config and nav-database status (StatusSnapshot)

McduCommand.vb — McduCommand Classes

Command pattern: page HandleLsk returns McduCommand subclasses. McduActor dispatches them.

Key command types: NoOp, NavigateTo, ClearScratchpad, SetScratchpadMessage, SetKernelValue (various), SelectRunway, SetDirectTo, SetHolding, InsertAirway, InsertWaypoint, DeleteWaypoint, TmpyInsertCommand, TmpyUndoCommand, LoadCompanyRoute, CreateUserWaypoint, SendAcarsMessage, EraseAcarsMessage, PrintAcarsMessageCommand, SetAocWxMsgType, and many more.


McduContext.vb — Context and Snapshot Classes

Class McduContext

Immutable snapshot assembled by McduActor before calling IPage.Render and HandleLsk. Contains: FlightPlan, Trajectory, Guidance, Scratchpad, ClearCommand, ActivePage, Side, KernelState, WindData, ProcedureCache, AcarsData, StatusData, and 30+ scroll/state fields.

Class WindSnapshot

ClimbEntries, CruiseEntries, DescentEntries, HistoryEntries, AltnWindEntry.

Class ProcedureQueryCache

SidResult, StarResult, ApproachResult, SidTransResult, StarTransResult.

Class AcarsSnapshot

WeatherReady, WeatherText, MessageCount, Messages, MessageScrollIndex, ViewMessageIndex, ViewMessageLines, WxData.

Class AcarsWxSnapshot

Stations (5 slots), ReadyFlags, ActualWxIndex.

Class StatusSnapshot

ACType, EngType, ActiveDb, ActiveDbName, SecondDb, SecondDbName, DatabaseUpdateAvailable, IdleFactor, PerfFactor.


McduRenderHelpers.vb — McduRenderHelpers Module (Friend)

Function Returns Purpose
WriteTitle(text) String Centered title command
WriteLskLabelLeft(lskRow,text) String Left LSK label (small font)
WriteLskLabelRight(lskRow,text) String Right LSK label (small font)
WritePageNumber(current,total) String Page number (e.g. "1/3")
WriteDataLeft(lskRow,text) String Left data row
WriteDataRight(lskRow,text) String Right data row

McduCommandParser.vb — McduCommandParser Module (Friend)

Sub ParseAndRender

Parameter Type Description
commands IEnumerable(Of String) MCDU command strings from page Render
buffer Arinc429ScreenBuffer Target screen buffer

Purpose: Parses MCDU command strings (title, label, data, color, font directives) and writes them into the screen buffer.


WaypointInputParser.vb

Class WaypointParseResult

Kind (Ident, PBD, LatLon, Invalid), Ident, PlaceIdent, BearingDeg, DistanceNm, Latitude, Longitude, ErrorMessage.

Factory methods: ForIdent, ForPbd, ForLatLon, Invalid.

Class WaypointInputParser

Function Parse (Shared)
Parameter Type Description
input String Scratchpad text (ident, PBD format, or lat/lon)

Returns: WaypointParseResult — parsed waypoint entry supporting ident, place/bearing/distance (PBD), and lat/lon formats.


IPage.vb — IPage Interface

Member Signature
Render Sub Render(ctx As McduContext, buffer As Arinc429ScreenBuffer)
HandleLsk Function HandleLsk(key As McduLskKey, ctx As McduContext) As McduCommand

McduPageType.vb — Enum McduPageType

All MCDU page identifiers: Startup, InitA, InitB, Fpln, FuelPred, Perf1-Perf6, Prog, RadNav, Data1, Data2, McduMenu1, McduMenu2, LatRev, LatRevAdep, LatRevAdes, VertRev, Dir, Hold, Airways, Sid, SidTrans, Star, StarTrans, Via, AdepRwy, AdesRwy, ClimbWind, CruiseWind, DescendWind, HistoryWind, SecIndex, SecInitA, SecInitB, SecFpln, SearchWpt, SearchNavaid, NewWpt, Status, Xload1-Xload7, CoRteSave, CoRteSavePro, CoRteBrowse, CoRteLoad, AcarsMainIndex, AcarsWx, AcarsWxRequest1, AcarsWxRequest2, AcarsWxReceived, AcarsPreflight, AcarsEnroute, AcarsPostflight, AcarsMessageLog, AcarsCreateMessage, AcarsViewMessage, AcarsComm, AcarsAtcAts, AcarsReportsIndex, AcarsRequestsIndex, AocMainMenu, AocConfig, AocWeatherReq, AocWxMsgType, AocGroundService, AocCreateCompanyMsg, Atsu1, Sim1, SimPosition, SimExtPwr, SimFreeze, SimFuel, SimLogging, SimDateTime, SimPushback, SimLoadSituation, SimSlew, McduMenuVisual, McduMenuIls, MoveLines, MoveTitle, MoveScratchpad, AdjustFonts, Screening, Region, Inop, GpsMonitor, ProgPositionReport.


McduSide.vb — Enum McduSide

Captain(0), FirstOfficer(1).


McduLskKey.vb — Enum McduLskKey

L1 through L6, R1 through R6.


TmpyActor.vb — TmpyActor Class

Shared TMPY flight plan lifecycle actor (13th child). Maintains TMPY plan with undo stack.

Sub New (Constructor)

Registered Handlers:

Message Action
CreateTmpy Creates TMPY from active plan snapshot
ApplyTmpyInsert Inserts waypoint into TMPY, publishes TmpyPlanUpdated
ApplyTmpyDelete Deletes waypoint from TMPY
ApplyTmpyOverfly Toggles overfly on TMPY leg
ApplyTmpyDeparture Applies SID/runway change to TMPY
GetTmpyPlan Replies with TmpyPlanResult
InsertTmpy Publishes TmpyCleared (McduActor commits to FlightPlanActor)
UndoTmpy Restores previous TMPY state from undo stack
EraseTmpy Discards TMPY, publishes TmpyErased with base plan

Private Methods

  • NormalizeDiscontinuities — removes duplicate adjacent discontinuities
  • ApplyStringing — connects discontinuity gaps when waypoints match
  • ApplyRevisionPrepend — prepends previous departure legs for SID changes
  • BuildRunwayOnlyDeparture — creates departure segment with runway-only (no SID)

TmpyMessages.vb

Class Purpose
CreateTmpy Create TMPY from active plan
ApplyTmpyInsert Insert waypoint (AfterLegIndex, Leg)
ApplyTmpyDelete Delete waypoint (LegIndex)
ApplyTmpyOverfly Toggle overfly (LegIndex)
GetTmpyPlan Query current TMPY plan
InsertTmpy Commit TMPY to active
UndoTmpy Undo last TMPY change
EraseTmpy Discard TMPY
ApplyTmpyDeparture Apply SID/runway change (BasePlan, NewDeparture, RunwayHeading/Lat/Lon, etc.)
TmpyPlanResult Reply: Plan + UndoAvailable
TmpyPlanUpdated EventStream: Plan updated
TmpyCleared EventStream: TMPY committed
TmpyErased EventStream: TMPY discarded (carries BasePlan)

MCDU Pages

All page classes implement IPage with two members:

  • Sub Render(ctx As McduContext, buffer As Inet.Arinc429ScreenBuffer)
  • Function HandleLsk(key As McduLskKey, ctx As McduContext) As McduCommand

AdepRwyPage.vb — AdepRwyPage

Departure runway selection page. Displays ADEP runways in 4 slots with ILS info, CRS, and length. L1-L4 select a runway. L6 returns or navigates to F-PLN (TMPY).

Render

Parameter Type Description
ctx McduContext Current MCDU state snapshot
buffer Arinc429ScreenBuffer Target screen buffer for rendering

Returns: Nothing (Sub)

Purpose: Renders the ADEP RWY page showing departure airport, current RWY/SID/TRANS selections, and up to 4 scrollable runway entries with course, length, and ILS data.

Algorithm: Reads effectivePlan (TMPY if active, else ACT). Shows title "DEPARTURES FROM {ADEP}". Renders scroll arrows if >4 runways. For each of 4 slots starting at AdepRwyTopIndex: computes magnetic course (TrueHeading - Variation), formats length in meters, shows designator with < arrow in cyan, and ILS ident/frequency if available. Bottom row shows RETURN or TMPY F-PLN/INSERT*.

Called by: McduActor when current page is AdepRwy.

HandleLsk

Returns: McduCommand — SelectRunway for L2-L5, NavigateTo for L6, TmpyInsertCommand for R6 (TMPY), NoOp otherwise.


AdesRwyPage.vb — AdesRwyPage

Arrival runway selection page. Displays ADES approach runways in 3 slots. L2-L4 select a runway. L6 returns.

Render

Purpose: Renders the ADES RWY page with arrival airport, current APPR/VIA/STAR selections, STAR TRANS, and up to 3 approach runway entries with ILS data. Special case: Chr(0) designator shows "NO IFR APPR AVAIL".

HandleLsk

Returns: McduCommand — SelectRunway for L2-L4, NavigateTo(LatRevAdes) for L6, NoOp otherwise.


AirwaysPage.vb — AirwaysPage

Airways entry page with 4 airway/TO-fix pair slots. Maintains mutable temp state.

New

Purpose: Constructor initializing 4 empty AirwayEntry objects.

ResetEntries

Purpose: Clears all 4 temporary airway entries to empty strings. Called on ERASE (L6) when first ToFix is set.

Render

Purpose: Renders airway entry slots with VIA/TO labels. Detects TMPY_Ready when a complete chain exists (airway+tofix filled, next airway empty). Shows INSERT* when ready, ERASE when entries exist, RETURN otherwise.

HandleLsk

Returns: McduCommand — InsertAirway for R6 (first ready entry), ClearScratchpad/NavigateTo for L6, ClearScratchpad for L1-L4/R1-R4 entries.


AcarsMainIndexPage.vb — AcarsMainIndexPage

ACARS top-level navigation hub. Static layout with UTC time.

Render

Purpose: Displays UTC time + "MAIN INDEX" title, and 5 rows of L/R navigation links (PREFLIGHT/ENROUTE/POSTFLIGHT/MESSAGE LOG/LINK MANAGER on left; ATC(ATS)/COMM/REPORTS/REQUESTS/FLT DATA on right).

HandleLsk

Returns: NavigateTo for L1-L4 (AcarsPreflight/Enroute/Postflight/MessageLog), R1-R4 (AtcAts/Comm/ReportsIndex/RequestsIndex), NoOp otherwise.


AcarsMessagePages.vb

Contains 6 ACARS message page classes: AcarsMessageLogPage, AcarsCreateMessagePage, AcarsCreateCompanyMsgPage, AcarsViewMessagePage, AcarsCommPage, AcarsAtcAtsPage.

AcarsMessageLogPage

Scrollable message list (4 per page). Shows time, sender/subject, RCD/SNT indicator. L1-L4 navigate to AcarsViewMessage. R6 erases all. L6 returns.

AcarsCreateMessagePage

Free-text message composition with 8 lines across 2 pages. L1-L4 text entry. R5 SEND. L6 returns.

AcarsViewMessagePage

Read-only single message display. L5 erase, L6 return, R6 print.


AcarsSubPages.vb

Contains AcarsPreflightPage, AcarsEnroutePage, AcarsPostflightPage, AcarsReportsIndexPage, AcarsRequestsIndexPage, AcarsDispatchIndexPage. All: static L+R column layout with UTC time. L6 returns to AcarsMainIndex.


AcarsWxPages.vb

Contains AcarsWxPage (5-station weather request), AcarsWxRequest1Page (3-airport entry), AcarsWxRequest2Page (type selector), AcarsWxReceivedPage (received weather with 23-char word-wrap).

AcarsWxRequest1Page.GetAirport

Returns: String — ICAO code for given slot index 0-2.


AocPages.vb

Contains AocMainMenuPage, AocConfigPage (SimBrief Pilot ID), AocWxMsgTypePage, AocWeatherReqPage, AocGroundServicePage. AocWeatherReqPage has SetSlotMsgType, RecordSendTime, AcceptIcao helpers.


Atsu1Page.vb — Atsu1Page

ATSU DATALINK top-level. R2 navigates to AocMainMenu, R3 to AcarsWx.


ClimbWindPage.vb — ClimbWindPage

Climb wind entry with 5 rows. Full (DDD/SSS/AAAA) and partial (/AAAA, DDD/SSS) entry formats. ParseWindEntry, ParseFullWindEntry, ParsePartialWindEntry (Private). DIR 0-360, SPD 0-250, ALT 100-39100 ft.


CoRtePages.vb

SaveCortePage, SaveCorteProPage, BrowseRoutePage (scrollable list with SelectedRouteName/Adep/Ades), LoadCortePage (confirmation before loading).


CruiseWindPage.vb — CruiseWindPage

Single DIR/SPD entry for cruise wind. L1 accepts DDD/SSS. R4 to ClimbWind. R5 to DescendWind.


DataPages.vb

Data1Page (DATA INDEX 1/2): position monitor, IRS monitor, GPS monitor, A/C status. Data2Page (DATA INDEX 2/2): waypoints, navaids, runways, routes, winds.


DescendWindPage.vb — DescendWindPage

Descent wind entry with 5 rows + ALTN wind (R1). Same validation as ClimbWindPage.


DirPage.vb — DirPage

DIR TO page with pre-selection and post-selection states. Supports DIRECT, ABEAM, RADIALIN, RADIALOUT modes. LastFplnIds property read by McduActor. L1-L4 select waypoint, R1-R4 select mode, R6 INSERT, L6 ERASE.


DisplayAdjustPages.vb

MoveLinesPage, MoveLinesXPage, MoveTitlePage, MoveScratchpadPage, AdjustFontsPage. All send DataTX register 2233 for display position adjustment.


FplnPage.vb — FplnPage

Active flight plan display with circular scrolling, VB6-matching color paths, constraint asterisks, TMPY support. Sub-pages: FPLN1 (UTC+SPD/ALT) and FPLN2 (EFOB+T WIND). LastMissApprVisible property. Renders 5 legs per page with circular wrap.

HandleLsk

R6: TmpyInsertCommand (TMPY) or toggle sub-page. L6: TmpyUndoCommand (TMPY) or scroll. L1-L5: "i" toggles overfly, CLR deletes, text inserts waypoint, empty navigates to LatRev. R1-R5: navigate to VertRev.


HistoryWindPage.vb — HistoryWindPage

Read-only display of past actual winds. L6 returns to ClimbWind. R6 copies history entries to climb wind via SetHistoryWind.


HoldPage.vb — HoldPage

Holding pattern entry. L1=INB CRS, R1=TURN (L/R), L2=TIME. R6=INSERT (SetHolding). Default: -1 CRS, "R" turn, 1.0 min.


InitAPage.vb — InitAPage

First MCDU setup page. L1=CO RTE, L2=ALTN, L3=FLT NBR, L5=CI, L6=CRZ FL/TEMP, R1=FROM/TO, R2=SimBrief, R3=ALIGN IRS, R5=WIND nav, R6=Tropopause.

ParseFromTo (Private Shared)

Accepts "XXXX/YYYY" (both), "XXXX" (ADEP only), "/XXXX" (ADES only).

ParseCrzFlTemp (Private Shared)

Multi-format: no slash=FL, slash-last=feet-direct, slash-first=temp only, slash-middle=FL/temp combo.

CalcIsaTemp (Private Shared)

ISA temperature: 15 - 3*(Alt/1000), min -56.


InitBPage.vb — InitBPage

Fuel prediction table. L1=taxi fuel, L3=RTE RSV, L5=FINAL time, R1=ZFWCG/ZFW, R2=BLOCK fuel. FormatFuelTonnes, ParseDoubleInvariant helpers.


LatRevPage.vb — LatRevPage

Lateral revision with 3 variants: en-route, ADEP, ADES. FormatLatLon helper. L1=DEPARTURES, R1=ARRIVALS, L4=HOLD, R3=NEXT WPT, R4=NEW DEST, R5=AIRWAYS, L6=RETURN.


McduFplnLeg.vb

McduFplnLeg (Class)

Display-ready wrapper with Leg and SourceIndex properties.

McduFplnLegBuilder (Module)

BuildMcduFplnLegs(ctx) — builds filtered leg list removing Internal/InternalCurve and pseudo-waypoints adjacent to Discontinuity.


McduMenuPages.vb

McduMenu1Page (main menu), McduMenu2Page (MCDU SETUP), McduMenuVisualPage (visual adjustment hub), McduMenuIlsPage (ILS correction with runway cycling).


MiscPages.vb

InopPage, ScreeningPage (EPR/N1 toggle + GS failure), RegionPage, FuelPredPage, GpsMonitorPage (with FormatGpsLatitude/Longitude), ProgPositionReportPage, StartupPage (SEQ 0-6 loading status).


SearchWptPage (waypoint search with pagination), SearchNavaidPage (navaid search with ILS/non-ILS display), NewWptPage (create user waypoint with lat/lon parsing). FormatLatLon, MapNavaidClass, FormatFreq, ParseLatLon helpers.


PerfPages.vb — PerfSpeedHelpers Module

ComputeFSpeed

Returns: Integer — 130 + 0.00043 * grossWeightKg.

ComputeVApp

Returns: Integer — 120 + 0.000274 * grossWeightKg.


Perf1Page.vb — Perf1Page (PERF TAKE OFF 1/6)

Full VB6 fidelity port. V1/VR/V2, F/S/O speeds, TRANS ALT, THR RED/ACC, RWY, TO SHIFT, FLAPS/THS, FLEX TO TEMP, ENG OUT ACC. HandleThrRedAcc, HandleFlapsThs, HandleFlexTemp (Private).


Perf2Page.vb — Perf2Page (PERF CLB 2/6)

Managed climb speed/mach. CI entry (L2). PRESEL speed (L4). APPR PHASE arm/confirm.


Perf3Page.vb — Perf3Page (PERF CRZ 3/6)

Cruise speed/mach with OPT FL and REC MAX FL. T/D label display.


Perf4Page.vb — Perf4Page (PERF DES 4/6)

Descent speed in reversed format (.mach/ias). APPR PHASE activation.


Perf5Page.vb — Perf5Page (PERF APPR 5/6)

QNH, TEMP, MAG WIND, TRANS ALT, VAPP, VLS, LDG CONF (FULL/CONF3 toggle), MDA, DH, F/S/O speeds. Complex slash-parsing for wind and QNH entries.


Perf6Page.vb — Perf6Page (PERF GO AROUND 6/6)

FLP RETR/SLT RETR/CLEAN speeds + THR RED/ACC + ENG OUT ACC altitudes.


ProgPage.vb — ProgPage

PROG page with flight-phase-dependent title. CRZ FL, OPT FL, REC MAX FL, UPDATE AT, BRG/DIST, NAV ACCUR. L1=CRZ alt change.


RadNavPage.vb — RadNavPage

Radio navigation tuning with 3 render modes: Standard, Own (NAV1ILS), OwnILSFS. RenderVor2, RenderAdf1, RenderAdf2 helpers. L1=VOR1, R1=VOR1 OBS, L2=ILS, R2=ILS CRS, L3=VOR2, R3=VOR2 OBS, L5=ADF1, R5=ADF2.


SecFplnPages.vb

SecInitAPage (secondary INIT A), SecInitBPage (secondary fuel/weight), SecFplnPage (secondary F-PLN display), SecIndexPage (secondary navigation hub: COPY ACTIVE, SEC F-PLN, DELETE, ACTIVATE).


SidPage.vb — SidPage

SID procedure selection. Scrollable SID list with "NO SID" as entry 0. TMPY-aware. L2-L5 select SID. L6=F-PLN or RETURN. R6=INSERT*.


SidTransPage.vb — SidTransPage

SID transition selection. Left: SIDs (selected=green, unselected=cyan). Right: transitions (first=NONE). L2-L4 re-select SID. R2-R5 select transition. L5=ADEPRWY. TMPY-aware.


SimPages.vb

Contains 10 simulator pages: Sim1Page (menu), SimPositionPage (reposition with register 5001/5002), SimExtPwrPage (5003), SimFreezePage (5004), SimFuelPage (5-tank entry, 5005), SimLoggingPage (5006), SimDateTimePage (5007), SimPushbackPage (5008), SimLoadSituationPage (scrollable list with select/load/delete), SimSlewPage (5010).


StarPage.vb — StarPage

STAR selection page. L1=VIAS, L2-L4 select STAR, L5=ADESRWY, L6=RETURN.


StarTransPage.vb — StarTransPage

STAR transition selection. Left: STARs. Right: transitions (right-justified). L2-L4 re-select STAR. R1-R3 select transition.


ViaPage.vb — ViaPage

VIA (approach transition) selection. L1-L4 select VIA. L5/L6 return to STAR.


VertRevPage.vb — VertRevPage

Vertical revision. EFOB, UTC CSTR, SPD CSTR, ALT CSTR, CLB/DES SPD LIM, WIND DATA, STEP ALTS. ParseAltConstraint supports FL###, ####ft, +/- prefix.


StatusPage.vb — StatusPage

A/C type, engine type, active/second nav database, user waypoint count, IDLE/PERF factors. L2=DB update. R5=DELETE ALL user waypoints. R6=Xload1.


XloadPages.vb

7 static P/N XLOAD pages (Xload1-Xload7). Circular wrapping. Xload3Page shows active nav database name.


Diagnostic Forms

frmSideView.vb — frmSideView Class

Side-profile altitude/distance ScottPlot chart. Subscribes to ComputedFlightPlanResult and TrajectoryResult via EventStream.

Method Purpose
Sub WireToActorSystem(system) Creates subscriber actors for trajectory, computed plan, path, selection sync
Sub OnComputedFlightPlan(plan) (Friend) Caches display legs, triggers chart rebuild
Sub OnPathUpdated(pathPoints) (Friend) Caches layer 2 path points, rebuilds chart
Sub OnTrajectoryResult(result) (Friend) Caches raw trajectory, rebuilds chart
Sub OnTmpyComputedFlightPlan(plan) (Friend) Caches TMPY legs
Sub OnTmpyPathUpdated(pathPoints) (Friend) Caches TMPY path
Sub OnTmpyCleared() (Friend) Clears TMPY overlays
Sub RebuildChart() (Private) Full ScottPlot chart rebuild with waypoint markers
Sub OnSelectionChanged(msg) (Private) Cross-form selection highlight
Function FindMatchingLeg(distFromDep) (Private) Finds leg at given distance

frmMapView.vb — frmMapView Class

Lateral map view using GDI+ custom rendering. Double-buffered Panel.Paint with coordinate projection.

Method Purpose
Sub WireToActorSystem(system) Creates subscriber actors
Sub OnComputedFlightPlan(plan) (Friend) Caches legs, invalidates panel
Sub OnPathUpdated(pathPoints) (Friend) Caches layer 2 path
Sub OnTmpyPathUpdated(pathPoints) (Friend) Caches TMPY path
Sub OnTrajectoryResult(result) (Friend) Caches raw trajectory
Sub pnlMap_Paint(sender,e) (Private) Main GDI+ render: grid, path lines, waypoint markers, T/C T/D, selection highlight
Function LatLonToPixel(lat,lon) (Private) Coordinate projection
Function PixelToLatLon(px) (Private) Reverse projection
Sub pnlMap_MouseDown/Move/Up/Wheel (Private) Pan and zoom handlers
Sub btnResetView_Click (Private) Auto-fit view to route
Sub OnSelectionChanged(msg) (Private) Cross-form selection highlight

frmComputedFlightPlan.vb — frmComputedFlightPlan Class

Layer 2 computed flight plan ListView with virtual mode. Shows nav waypoints + VNAV markers + path geometry.

Method Purpose
Sub WireToActorSystem(system) Creates ComputedFlightPlanSubscriberActor
Sub OnComputedFlightPlan(plan) (Friend) Caches display legs, refreshes ListView
Sub OnBuildResult(result) (Friend) Caches BuildResult (display + path layers)
Sub OnTmpyComputedFlightPlan(plan) (Friend) Caches TMPY display
Sub OnTmpyBuildResult(result) (Friend) Caches TMPY build result
Sub OnTmpyCleared() (Friend) Reverts to active display
Sub btnRecord_Click (Private) Triggers TriggerManualRecording to KernelActor
Sub btnLog_Click (Private) Opens trajectory log export dialog
Sub RefreshView() (Private) Updates ListView virtual count and display mode
Sub OnSelectionChanged(msg) (Private) Cross-form selection highlight

frmTrajectoryLog.vb — frmTrajectoryLog Class

Per-step trajectory computation data in ListView.

Method Purpose
Sub WireToActorSystem(system) Creates TrajectoryLogSubscriberActor
Sub OnTrajectoryResult(result) (Friend) Populates ListView from TrajectoryLogEntry list
Sub OnSelectionChanged(msg) (Private) Cross-form selection highlight

frmBITE.vb — frmBITE Class

Built-In Test Equipment display. Shows Warn/Error/Fatal NLog events.

Method Purpose
Sub tmrBiteDrain_Tick (Private) Polls BiteNLogTarget.DrainEntries every 2 seconds
Sub OnBiteErrorEvent(evt) (Friend) Direct actor-published error event handler
Sub btnClearBITE_Click (Private) Clears ListView and resets BiteNLogTarget

frmRawFpln.vb — frmRawFpln Class

Raw flight plan legs from FlightPlanActor. Supports Raw and Display view toggle. Test menu for save/load flight plans.

Method Purpose
Sub WireToFlightPlanActor(actor,planLabel,system) Sets up auto-refresh timer and subscriber actors
Sub RefreshPlan() (Private) Ask FlightPlanActor for display rows
Sub OnDisplayFlightPlanUpdated(legs) (Friend) Caches computed display legs
Sub OnTmpyPlanUpdated(plan) (Friend) Caches TMPY plan
Sub OnTmpyPlanCleared() (Friend) Clears TMPY display
Sub mnuSaveTest_Click (Private) Saves flight plan + kernel state to JSON
Sub mnuLoadTest_Click (Private) Loads test flight plan and injects via actor pipeline

frmReplay.vb — frmReplay Class

FPLN state replay form. Lists recording files, replays via actor pipeline, shows diff comparison.

Method Purpose
Sub WireToActorSystem(system) Stores actor system ref
Sub btnRefresh_Click (Private) Refreshes recording file list
Sub btnReplay_Click (Private) Replays selected recording via ReplayService.ReplayViaActorPipeline
Sub RefreshRecordingList() (Private) Populates ListView from RecordingService.GetRecordingFiles
Sub PopulateStateInspector(rec) (Private) Shows recording state details in TreeView
Sub PopulateLegsListView(lv,legs) (Private) Populates comparison ListView
Sub PopulateOriginalFromDto(dto) (Private) Shows original computed FPLN from recording

frmPointInfo.vb — frmPointInfo Class (Friend)

Tooltip popup for waypoint details on click in map/side views.

Method Purpose
Sub ShowForLeg(leg,screenPos) Shows computed flight plan leg details
Sub ShowForProfilePoint(pt,screenPos) Shows raw trajectory profile point
Sub ShowForPathPoint(pt,matchedLeg,screenPos) Shows layer 2 path point with matched nav leg

BiteNLogTarget.vb — BiteNLogTarget Class

Custom NLog target capturing Warn/Error/Fatal events into a concurrent queue.

Method Purpose
Function DrainEntries() (Shared) Returns and clears all queued BiteEntry items
Property TotalCount (Shared) Total events captured since last Reset
Sub Reset() (Shared) Clears queue and counter

BiteEntry Class

Timestamp, Level, LoggerName, Message, Exception.


StatusSubscriberActor.vb — StatusSubscriberActor (Friend)

Subscribes to StartupProgress on EventStream. Forwards SEQ updates to frmMain via BeginInvoke.


BiteSubscriberActor.vb — BiteSubscriberActor (Friend)

Subscribes to BiteErrorEvent on EventStream. Forwards to frmBITE via BeginInvoke.


DiagnosticSelectionActor.vb / DiagnosticSelectionModels.vb

Cross-form waypoint selection synchronization. DiagnosticSelectionChanged carries DistanceFromDepartureNm, Latitude, Longitude, SequenceNumber, PathPointIndex, SourceFormName. Published to EventStream when user clicks a waypoint in any diagnostic form.


TrajectorySubscriberActor.vb

Contains 10 subscriber actor classes: SideViewSubscriberActor, MapViewSubscriberActor, TrajectoryLogSubscriberActor, MapViewCfpSubscriberActor, SideViewCfpSubscriberActor, DiagnosticSelectionSubscriberActor, RawFplnBuildResultSubscriberActor, SideViewPathSubscriberActor, MapViewPathSubscriberActor.

DiagnosticThrottle module: MIN_INTERVAL_MS = 3000 (throttle EventStream updates to prevent UI flooding).


TestFlightPlanService.vb — TestFlightPlanService Module (Friend)

Method Purpose
Function GetFilePath() Returns path to test-flightplan.json
Sub Save(dto) Serializes TestFlightPlanDto to JSON
Function Load() Deserializes TestFlightPlanDto from JSON

TestFlightPlanDto

FlightPlan (FlightPlanDto), CostIndex, CrzAltFt, AdepAltFt, AdesAltFt, ZfwKg, FobKg, CrzTemp, ClimbWind, CruiseWind, DescentWind.


Controls\SlideToggle.vb — SlideToggle Class

Custom animated two-position toggle control for diagnostic forms (ACT/TMPY, RAW/DISPLAY).

Member Purpose
Event Toggled Fires when toggle position changes
Property Options String array of option labels
Property SelectedIndex Current selection (0 or 1)
Property SelectedText Text of current selection
Property LeftText/RightText Label text shortcuts
Property IsRight True when right position selected

Recording & Replay

RecordingService.vb — RecordingService Module (Friend)

Method Purpose
Sub SaveRecording(flightPlan, trajectory, kernelState, inetCache, computedPlan, adesElevFt, vAppKts, triggerType, triggerMessage) Serializes FmgcStateRecording to JSON in Recordings/ folder
Function LoadRecording(filePath) Deserializes FmgcStateRecording from JSON
Function GetRecordingFiles() Returns sorted array of .json files in Recordings/ folder

ReplayService.vb — ReplayService Module (Friend)

Function ReplayViaActorPipeline

Parameter Type Description
recording FmgcStateRecording Loaded recording to replay
actorSystem ActorSystem Akka system for temporary actors

Returns: ReplayResult (ComputedFlightPlan, Differences, Log, BuildDurationMs).

Purpose: Replays a recording by creating a temporary actor pipeline (FlightPlanActor + TrajectoryActor), injecting recorded state, triggering computation, and comparing results.

ReplayResult Class

ComputedFlightPlan, Differences (list of diff strings), Log (list of log strings), BuildDurationMs.


FmgcStateRecording.vb — FmgcStateRecording Class

Top-level recording DTO: SchemaVersion, Timestamp, Adep, Ades, ActiveWaypointIndex, FlightPhaseInt, AppVersion, TriggerType, TriggerMessage, AdesElevFt, VAppKts, FlightPlan (FlightPlanDto), TrajectoryResult (TrajectoryResultDto), KernelState (KernelStateDto), InetCache (InetCacheDto), ComputedFlightPlan (ComputedFlightPlanDto).


RecordingDtos.vb — DTO Classes

Class Purpose
ProfilePointDto Trajectory profile point serialization (17 fields)
TrajectoryProfileDto List of ProfilePointDto
TrajectoryResultDto 3 profiles + T/C + T/D + totals
FlightPlanLegDto Flight plan leg serialization (18 fields)
HoldingPatternDto Holding pattern serialization
HoldingEntryDto Holding at specific leg index
FlightPlanDto Full flight plan: ADEP/ADES, segments, holdings, procedures
WindEntryDto Wind entry serialization
PerfSnapshotDto Performance snapshot (25 fields)
FuelTableSnapshotDto Fuel prediction table (16 fields)
KernelStateDto Kernel state (40+ fields)
InetCacheDto INET register cache (18 fields with register numbers)
ComputedFlightPlanLegDto Computed leg serialization
ComputedFlightPlanDto Full computed plan serialization

RecordingMapper.vb — RecordingMapper Module (Friend)

Bidirectional mapping between domain objects and DTOs.

To DTO:

Function Purpose
ToRecording Full state to FmgcStateRecording
FlightPlanToDto FlightPlan to FlightPlanDto
TrajectoryToDto TrajectoryResult to TrajectoryResultDto
KernelStateToDto KernelStateSnapshot to KernelStateDto
WindEntryToDto WindEntry to WindEntryDto
PerfSnapshotToDto PerfSnapshot to PerfSnapshotDto
FuelTableSnapshotToDto FuelTableSnapshot to FuelTableSnapshotDto
InetCacheToDto InetCacheSnapshot to InetCacheDto
ComputedFlightPlanToDto ComputedFlightPlan to ComputedFlightPlanDto

To Domain:

Function Purpose
FlightPlanToDomain FlightPlanDto to FlightPlan
TrajectoryToDomain TrajectoryResultDto to TrajectoryResult
KernelStateToDomain KernelStateDto to KernelStateSnapshot
WindEntryToDomain WindEntryDto to WindEntry
PerfSnapshotToDomain PerfSnapshotDto to PerfSnapshot
FuelTableSnapshotToDomain FuelTableSnapshotDto to FuelTableSnapshot
InetCacheToDomain InetCacheDto to InetCacheSnapshot

Class InetCacheSnapshot

Immutable INET register cache: Latitude, Longitude, TrueTrack, MagHeading, TrueHeading, TasKts, GroundSpeedKts, PressureAltFt, AltitudeFt, WindDirectionDeg, WindSpeedKts, FlapLever, ThrustDetent, OnGround, ManagedHdg, MagneticVariation, GrossWeightKg, OatDegC.


SimBrief

SimBriefActor.vb — SimBriefActor Class

ReceiveActor handling SimBrief OFP fetch and parse lifecycle.

Sub New (Constructor)

Registered Handlers:

Message Action
SetSimBriefRefs Stores McduCpt, McduFo, KernelActor refs
FetchSimBriefRequest Initiates HTTP fetch from SimBrief API
SimBriefFetchSuccess (Private) Parses XML via SimBriefXmlParser, sends ApplySimBriefOFP to KernelActor
SimBriefFetchFailure (Private) Logs error, notifies MCDU actors

SimBriefMessages.vb

Class Properties Purpose
FetchSimBriefRequest PilotId Trigger OFP fetch
SetSimBriefRefs McduCptActor, McduFoActor, KernelActor Wire actor refs

SimBriefOFP.vb — Data Classes

Class Properties
SimBriefOFP General, Origin, Destination, Alternate, Weights, Fuel, NavlogFixes
SimBriefGeneral FlightNumber, CostIndex, InitialAltitude, Units
SimBriefAirport ICAO
SimBriefWeights EstZFW
SimBriefFuel PlanRamp
SimBriefFix Ident, Latitude, Longitude, Stage
SimBriefApiException Custom exception for API errors

SimBriefXmlParser.vb — SimBriefXmlParser Module (Friend)

Function Parse

Parameter Type Description
xml String Raw SimBrief XML response

Returns: SimBriefOFP — parsed OFP with general, airports, weights, fuel, navlog fixes.

Purpose: Parses SimBrief XML format into domain objects using XDocument/LINQ.


ACARS

AcarsActor.vb — AcarsActor Class

ReceiveActor managing ACARS message database and weather requests.

Sub New (Constructor)

Parameter Type Description
acarsDbPath String Path to ACARS.mdb
metarPath String Path to METAR data file (optional)
inetActor IActorRef INetActor ref for register sends

Handles: SendAcarsMessage, EraseAcarsMessage, EraseAllAcarsMessages, RequestAcarsWeather, LoadAcarsMessages, PrintAcarsMessage, and GSX ground service commands.


AcarsMessages.vb

Class Purpose
AcarsMessageEntry Single message: Id, Timestamp, Sender, Subject, Body, IsRead, Direction
SendAcarsMessageRequest Send outbound message
EraseAcarsMessageRequest Delete single message
EraseAllAcarsMessagesRequest Delete all messages
RequestAcarsWeather Weather data request
LoadAcarsMessagesRequest Load messages from database
PrintAcarsMessageRequest Print message (register send)

Userdata

UserdataActor.vb — UserdataActor Class

ReceiveActor managing Userdata.mdb: company routes, user waypoints, saved situations.

Sub New (Constructor)

Parameter Type Description
userdataPath String Path to Userdata.mdb

Handles: SaveCompanyRoute, LoadCompanyRoutes, DeleteCompanyRoute, CreateUserWaypoint, DeleteUserWaypoint, DeleteAllUserWaypoints, GetUserWaypointCount, SaveSituation, LoadSituationList, LoadSituation, DeleteSituation.


UserdataMessages.vb

Class Purpose
CoRteEntry Company route: Name, Adep, Ades, WaypointIdents
SituationSummary Saved situation: Name, Timestamp, Adep, Ades
SaveCompanyRouteRequest Save route to Userdata.mdb
LoadCompanyRoutesRequest Load routes for ADEP/ADES pair
DeleteCompanyRouteRequest Delete route by name
CreateUserWaypointRequest Create pilot waypoint (ident, lat, lon)
DeleteUserWaypointRequest Delete pilot waypoint by ident
DeleteAllUserWaypointsRequest Delete all pilot waypoints
GetUserWaypointCountRequest Query waypoint count
SaveSituationRequest Save current flight state
LoadSituationListRequest List all saved situations
LoadSituationRequest Load specific situation by name
DeleteSituationRequest Delete specific situation

Shared Module-Level Helpers

The following helper functions are used by multiple page classes via a shared Module (imported in Namespace scope):

WriteTitle(text As String) As String

Formats a centered title command string.

WriteDataLeft(row As Integer, text As String) As String

Formats a left-column data row command.

WriteDataRight(row As Integer, text As String) As String

Formats a right-column data row command.

WriteLskLabelLeft(row As Integer, text As String) As String

Formats a left-column LSK label row command (small font).

WriteLskLabelRight(row As Integer, text As String) As String

Formats a right-column LSK label row command (small font).

These are defined outside the Pages namespace and called by all page classes to build MCDU command strings.