# airport_movement.h File Reference

Heart of the airports and their finite state machines. More...

Go to the source code of this file.

## Data Structures

struct | AirportFTAbuildup

## Defines

#define | AMD(x, y, flags, dir) { x, y, flags, {dir} }

## Variables

static const AirportMovingData | _airport_moving_data_dummy []
static const AirportMovingData | _airport_moving_data_country [22]
static const AirportMovingData | _airport_moving_data_commuter [37]
static const AirportMovingData | _airport_moving_data_town []
static const AirportMovingData | _airport_moving_data_metropolitan [28]
static const AirportMovingData | _airport_moving_data_international [51]
static const AirportMovingData | _airport_moving_data_intercontinental [77]
static const AirportMovingData | _airport_moving_data_heliport [9]
static const AirportMovingData | _airport_moving_data_helidepot [18]
static const AirportMovingData | _airport_moving_data_helistation [33]
static const AirportMovingData | _airport_moving_data_oilrig [9]
static const byte | _airport_entries_dummy [] = {0, 1, 2, 3}
static const AirportFTAbuildup | _airport_fta_dummy []
static const TileIndexDiffC | _airport_depots_country [] = {{3, 0}}
static const byte | _airport_terminal_country [] = {1, 2}
static const byte | _airport_entries_country [] = {16, 15, 18, 17}
static const AirportFTAbuildup | _airport_fta_country []
static const TileIndexDiffC | _airport_depots_commuter [] = { { 4, 0 } }
static const byte | _airport_terminal_commuter [] = { 1, 3 }
static const byte | _airport_helipad_commuter [] = { 1, 2 }
static const byte | _airport_entries_commuter [] = {22, 21, 24, 23}
static const AirportFTAbuildup | _airport_fta_commuter []
static const TileIndexDiffC | _airport_depots_city [] = { { 5, 0 } }
static const byte | _airport_terminal_city [] = { 1, 3 }
static const byte | _airport_entries_city [] = {26, 29, 27, 28}
static const AirportFTAbuildup | _airport_fta_city []
static const TileIndexDiffC | _airport_depots_metropolitan [] = { { 5, 0 } }
static const byte | _airport_terminal_metropolitan [] = { 1, 3 }
static const byte | _airport_entries_metropolitan [] = {20, 19, 22, 21}
static const AirportFTAbuildup | _airport_fta_metropolitan []
static const TileIndexDiffC | _airport_depots_international [] = { { 0, 3 }, { 6, 1 } }
static const byte | _airport_terminal_international [] = { 2, 3, 3 }
static const byte | _airport_helipad_international [] = { 1, 2 }
static const byte | _airport_entries_international [] = { 38, 37, 40, 39 }
static const AirportFTAbuildup | _airport_fta_international []
static const TileIndexDiffC | _airport_depots_intercontinental [] = { { 0, 5 }, { 8, 4 } }
static const byte | _airport_terminal_intercontinental [] = { 2, 4, 4 }
static const byte | _airport_helipad_intercontinental [] = { 1, 2 }
static const byte | _airport_entries_intercontinental [] = { 44, 43, 46, 45 }
static const AirportFTAbuildup | _airport_fta_intercontinental []
static const byte | _airport_helipad_heliport_oilrig [] = { 1, 1 }
static const byte | _airport_entries_heliport_oilrig [] = { 7, 7, 7, 7 }
static const AirportFTAbuildup | _airport_fta_heliport_oilrig []
static const TileIndexDiffC | _airport_depots_helidepot [] = { { 1, 0 } }
static const byte | _airport_helipad_helidepot [] = { 1, 1 }
static const byte | _airport_entries_helidepot [] = { 4, 4, 4, 4 }
static const AirportFTAbuildup | _airport_fta_helidepot []
static const TileIndexDiffC | _airport_depots_helistation [] = { { 0, 0 } }
static const byte | _airport_helipad_helistation [] = { 1, 3 }
static const byte | _airport_entries_helistation [] = { 25, 25, 25, 25 }
static const AirportFTAbuildup | _airport_fta_helistation []

## Detailed Description

Heart of the airports and their finite state machines.

Definition in file airport_movement.h.

## Variable Documentation

const AirportFTAbuildup _airport_fta_country[]`[static]`

Initial value:

     {
      {  0, HANGAR, NOTHING_block, 1 },
      {  1, 255, AIRPORT_BUSY_block, 0 }, { 1, HANGAR, 0, 0 }, { 1, TERM1, TERM1_block, 2 }, { 1, TERM2, 0, 4 }, { 1, HELITAKEOFF, 0, 19 }, { 1, 0, 0, 6 },
      {  2, TERM1, TERM1_block, 1 },
      {  3, TERM2, TERM2_block, 5 },
      {  4, 255, AIRPORT_BUSY_block, 0 }, { 4, TERM2, 0, 5 }, { 4, HANGAR, 0, 1 }, { 4, TAKEOFF, 0, 6 }, { 4, HELITAKEOFF, 0, 1 },
      {  5, 255, AIRPORT_BUSY_block, 0 }, { 5, TERM2, TERM2_block, 3 }, { 5, 0, 0, 4 },
      {  6, 0, AIRPORT_BUSY_block, 7 },

      {  7, TAKEOFF, AIRPORT_BUSY_block, 8 },
      {  8, STARTTAKEOFF, NOTHING_block, 9 },
      {  9, ENDTAKEOFF, NOTHING_block, 0 },

      { 10, FLYING, NOTHING_block, 15 }, { 10, LANDING, 0, 11 }, { 10, HELILANDING, 0, 20 },
      { 11, LANDING, AIRPORT_BUSY_block, 12 },
      { 12, 0, AIRPORT_BUSY_block, 13 },
      { 13, ENDLANDING, AIRPORT_BUSY_block, 14 }, { 13, TERM2, 0, 5 }, { 13, 0, 0, 14 },
      { 14, 0, AIRPORT_BUSY_block, 1 },

      { 15, 0, NOTHING_block, 16 },
      { 16, 0, NOTHING_block, 17 },
      { 17, 0, NOTHING_block, 18 },
      { 18, 0, NOTHING_block, 10 },
      { 19, HELITAKEOFF, NOTHING_block, 0 },
      { 20, HELILANDING, AIRPORT_BUSY_block, 21 },
      { 21, HELIENDLANDING, AIRPORT_BUSY_block, 1 },
      { MAX_ELEMENTS, 0, 0, 0 }
    }

Definition at line 413 of file airport_movement.h.

const AirportFTAbuildup _airport_fta_dummy[]`[static]`

Initial value:

     {
      { 0, 0, 0, 3},
      { 1, 0, 0, 0},
      { 2, 0, 0, 1},
      { 3, 0, 0, 2},
      { MAX_ELEMENTS, 0, 0, 0 }
    }

Definition at line 400 of file airport_movement.h.

const AirportFTAbuildup _airport_fta_helidepot[]`[static]`

Initial value:

     {
      {  0, HANGAR, NOTHING_block, 1 },
      {  1, 255, HANGAR2_AREA_block, 0 }, { 1, HANGAR, 0, 0 }, { 1, HELIPAD1, HELIPAD1_block, 14 }, { 1, HELITAKEOFF, 0, 15 }, { 1, 0, 0, 0 },
      {  2, FLYING, NOTHING_block, 3 }, { 2, HELILANDING, PRE_HELIPAD_block, 7 }, { 2, HANGAR, 0, 12 }, { 2, HELITAKEOFF, NOTHING_block, 16 },

      {  3, 0, NOTHING_block, 4 },
      {  4, 0, NOTHING_block, 5 },
      {  5, 0, NOTHING_block, 6 },
      {  6, 0, NOTHING_block, 2 },

      {  7, HELILANDING, PRE_HELIPAD_block, 8 },
      {  8, HELIENDLANDING, PRE_HELIPAD_block, 8 }, { 8, HELIPAD1, 0, 9 }, { 8, HANGAR, 0, 12 }, { 8, 0, 0, 2 },
      {  9, 0, NOTHING_block, 10 },

      { 10, 255, NOTHING_block, 10 }, { 10, HELIPAD1, HELIPAD1_block, 14 }, { 10, HANGAR, 0, 1 }, { 10, 0, 0, 14 },

      { 11, HELITAKEOFF, NOTHING_block, 0 },
      { 12, 0, HANGAR2_AREA_block, 13 },
      { 13, 0, HANGAR2_AREA_block, 1 },
      { 14, HELIPAD1, HELIPAD1_block, 14 }, { 14, HANGAR, 0, 1 }, { 14, HELITAKEOFF, 0, 17 },
      { 15, HELITAKEOFF, NOTHING_block, 0 },
      { 16, HELITAKEOFF, 0, 14 },
      { 17, 0, NOTHING_block, 11 },
      { MAX_ELEMENTS, 0, 0, 0 }
    }

Definition at line 754 of file airport_movement.h.

const AirportFTAbuildup _airport_fta_heliport_oilrig[]`[static]`

Initial value:

     {
      { 0, HELIPAD1, HELIPAD1_block, 1 },
      { 1, HELITAKEOFF, NOTHING_block, 0 },
      { 2, 255, AIRPORT_BUSY_block, 0 }, { 2, HELILANDING, 0, 3 }, { 2, HELITAKEOFF, 0, 1 },
      { 3, HELILANDING, AIRPORT_BUSY_block, 4 },
      { 4, HELIENDLANDING, AIRPORT_BUSY_block, 4 }, { 4, HELIPAD1, HELIPAD1_block, 0 }, { 4, HELITAKEOFF, 0, 2 },

      { 5, 0, NOTHING_block, 6 },
      { 6, 0, NOTHING_block, 7 },
      { 7, 0, NOTHING_block, 8 },
      { 8, FLYING, NOTHING_block, 5 }, { 8, HELILANDING, HELIPAD1_block, 2 },
      { MAX_ELEMENTS, 0, 0, 0 }
    }

Definition at line 736 of file airport_movement.h.

const AirportMovingData _airport_moving_data_country[22]`[static]`

Initial value:

     {
      AMD(   53,    3, AMED_EXACTPOS,                   DIR_SE),
      AMD(   53,   27, 0,                               DIR_N ),
      AMD(   32,   23, AMED_EXACTPOS,                   DIR_NW),
      AMD(   10,   23, AMED_EXACTPOS,                   DIR_NW),
      AMD(   43,   37, 0,                               DIR_N ),
      AMD(   24,   37, 0,                               DIR_N ),
      AMD(   53,   37, 0,                               DIR_N ),
      AMD(   61,   40, AMED_EXACTPOS,                   DIR_NE),
      AMD(    3,   40, AMED_NOSPDCLAMP,                 DIR_N ),
      AMD(  -79,   40, AMED_NOSPDCLAMP | AMED_TAKEOFF,  DIR_N ),
      AMD(  177,   40, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(   56,   40, AMED_NOSPDCLAMP | AMED_LAND,     DIR_N ),
      AMD(    3,   40, AMED_NOSPDCLAMP | AMED_BRAKE,    DIR_N ),
      AMD(    7,   40, 0,                               DIR_N ),
      AMD(   53,   40, 0,                               DIR_N ),
      AMD(    1,  193, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(    1,    1, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(  257,    1, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(  273,   47, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(   44,   37, AMED_HELI_RAISE,                 DIR_N ),
      AMD(   44,   40, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(   44,   40, AMED_HELI_LOWER,                 DIR_N ),
    }

Definition at line 38 of file airport_movement.h.

const AirportMovingData _airport_moving_data_dummy[]`[static]`

Initial value:

     {
      AMD(    0,    0, AMED_NOSPDCLAMP | AMED_SLOWTURN,     DIR_N ),
      AMD(    0,   96, AMED_NOSPDCLAMP | AMED_SLOWTURN,     DIR_N ),
      AMD(   96,   96, AMED_NOSPDCLAMP | AMED_SLOWTURN,     DIR_N ),
      AMD(   96,    0, AMED_NOSPDCLAMP | AMED_SLOWTURN,     DIR_N ),
    }

Definition at line 30 of file airport_movement.h.

const AirportMovingData _airport_moving_data_helidepot[18]`[static]`

Initial value:

     {
      AMD(   24,    4, AMED_EXACTPOS,                   DIR_NE),
      AMD(   24,   28, 0,                               DIR_N ),
      AMD(    5,   38, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(  -15,  -15, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(  -15,  -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(   49,  -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(   49,  -15, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(    8,   32, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_NW),
      AMD(    8,   32, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_NW),
      AMD(    8,   16, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_NW),
      AMD(    8,   16, AMED_HELI_LOWER,                 DIR_NW),
      AMD(    8,   24, AMED_HELI_RAISE,                 DIR_N ),
      AMD(   32,   24, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_NW),
      AMD(   32,   24, AMED_HELI_LOWER,                 DIR_NW),
      AMD(    8,   24, AMED_EXACTPOS,                   DIR_NW),
      AMD(   24,   28, AMED_HELI_RAISE,                 DIR_N ),
      AMD(    8,   24, AMED_HELI_RAISE,                 DIR_SW),
      AMD(    8,   24, AMED_SLOWTURN | AMED_EXACTPOS,   DIR_E ),
    }

Definition at line 324 of file airport_movement.h.

const AirportMovingData _airport_moving_data_heliport[9]`[static]`

Initial value:

     {
      AMD(    5,    9, AMED_EXACTPOS,                   DIR_NE),
      AMD(    2,    9, AMED_HELI_RAISE,                 DIR_N ),
      AMD(   -3,    9, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(   -3,    9, AMED_HELI_LOWER,                 DIR_N ),
      AMD(    2,    9, 0,                               DIR_N ),
      AMD(  -31,   59, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(  -31,  -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(   49,  -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(   70,    9, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
    }

Definition at line 311 of file airport_movement.h.

const AirportMovingData _airport_moving_data_metropolitan[28]`[static]`

Initial value:

     {
      AMD(   85,    3, AMED_EXACTPOS,                   DIR_SE),
      AMD(   85,   22, 0,                               DIR_N ),
      AMD(   26,   41, AMED_EXACTPOS,                   DIR_SW),
      AMD(   56,   22, AMED_EXACTPOS,                   DIR_SE),
      AMD(   38,    8, AMED_EXACTPOS,                   DIR_SW),
      AMD(   65,    6, 0,                               DIR_N ),
      AMD(   80,   27, 0,                               DIR_N ),
      AMD(   49,   58, 0,                               DIR_N ),
      AMD(   72,   58, 0,                               DIR_N ),
      AMD(   72,   69, 0,                               DIR_N ),
      AMD(   89,   69, AMED_EXACTPOS,                   DIR_NE),
      AMD(    3,   69, AMED_NOSPDCLAMP,                 DIR_N ),
      AMD(  -79,   69, AMED_NOSPDCLAMP | AMED_TAKEOFF,  DIR_N ),
      AMD(  177,   85, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(   89,   85, AMED_NOSPDCLAMP | AMED_LAND,     DIR_N ),
      AMD(    3,   85, AMED_NOSPDCLAMP | AMED_BRAKE,    DIR_N ),
      AMD(   21,   85, 0,                               DIR_N ),
      AMD(   21,   69, 0,                               DIR_N ),
      AMD(   21,   58, AMED_EXACTPOS,                   DIR_SW),
      AMD(    1,  193, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(    1,    1, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(  257,    1, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(  273,   49, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(   44,   58, 0,                               DIR_N ),
      AMD(   44,   63, AMED_HELI_RAISE,                 DIR_N ),
      AMD(   15,   54, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(   15,   54, AMED_HELI_LOWER,                 DIR_N ),
      AMD(   21,   58, AMED_EXACTPOS,                   DIR_SW),
    }

Definition at line 140 of file airport_movement.h.

const AirportMovingData _airport_moving_data_oilrig[9]`[static]`

Initial value:

     {
      AMD(   31,    9, AMED_EXACTPOS,                   DIR_NE),
      AMD(   28,    9, AMED_HELI_RAISE,                 DIR_N ),
      AMD(   23,    9, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(   23,    9, AMED_HELI_LOWER,                 DIR_N ),
      AMD(   28,    9, 0,                               DIR_N ),
      AMD(  -31,   69, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(  -31,  -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(   69,  -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
      AMD(   69,    9, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
    }

Definition at line 383 of file airport_movement.h.