Datatypes
- class flightplandb.datatypes.StatusResponse(message: str, errors: Optional[List[str]])
Returned for some functions to indicate execution status
- message
The message associated with the status returned
- Type:
str
- errors
A list of any errors raised
- Type:
Optional[List[str]]
- class flightplandb.datatypes.User(id: int, username: str, location: Optional[str] = None, gravatarHash: Optional[str] = None, joined: Optional[datetime] = None, lastSeen: Optional[datetime] = None, plansCount: Optional[int] = 0, plansDistance: Optional[float] = 0.0, plansDownloads: Optional[int] = 0, plansLikes: Optional[int] = 0)
Describes users registered on the website
- id
Unique user identifier number
- Type:
int
- username
Username
- Type:
str
- location
User provided location information.
None
if not available- Type:
Optional[str]
- gravatarHash
Gravatar hash based on user's account email address.
- Type:
Optional[str]
- joined
UTC Date and time of user registration
- Type:
Optional[datetime] = None
- lastSeen
UTC Date and time the user was last connected
- Type:
Optional[datetime] = None
- plansCount
Number of flight plans created by the user
- Type:
Optional[int]
- plansDistance
Total distance of all user's flight plans
- Type:
Optional[float]
- plansDownloads
Total download count of all user's plans
- Type:
Optional[int]
- plansLikes
Total like count of all user's plans
- Type:
Optional[int]
- class flightplandb.datatypes.UserSmall(id: int, username: str, location: Optional[str] = None, gravatarHash: Optional[str] = None)
Describes users registered on the website, with far less info
- id
Unique user identifier number
- Type:
int
- username
Username
- Type:
str
- location
User provided location information.
None
if not available- Type:
Optional[str]
- gravatarHash
Gravatar hash based on user's account email address.
- Type:
Optional[str]
- class flightplandb.datatypes.Application(id: int, name: Optional[str] = None, url: Optional[str] = None)
Describes application associated with a flight plan
- id
Unique application identifier number
- Type:
int
- name
Application name
- Type:
Optional[str]
- url
Application URL
- Type:
Optional[str]
- class flightplandb.datatypes.Via(ident: str, type: str)
Describes routes to
RouteNode
s- ident
desc
- Type:
str
- type
Type of Via; must be one of
Via.validtypes
- Type:
str
- validtypes
Do not change. Valid Via types.
- Type:
List[str]
- class flightplandb.datatypes.RouteNode(ident: str, type: str, lat: float, lon: float, id: Optional[int] = None, alt: Optional[float] = None, name: Optional[str] = None, via: Optional[Via] = None)
Describes nodes in
Route
s- id
For some obscure reason an apparently useless id is included with each node when the node is inside a
Track
route. Goodness knows why.- Type:
Optional[int]
- ident
Node navaid identifier
- Type:
str
- type
Type of RouteNode; must be one of
RouteNode.validtypes
- Type:
str
- lat
Node latitude in decimal degrees
- Type:
float
- lon
Node longitude in decimal degrees
- Type:
float
- alt
Suggested altitude at node
- Type:
Optional[float]
- name
Node name.
- Type:
Optional[str]
- validtypes
Do not change. Valid RouteNode types.
- Type:
List[str]
- class flightplandb.datatypes.Route(nodes: List[RouteNode], eastLevels: Optional[List[str]] = None, westLevels: Optional[List[str]] = None)
Describes the route of a
Plan
- class flightplandb.datatypes.Cycle(id: int, ident: str, year: int, release: int)
Navdata cycle
- id
FlightPlanDB cycle id
- Type:
int
- ident
AIP-style cycle id
- Type:
str
- year
Last two digits of cycle year
- Type:
int
- release
Cycle release
- Type:
int
- class flightplandb.datatypes.Plan(fromICAO: Optional[str], toICAO: Optional[str], fromName: Optional[str], toName: Optional[str], id: Optional[int] = None, flightNumber: Optional[str] = None, distance: Optional[float] = None, maxAltitude: Optional[float] = None, waypoints: Optional[int] = None, likes: Optional[int] = None, downloads: Optional[int] = None, popularity: Optional[int] = None, notes: Optional[str] = None, encodedPolyline: Optional[str] = None, createdAt: Optional[datetime] = None, updatedAt: Optional[datetime] = None, tags: Optional[List[str]] = None, user: Optional[User] = None, application: Optional[Application] = None, route: Optional[Route] = None, cycle: Optional[Cycle] = None)
A flight plan; the thing this whole API revolves around
- id
Unique plan identifier number
- Type:
int
- fromICAO
ICAO code of the departure airport
- Type:
Optional[str]
- toICAO
ICAO code of the destination airport
- Type:
Optional[str]
- fromName
Name of the departure airport
- Type:
Optional[str]
- toName
Name of the destination airport
- Type:
Optional[str]
- flightNumber
Flight number of the flight plan
- Type:
Optional[str]
- distance
Total distance of the flight plan route
- Type:
Optional[float]
- maxAltitude
Maximum altitude of the flight plan route
- Type:
Optional[float]
- waypoints
Number of nodes in the flight plan route
- Type:
Optional[int]
- likes
Number of times the flight plan has been liked
- Type:
Optional[int]
- downloads
Number of times the flight plan has been downloaded
- Type:
Optional[int]
- popularity
Relative popularity of the plan based on downloads and likes
- Type:
Optional[int]
- notes
Extra information about the flight plan
- Type:
Optional[str]
- encodedPolyline
Encoded polyline of route, which can be used for quickly drawing maps
- Type:
Optional[str]
- createdAt
UTC Date and time of flight plan creation
- Type:
Optional[datetime]
- updatedAt
UTC Date and time of the last flight plan edit
- Type:
Optional[datetime]
- tags
List of flight plan tags
- Type:
Optional[List[str]]
- application
Application associated with the item.
None
if no application linked- Type:
Optional[Application]
- class flightplandb.datatypes.PlanQuery(q: Optional[str] = None, From: Optional[str] = None, to: Optional[str] = None, fromICAO: Optional[str] = None, toICAO: Optional[str] = None, fromName: Optional[str] = None, toName: Optional[str] = None, flightNumber: Optional[str] = None, distanceMin: Optional[str] = None, distanceMax: Optional[str] = None, tags: Optional[str] = None, includeRoute: Optional[bool] = None)
Simple search query.
- q
Username, tags and the flight number
- Type:
Optional[str]
- From
From search query. Search departure ICAO & name
- Type:
Optional[str]
- to
To search query. Search departure ICAO & name
- Type:
Optional[str]
- fromICAO
Matches departure airport ICAO
- Type:
Optional[str]
- toICAO
Matches destination airport ICAO
- Type:
Optional[str]
- fromName
Matches departure airport name
- Type:
Optional[str]
- toName
Matches destination airport name
- Type:
Optional[str]
- flightNumber
Matches flight number
- Type:
Optional[str]
- distanceMin
Minimum route distance
- Type:
Optional[str]
- distanceMax
Maximum route distance, with units determined by the X-Units header
- Type:
Optional[str]
- tags
Tag names to search, comma separated
- Type:
Optional[str]
- class flightplandb.datatypes.GenerateQuery(fromICAO: str, toICAO: str, useNAT: Optional[bool] = True, usePACOT: Optional[bool] = True, useAWYLO: Optional[bool] = True, useAWYHI: Optional[bool] = True, cruiseAlt: Optional[float] = 35000, cruiseSpeed: Optional[float] = 420, ascentRate: Optional[float] = 2500, ascentSpeed: Optional[float] = 250, descentRate: Optional[float] = 1500, descentSpeed: Optional[float] = 250)
Generate plan query.
- fromICAO
The departure airport ICAO code
- Type:
str
- toICAO
The destination airport ICAO code
- Type:
str
- useNAT
Use Pacific Organized Track System tracks in the route generation
- Type:
Optional[bool]
- usePACOT
Use Pacific Organized Track System tracks in the route generation
- Type:
Optional[bool]
- useAWYLO
Use low-level airways in the route generation
- Type:
Optional[bool]
- useAWYHI
Use high-level airways in the route generation
- Type:
Optional[bool]
- cruiseAlt
Basic flight profile cruise altitude (altitude)
- Type:
Optional[float]
- cruiseSpeed
Basic flight profile cruise speed (speed)
- Type:
Optional[float]
- ascentRate
Basic flight profile ascent rate (climb rate)
- Type:
Optional[float]
- ascentSpeed
Basic flight profile ascent speed (speed)
- Type:
Optional[float]
- descentRate
Basic flight profile descent rate (climb rate)
- Type:
Optional[float]
- descentSpeed
Basic flight profile descent speed (speed)
- Type:
Optional[float]
- class flightplandb.datatypes.Tag(name: str, description: Optional[str], planCount: int, popularity: int)
Flight plan tag
- name
Tag name
- Type:
str
- description
Description of the tag.
None
if no description is available- Type:
Optional[str]
- planCount
Number of plans with this tag
- Type:
int
- popularity
Popularity index of the tag
- Type:
int
- class flightplandb.datatypes.Timezone(name: Optional[str], offset: Optional[float])
Contains timezone information
- name
The IANA timezone the airport is located in.
None
if not available- Type:
Optional[str]
- offset
The number of seconds the airport timezone is currently offset from UTC. Positive is ahead of UTC.
None
if not available- Type:
Optional[float]
- class flightplandb.datatypes.Times(sunrise: datetime, sunset: datetime, dawn: datetime, dusk: datetime)
Contains relevant times information
- sunrise
Time of sunrise
- Type:
datetime
- sunset
Time of sunset
- Type:
datetime
- dawn
Time of dawn
- Type:
datetime
- dusk
Time of dusk
- Type:
datetime
- class flightplandb.datatypes.RunwayEnds(ident: str, lat: float, lon: float)
Ends of
Runway
. No duh.- ident
The identifier of the runway end
- Type:
str
- lat
The latitude of the runway end
- Type:
float
- lon
The longitude of the runway end
- Type:
float
Describes a navigational aid
The navaid identifier
- Type:
str
The navaid type. Must be one of
Navaid.validtypes
- Type:
str
The navaid latitude
- Type:
float
The navaid longitude
- Type:
float
The airport associated with the navaid
- Type:
str
The runway associated with the navaid
- Type:
str
The navaid frequency in Hz.
None
if not available- Type:
Optional[float]
The navaid slope in degrees from horizontal used for type GS
- Type:
Optional[float]
The navaid bearing in true degrees.
None
if not available- Type:
Optional[float]
The navaid name.
None
if not available- Type:
Optional[str]
The navaid elevation above mean sea level (elevation)
- Type:
float
The navaid range; units determined by the X-Units header (distance)
- Type:
float
Do not change. Valid Navaid types.
- Type:
List[str]
- class flightplandb.datatypes.Runway(ident: str, width: float, length: float, bearing: float, surface: str, markings: List[str], lighting: List[str], thresholdOffset: float, overrunLength: float, ends: List[RunwayEnds], navaids: List[Navaid])
Describes a runway at an
Airport
- ident
The runway identifier
- Type:
str
- width
The runway width, with units determined by the X-Units header (length)
- Type:
float
- length
The runway length, with units determined by the X-Units header (length)
- Type:
float
- bearing
The runway bearing in true degrees
- Type:
float
- surface
The runway surface material
- Type:
str
- markings
List of strings of runway markings
- Type:
List[str]
- lighting
List of strings of runway lighting types
- Type:
List[str]
- thresholdOffset
The distance of the displaced threshold from the runway end (length)
- Type:
float
- overrunLength
The runway overrun length, with units determined by the X-Units header
- Type:
float
- ends
Two element List containing the location of the two ends of the runway
- Type:
List[RunwayEnds]
List of navaids associated with the current runway
- Type:
List[Navaid]
- class flightplandb.datatypes.Frequency(type: str, frequency: float, name: Optional[str])
Holds frequency information
- type
The frequency type
- Type:
str
- frequency
The frequency in Hz
- Type:
float
- name
The frequency name.
None
if not available- Type:
Optional[str]
- class flightplandb.datatypes.Weather(METAR: Optional[str], TAF: Optional[str])
Contains weather reports and predictions
- METAR
Current METAR report for the airport
- Type:
Optional[str]
- TAF
Current TAF report for the airport
- Type:
Optional[str]
- class flightplandb.datatypes.Airport(ICAO: str, IATA: Optional[str], name: str, regionName: Optional[str], elevation: float, lat: float, lon: float, magneticVariation: float, timezone: Timezone, times: Times, runwayCount: int, runways: List[Runway], frequencies: List[Frequency], weather: Weather)
Describes an airport. An oversized dataclass with more information than you'd need in 500 years.
- ICAO
The airport ICAO code
- Type:
str
- IATA
The airport IATA code.
None
if not available- Type:
Optional[str]
- name
The airport name
- Type:
str
- regionName
The geographical region the airport is located in.
None
if not available- Type:
Optional[str]
- elevation
The airport elevation above mean sea level (elevation)
- Type:
float
- lat
The airport latitude in degrees
- Type:
float
- lon
The airport longitude in degrees
- Type:
float
- magneticVariation
The current magnetic variation/declination at the airport, based on the World Magnetic Model
- Type:
float
- runwayCount
The number of runways at the airport
- Type:
int
- class flightplandb.datatypes.Track(ident: Union[str, int], route: Route, validFrom: datetime, validTo: datetime)
Used for NATS and PACOTS tracks
- ident
Track identifier; str in NATS, int in PACOTS
- Type:
Union[str, int]
- validFrom
UTC datetime the track is valid from
- Type:
datetime
- validTo
UTC datetime the track is valid to
- Type:
datetime
Describes a navigational aid, as returned by the search function
The navaid identifier
- Type:
str
The navaid type. Must be one of
SearchNavaid.validtypes
- Type:
str
The navaid latitude
- Type:
float
The navaid longitude
- Type:
float
The navaid elevation above mean sea level (elevation)
- Type:
float
The runway associated with the navaid.
None
if not available- Type:
Optional[str]
The ICAO of the airport associated with the navaid.
None
if not available- Type:
Optional[str]
The navaid name.
None
if not available- Type:
Optional[float]
Do not change. Valid SearchNavaid types
- Type:
List[str]