API Documentation
Main Function
get_beluga
Parameters:
registration(str, optional): Filter by aircraft registration (e.g., “F-GXLJ”)status(str, optional): Filter by flight status - either “enroute” or “on_ground”from_airport_icao(str, optional): Filter by departure airport ICAO code (e.g., “LFBO”)to_airport_icao(str, optional): Filter by destination airport ICAO code
Returns:
A list of BelugaState objects containing detailed flight information.
Raises:
ValueError: If invalid parameters are provided (invalid registration format, invalid ICAO codes, or invalid status)
Data Models
BelugaState
- class _models.BelugaState(id, registration, from_airport, to_airport, scheduled_departure, scheduled_arrival, real_departure, real_arrival, eta, altitude, ground_speed, heading, position, status, last_update)
Represents the current state of a Beluga aircraft.
- id
Unique flight identifier
- registration
Aircraft registration number
- from_airport
Departure airport name
- to_airport
Destination airport name
- scheduled_departure
Scheduled departure time (Unix timestamp)
- scheduled_arrival
Scheduled arrival time (Unix timestamp)
- real_departure
Actual departure time (Unix timestamp)
- real_arrival
Actual arrival time (Unix timestamp, None if not landed)
- eta
Estimated time of arrival (Unix timestamp)
- altitude
Current altitude in feet
- ground_speed
Current ground speed in knots
- heading
Current heading in degrees (0-360)
- position
Current position as (latitude, longitude)
- status
Flight status - “enroute”, “on_ground”, or “unknown”
- last_update
Last data update time (Unix timestamp)
- altitude: int
- eta: int
- from_airport: str
- ground_speed: int
- heading: int
- id: str
- last_update: int
- position: tuple[int, int]
- real_arrival: str
- real_departure: str
- registration: str
- scheduled_arrival: str
- scheduled_departure: str
- status: str
- to_airport: str
Attributes:
id(str): Unique flight identifierregistration(str): Aircraft registration number (e.g., “F-GXLJ”)from_airport(str): Departure airport nameto_airport(str): Destination airport namescheduled_departure(int): Scheduled departure time (Unix timestamp)scheduled_arrival(int): Scheduled arrival time (Unix timestamp)real_departure(int): Actual departure time (Unix timestamp)real_arrival(int): Actual arrival time (Unix timestamp, None if not landed)eta(int): Estimated time of arrival (Unix timestamp)altitude(int): Current altitude in feetground_speed(int): Current ground speed in knotsheading(int): Current heading in degrees (0-360)position(tuple): Current position as (latitude, longitude)status(str): Flight status - “enroute”, “on_ground”, or “unknown”last_update(int): Last data update time (Unix timestamp)
Status Determination
The flight status is automatically determined based on altitude and ground speed:
enroute: Altitude > 1000 ft AND ground speed > 100 kt
on_ground: Altitude < 100 ft AND ground speed < 10 kt
unknown: Does not meet either criteria