Data Structures

class aims.data_structures.Sector

A NamedTuple representing a sector or a quasi sector such as standby, positioning etc.

name: str

Either the flight number of a sector or a string describing the type of a quasi sector (e.g. STBY, ADTY).

reg: str | None

The registration of the aircraft, if applicable.

type_: str | None

The type of the aircraft, if applicable.

from_: str | None

The origin airport, if applicable.

to: str | None

The destination airport, if applicable.

off: datetime.datetime

Off blocks time or the start time of a standby, positioning duty etc.

on: datetime.datetime

On blocks time or the end time of a standby, postitioning duty etc.

quasi: bool

A flag indicating that the sector did not involve and aircraft, e.g. it was a standby or ground positioning.

position: bool

A flag indicating that the sector was either ground or air positioning.

crew: tuple[CrewMember, ...]

A (possibly empty} tuple of CrewMember objects, representing all the crew members that were involved in the duty.

class aims.data_structures.Duty

A NamedTuple representing a duty

start: datetime.datetime

The start time of the duty. Can be the report time for a series of sectors or the start time of a standby, taxi ride etc. 00:00 on the relevant day for an all day event.

finish: datetime.datetime

The finish time for a duty. None for an all day event

sectors: tuple[Sector, ...]

A (possibly empty) tuple of Sector objects that are part of the duty.

class aims.data_structures.CrewMember

A NamedTuple representing a crew member.

name: str

The crew member’s name.

role: str

The crew member’s role. Usually one of CP, FO, PU or FA.

class aims.data_structures.AllDayEvent

A NamedTuple representing an all day event.

date: datetime.date

The date of the all day duty.

code: str

The AIMS code for the all day duty.