{"id":41229,"date":"2026-01-29T09:57:05","date_gmt":"2026-01-29T14:57:05","guid":{"rendered":"https:\/\/developer.x-plane.com\/article\/flight-initialization-api\/"},"modified":"2026-01-29T12:45:51","modified_gmt":"2026-01-29T17:45:51","slug":"flight-initialization-api","status":"publish","type":"article","link":"https:\/\/developer.x-plane.com\/article\/flight-initialization-api\/","title":{"rendered":"Flight Initialization API"},"content":{"rendered":"<h1 id=\"flight-initialization-api-json-structure\">Flight Initialization API JSON structure<\/h1>\n<p>The initialization JSON is structured as an object containing various keys that define different aspects of the flight. The required keys differ depending on whether you&#39;re starting a new flight or updating an existing one.<\/p>\n<h3 id=\"starting-a-new-flight\">Starting a New Flight<\/h3>\n<p>To start a new flight, you must provide:<\/p>\n<ul>\n<li><strong>Aircraft specification<\/strong> via the <code>aircraft<\/code> key<\/li>\n<li><strong>A start location key<\/strong> (exactly one of: <code>runway_start<\/code>, <code>ramp_start<\/code>, <code>lle_ground_start<\/code>, <code>lle_air_start<\/code>, or <code>boat_start<\/code>)<\/li>\n<\/ul>\n<p>All other keys are optional and will use default values if omitted.<\/p>\n<h3 id=\"updating-an-ongoing-flight\">Updating an Ongoing Flight<\/h3>\n<p>When updating a flight, all keys are optional. Omitted keys leave the corresponding parameters unchanged. Note that you cannot change the start location or aircraft during an update &#8211; these require starting a new flight.<\/p>\n<h2 id=\"aircraft-configuration\">Aircraft Configuration<\/h2>\n<h3 id=\"user-aircraft\">User Aircraft<\/h3>\n<pre>&quot;aircraft&quot;: {\n    &quot;path&quot;: &quot;Aircraft\/Laminar Research\/Cessna 172SP\/Cessna_172SP.acf&quot;,\n    &quot;livery&quot;: &quot;old_style&quot;\n}\n<\/pre>\n<p><strong>Required fields:<\/strong><\/p>\n<ul>\n<li><code>path<\/code> (string) &#8211; Path to .acf file relative to X-Plane root directory<\/li>\n<\/ul>\n<p><strong>Optional fields:<\/strong><\/p>\n<ul>\n<li><code>livery<\/code> (string) &#8211; Name of livery subdirectory in the aircraft&#39;s liveries folder<\/li>\n<\/ul>\n<h2 id=\"start-location-keys\">Start Location Keys<\/h2>\n<p>You must specify exactly one start location type. Having multiple start keys or no start key makes the specification invalid.<\/p>\n<h3 id=\"runway-start\">Runway Start<\/h3>\n<pre>&quot;runway_start&quot;: {\n    &quot;airport_id&quot;: &quot;KBOS&quot;,\n    &quot;runway&quot;: &quot;22L&quot;,\n    &quot;final_distance_in_nautical_miles&quot;: 3.5,\n    &quot;tow_type&quot;: &quot;tug&quot;,\n    &quot;tow_aircraft&quot;: {\n        &quot;path&quot;: &quot;Aircraft\/Laminar Research\/Cessna 172\/C172.acf&quot;\n    }\n}\n<\/pre>\n<p><strong>Required fields:<\/strong><\/p>\n<ul>\n<li><code>airport_id<\/code> (string) &#8211; Valid X-Plane airport ID<\/li>\n<li><code>runway<\/code> (string) &#8211; Runway ID at the specified airport<\/li>\n<\/ul>\n<p><strong>Optional fields:<\/strong><\/p>\n<ul>\n<li><code>final_distance_in_nautical_miles<\/code> (float) &#8211; If present, starts on final approach at this distance. Otherwise starts at runway threshold<\/li>\n<li><code>tow_type<\/code> (string) &#8211; One of <code>&quot;tug&quot;<\/code>, <code>&quot;winch&quot;<\/code>, or <code>&quot;none&quot;<\/code> (default: <code>&quot;none&quot;<\/code>)<\/li>\n<li><code>tow_aircraft<\/code> (object) &#8211; Aircraft specification for tow plane. Required if <code>tow_type<\/code> is <code>&quot;tug&quot;<\/code><\/li>\n<\/ul>\n<p><strong>Note:<\/strong> You cannot specify both <code>final_distance_in_nautical_miles<\/code> and <code>tow_type<\/code> simultaneously.<\/p>\n<h3 id=\"ramp-start\">Ramp Start<\/h3>\n<pre>&quot;ramp_start&quot;: {\n    &quot;airport_id&quot;: &quot;KBOS&quot;,\n    &quot;ramp&quot;: &quot;B3&quot;\n}\n<\/pre>\n<p><strong>Required fields:<\/strong><\/p>\n<ul>\n<li><code>airport_id<\/code> (string) &#8211; Valid X-Plane airport ID<\/li>\n<li><code>ramp<\/code> (string) &#8211; Name of the ramp start location at the airport<\/li>\n<\/ul>\n<h3 id=\"ground-start-latlon\">Ground Start (Lat\/Lon)<\/h3>\n<pre>&quot;lle_ground_start&quot;: {\n    &quot;latitude&quot;: 42.23492,\n    &quot;longitude&quot;: -72.18281,\n    &quot;heading_true&quot;: 310.1\n}\n<\/pre>\n<p><strong>Required fields:<\/strong><\/p>\n<ul>\n<li><code>latitude<\/code> (float) &#8211; Latitude in degrees (-90 to 90)<\/li>\n<li><code>longitude<\/code> (float) &#8211; Longitude in degrees (-180 to 180)<\/li>\n<li><code>heading_true<\/code> (float) &#8211; True heading in degrees (0 to 360)<\/li>\n<\/ul>\n<h3 id=\"air-start-latlon\">Air Start (Lat\/Lon)<\/h3>\n<pre>&quot;lle_air_start&quot;: {\n    &quot;latitude&quot;: 42.120,\n    &quot;longitude&quot;: -71.20,\n    &quot;elevation_in_meters&quot;: 310,\n    &quot;heading_true&quot;: 150.0,\n    &quot;speed_in_meters_per_second&quot;: 120,\n    &quot;pitch_in_degrees&quot;: 1.2\n}\n<\/pre>\n<p><strong>Required fields:<\/strong><\/p>\n<ul>\n<li><code>latitude<\/code> (float) &#8211; Latitude in degrees (-90 to 90)<\/li>\n<li><code>longitude<\/code> (float) &#8211; Longitude in degrees (-180 to 180)<\/li>\n<li><code>elevation_in_meters<\/code> (float) &#8211; Elevation MSL in meters<\/li>\n<li><code>heading_true<\/code> (float) &#8211; True heading in degrees (0 to 360)<\/li>\n<li>One of the following two options to specify the speed\n<ul>\n<li><code>speed_in_meters_per_second<\/code> (float)<\/li>\n<li><code>speed_enum<\/code> (string) &#8211; One of <code>&quot;short_field_approach&quot;<\/code>, <code>&quot;normal_approach&quot;<\/code>, or <code>&quot;cruise&quot;<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>Optional fields:<\/strong><\/p>\n<ul>\n<li><code>pitch_in_degrees<\/code> (float) &#8211; Aircraft pitch (default: 0)<\/li>\n<\/ul>\n<h3 id=\"boat-start\">Boat Start<\/h3>\n<pre>&quot;boat_start&quot;: {\n    &quot;boat_name&quot;: &quot;carrier&quot;,\n    &quot;start_position&quot;: &quot;catapult_1&quot;,\n    &quot;boat_location&quot;: {\n        &quot;latitude&quot;: 42.293432,\n        &quot;longitude&quot;: -69.23423\n    },\n    &quot;final_distance_in_nautical_miles&quot;: 1.5\n}\n<\/pre>\n<p><strong>Required fields:<\/strong><\/p>\n<ul>\n<li><code>boat_name<\/code> (string) &#8211; One of <code>&quot;carrier&quot;<\/code> or <code>&quot;frigate&quot;<\/code><\/li>\n<\/ul>\n<p><strong>Optional fields:<\/strong><\/p>\n<ul>\n<li><code>start_position<\/code> (string) &#8211; One of <code>&quot;catapult_1&quot;<\/code>, <code>&quot;catapult_2&quot;<\/code>, <code>&quot;catapult_3&quot;<\/code>, <code>&quot;catapult_4&quot;<\/code>, or <code>&quot;deck&quot;<\/code>. Required for carrier deck starts. Not allowed with <code>final_distance_in_nautical_miles<\/code><\/li>\n<li><code>boat_location<\/code> (object) &#8211; Latitude\/longitude to relocate the boat<\/li>\n<li><code>final_distance_in_nautical_miles<\/code> (float) &#8211; If present, starts on final approach<\/li>\n<\/ul>\n<h3 id=\"weight-and-balance\">Weight and Balance<\/h3>\n<pre>&quot;weight&quot;: {\n    &quot;payload_weight_in_kilograms&quot;: [100, 200, 300, 400, 500, 600, 700, 800, 900],\n    &quot;fueltank_weight_in_kilograms&quot;: [100, 200, 300, 400, 500, 600, 700, 800, 900],\n    &quot;jato_weight_in_kilograms&quot;: 500,\n    &quot;slung_load&quot;: {\n        &quot;path_to_obj&quot;: &quot;path\/to\/slung\/load.obj&quot;,\n        &quot;weight_in_kilograms&quot;: 100\n    },\n    &quot;jettisonable_weight_in_kilograms&quot;: 250,\n    &quot;shiftable_weight_in_kilograms&quot;: 75,\n    &quot;deice_holdover_time_in_minutes&quot;: 60,\n    &quot;oxygen_pressure_in_millibars&quot;: 3000,\n    &quot;deice_fluid_in_liters&quot;: 1500,\n    &quot;external_fueltank_weight_in_kilograms&quot;: [1000, 1000]\n}\n<\/pre>\n<p><strong>Required fields:<\/strong><\/p>\n<ul>\n<li><code>payload_weight_in_kilograms<\/code> (array) &#8211; Up to 9 payload station weights<\/li>\n<li><code>fueltank_weight_in_kilograms<\/code> (array) &#8211; 1-9 fuel tank weights in kilograms<\/li>\n<\/ul>\n<p><strong>Optional fields:<\/strong><\/p>\n<ul>\n<li><code>jato_weight_in_kilograms<\/code> (float) &#8211; JATO system weight<\/li>\n<li><code>slung_load<\/code> (object) &#8211; Slung load specification with <code>weight_in_kilograms<\/code> and <code>path_to_obj<\/code><\/li>\n<li><code>jettisonable_weight_in_kilograms<\/code> (float) &#8211; Jettisonable weight<\/li>\n<li><code>shiftable_weight_in_kilograms<\/code> (float) &#8211; Shiftable weight for control<\/li>\n<li><code>deice_holdover_time_in_minutes<\/code> (float)<\/li>\n<li><code>oxygen_pressure_in_millibars<\/code> (float)<\/li>\n<li><code>deice_fluid_in_liters<\/code> (float)<\/li>\n<li><code>external_fueltank_weight_in_kilograms<\/code> (array) &#8211; External fuel tank weights<\/li>\n<\/ul>\n<h3 id=\"engine-status\">Engine Status<\/h3>\n<pre>&quot;engine_status&quot;: {\n    &quot;all_engines&quot;: {\n        &quot;running&quot;: true\n    }\n}\n<\/pre>\n<p><strong>Required fields:<\/strong><\/p>\n<ul>\n<li><code>all_engines.running<\/code> (boolean) &#8211; Whether all engines should be running or not<\/li>\n<\/ul>\n<h3 id=\"weapons\">Weapons<\/h3>\n<pre>&quot;weapons&quot;: [\n    {\n        &quot;index&quot;: 0,\n        &quot;filename&quot;: &quot;AIM7-Sparrow.wpn&quot;\n    },\n    {\n        &quot;index&quot;: 1,\n        &quot;filename&quot;: &quot;AIM9-Sidewinder.wpn&quot;\n    }\n]\n<\/pre>\n<p>Array of weapon loadout specifications:<\/p>\n<ul>\n<li><code>index<\/code> (integer) &#8211; Hardpoint index from Plane Maker<\/li>\n<li><code>filename<\/code> (string) &#8211; Name of .wpn file (searches aircraft folder first, then global)<\/li>\n<\/ul>\n<h3 id=\"failures\">Failures<\/h3>\n<pre>&quot;failures&quot;: {\n    &quot;fix_everything&quot;: false,\n    &quot;mean_time_between_failures_in_hours&quot;: 5000.0,\n    &quot;operation_failures&quot;: [\n        {\n            &quot;name&quot;: &quot;fuel_water&quot;,\n            &quot;status&quot;: &quot;fail_at_speed_in_knots&quot;,\n            &quot;value&quot;: 150.0\n        },\n        {\n            &quot;name&quot;: &quot;inverter0&quot;,\n            &quot;status&quot;: &quot;fail_at_altitude_in_feet&quot;,\n            &quot;value&quot;: 5000.0\n        }\n    ]\n}\n<\/pre>\n<p><strong>Optional fields:<\/strong><\/p>\n<ul>\n<li><code>fix_everything<\/code> (boolean) &#8211; Whether to fix all systems before applying new failures (default: true)<\/li>\n<li><code>mean_time_between_failures_in_hours<\/code> (float) &#8211; MTBF for random failures (0 = disabled)<\/li>\n<li><code>operation_failures<\/code> (array) &#8211; Array of specific failure configurations<\/li>\n<\/ul>\n<p>Each failure object contains:<\/p>\n<ul>\n<li><code>name<\/code> (string) &#8211; Failure system name<\/li>\n<li><code>status<\/code> (string) &#8211; One of: <code>&quot;always_work&quot;<\/code>, <code>&quot;fail_mean_time_in_hours&quot;<\/code>, <code>&quot;fail_exact_time_in_hours&quot;<\/code>, <code>&quot;fail_at_speed_in_knots&quot;<\/code>, <code>&quot;fail_at_altitude_in_feet&quot;<\/code>, <code>&quot;fail_at_command_trigger&quot;<\/code>, <code>&quot;inoperative&quot;<\/code><\/li>\n<li><code>value<\/code> (float) &#8211; Required for time\/speed\/altitude failure types<\/li>\n<\/ul>\n<h2 id=\"ai-aircraft-and-traffic\">AI Aircraft and Traffic<\/h2>\n<h3 id=\"ai-aircraft\">AI Aircraft<\/h3>\n<pre>&quot;ai_aircraft&quot;: [\n    {\n        &quot;aircraft&quot;: {\n            &quot;path&quot;: &quot;Aircraft\/Laminar Research\/Van&#39;s Aircraft RV-10\/RV-10.acf&quot;\n        },\n        &quot;mission&quot;: &quot;atc&quot;\n    },\n    {\n        &quot;aircraft&quot;: {\n            &quot;path&quot;: &quot;Aircraft\/Laminar Research\/F-4 Phantom II\/F-4.acf&quot;\n        },\n        &quot;mission&quot;: &quot;combat_team_red&quot;\n    }\n]\n<\/pre>\n<p>Array of AI aircraft specifications:<\/p>\n<ul>\n<li><code>aircraft<\/code> (object) &#8211; Aircraft specification (see User Aircraft)<\/li>\n<li><code>mission<\/code> (string) &#8211; One of: <code>&quot;atc&quot;<\/code>, <code>&quot;combat_team_red&quot;<\/code>, <code>&quot;combat_team_blue&quot;<\/code>, <code>&quot;combat_team_green&quot;<\/code>, <code>&quot;combat_team_gold&quot;<\/code><\/li>\n<\/ul>\n<h3 id=\"formation-aircraft\">Formation Aircraft<\/h3>\n<pre>&quot;formation_aircraft&quot;: {\n    &quot;path&quot;: &quot;Aircraft\/Laminar Research\/Cessna 172\/C172.acf&quot;\n}\n<\/pre>\n<p>Specifies an AI aircraft for formation flying. Uses the same aircraft specification format.<\/p>\n<h3 id=\"incursion\">Incursion<\/h3>\n<pre>&quot;incursion&quot;: {\n    &quot;aircraft&quot;: { \n        &quot;path&quot;: &quot;Aircraft\/Laminar Research\/Boeing 737-800\/b738.acf&quot; \n    },\n    &quot;type&quot;: &quot;runway_incursion_arm&quot;\n}\n<\/pre>\n<p><strong>Fields:<\/strong><\/p>\n<ul>\n<li><code>aircraft<\/code> (object) &#8211; Aircraft specification<\/li>\n<li><code>type<\/code> (string) &#8211; One of: <code>&quot;flight_incursion&quot;<\/code>, <code>&quot;runway_incursion_arm&quot;<\/code>, <code>&quot;runway_incursion_execute&quot;<\/code>, <code>&quot;clear_incursion&quot;<\/code><\/li>\n<\/ul>\n<h2 id=\"environment-configuration\">Environment Configuration<\/h2>\n<h3 id=\"date-and-time\">Date and Time<\/h3>\n<p>If you want to specify date and time, exactly one time configuration method must be supplied:<\/p>\n<h3 id=\"system-time\">System Time<\/h3>\n<pre>&quot;use_system_time&quot;: true\n<\/pre>\n<h3 id=\"local-time\">Local Time<\/h3>\n<pre>&quot;local_time&quot;: {\n    &quot;day_of_year&quot;: 100,\n    &quot;time_in_24_hours&quot;: 15.9\n}\n<\/pre>\n<p><strong>Required fields:<\/strong><\/p>\n<ul>\n<li><code>day_of_year<\/code> (integer) &#8211; Day of year (0 = January 1)<\/li>\n<li><code>time_in_24_hours<\/code> (float) &#8211; Time of day in hours (e.g., 13.5 = 1:30 PM)<\/li>\n<\/ul>\n<h3 id=\"gmt-time\">GMT Time<\/h3>\n<pre>&quot;gmt_time&quot;: {\n    &quot;day_of_year&quot;: 100,\n    &quot;time_in_24_hours&quot;: 15.9\n}\n<\/pre>\n<p><strong>Required fields:<\/strong><\/p>\n<ul>\n<li><code>day_of_year<\/code> (integer) &#8211; Day of year (0 = January 1)<\/li>\n<li><code>time_in_24_hours<\/code> (float) &#8211; Time of day in hours (e.g., 13.5 = 1:30 PM)<\/li>\n<\/ul>\n<h3 id=\"time-preset\">Time Preset<\/h3>\n<pre>&quot;time_enum&quot;: &quot;sunset&quot;\n<\/pre>\n<p>Valid values: <code>&quot;day&quot;<\/code>, <code>&quot;sunset&quot;<\/code>, <code>&quot;evening&quot;<\/code>, <code>&quot;night&quot;<\/code><\/p>\n<h3 id=\"weather\">Weather<\/h3>\n<p>If you want to specify new weahter, exactly one weather configuration method must be provided:<\/p>\n<h3 id=\"real-weather\">Real Weather<\/h3>\n<pre>&quot;weather&quot;: &quot;use_real_weather&quot;\n<\/pre>\n<h3 id=\"weather-scenario\">Weather Scenario<\/h3>\n<pre>&quot;weather&quot;: {\n    &quot;definition&quot;: &quot;vfr_few_clouds&quot;,\n    &quot;vertical_speed_in_thermal_in_feet_per_minute&quot;: 250,\n    &quot;wave_height_in_meters&quot;: 2,\n    &quot;wave_direction_in_degrees&quot;: 200,\n    &quot;terrain_state&quot;: &quot;dry&quot;,\n    &quot;variation_across_region_percentage&quot;: 100,\n    &quot;evolution_over_time_enum&quot;: &quot;static&quot;\n}\n<\/pre>\n<p><strong>Required fields:<\/strong><\/p>\n<ul>\n<li><code>definition<\/code> (string or object) &#8211; Preset name or custom weather definition (see below)<\/li>\n<li><code>vertical_speed_in_thermal_in_feet_per_minute<\/code> (float)<\/li>\n<li><code>wave_height_in_meters<\/code> (float)<\/li>\n<li><code>wave_direction_in_degrees<\/code> (float) &#8211; True heading<\/li>\n<li><code>terrain_state<\/code> (string) &#8211; See terrain states below<\/li>\n<li><code>variation_across_region_percentage<\/code> (float)<\/li>\n<li><code>evolution_over_time_enum<\/code> (string) &#8211; See evolution options below<\/li>\n<\/ul>\n<p><strong>Preset definitions:<\/strong><\/p>\n<ul>\n<li><code>&quot;vfr_few_clouds&quot;<\/code><\/li>\n<li><code>&quot;vfr_scattered&quot;<\/code><\/li>\n<li><code>&quot;vfr_broken&quot;<\/code><\/li>\n<li><code>&quot;marginal_vfr_overcast&quot;<\/code><\/li>\n<li><code>&quot;ifr_non_precision&quot;<\/code><\/li>\n<li><code>&quot;ifr_precision&quot;<\/code><\/li>\n<li><code>&quot;convective&quot;<\/code><\/li>\n<li><code>&quot;large_cell_thunderstorm&quot;<\/code><\/li>\n<\/ul>\n<p><strong>Terrain states:<\/strong><\/p>\n<ul>\n<li><code>&quot;dry&quot;<\/code>, <code>&quot;lightly_wet&quot;<\/code>, <code>&quot;medium_wet&quot;<\/code>, <code>&quot;very_wet&quot;<\/code><\/li>\n<li><code>&quot;lightly_puddly&quot;<\/code>, <code>&quot;medium_puddly&quot;<\/code>, <code>&quot;very_puddly&quot;<\/code><\/li>\n<li><code>&quot;lightly_snowy&quot;<\/code>, <code>&quot;medium_snowy&quot;<\/code>, <code>&quot;very_snowy&quot;<\/code><\/li>\n<li><code>&quot;lightly_icy&quot;<\/code>, <code>&quot;medium_icy&quot;<\/code>, <code>&quot;very_icy&quot;<\/code><\/li>\n<li><code>&quot;lightly_snowy_and_icy&quot;<\/code>, <code>&quot;medium_snowy_and_icy&quot;<\/code>, <code>&quot;very_snowy_and_icy&quot;<\/code><\/li>\n<\/ul>\n<p><strong>Evolution options:<\/strong><\/p>\n<ul>\n<li><code>&quot;rapidly_improving&quot;<\/code>, <code>&quot;improving&quot;<\/code>, <code>&quot;gradually_improving&quot;<\/code><\/li>\n<li><code>&quot;static&quot;<\/code><\/li>\n<li><code>&quot;gradually_deteriorating&quot;<\/code>, <code>&quot;deteriorating&quot;<\/code>, <code>&quot;rapidly_deteriorating&quot;<\/code><\/li>\n<\/ul>\n<h3 id=\"custom-weather-definition\">Custom Weather Definition<\/h3>\n<pre>&quot;weather&quot;: {\n    &quot;definition&quot;: {\n        &quot;latitude_in_degrees&quot;: 42.2342,\n        &quot;longitude_in_degrees&quot;: -72.342423,\n        &quot;elevation_in_meters&quot;: 500,\n        &quot;visibility_in_kilometers&quot;: 10,\n        &quot;temperature_in_degrees_celsius&quot;: 15,\n        &quot;altimeter_setting_in_hpa&quot;: 1013.25,\n        &quot;precipitation_ratio&quot;: 0.5,\n        &quot;clouds&quot;: [\n            {\n                &quot;type&quot;: &quot;cumulus&quot;,\n                &quot;cover_ratio&quot;: 0.2,\n                &quot;bases_in_feet_msl&quot;: 5000,\n                &quot;tops_in_feet_msl&quot;: 8000\n            }\n        ],\n        &quot;wind&quot;: [\n            {\n                &quot;altitude_in_feet_msl&quot;: 3000,\n                &quot;speed_in_knots&quot;: 15,\n                &quot;direction_in_degrees_true&quot;: 260,\n                &quot;gust_increase_in_knots&quot;: 10,\n                &quot;shear_in_degrees&quot;: 30,\n                &quot;turbulence_ratio&quot;: 0.2\n            }\n        ]\n    }\n}\n<\/pre>\n<p><strong>Required fields in definition:<\/strong><\/p>\n<ul>\n<li><code>latitude_in_degrees<\/code> (float)<\/li>\n<li><code>longitude_in_degrees<\/code> (float)<\/li>\n<li><code>elevation_in_meters<\/code> (float)<\/li>\n<li><code>visibility_in_kilometers<\/code> (float)<\/li>\n<\/ul>\n<p><strong>Optional fields in definition:<\/strong><\/p>\n<ul>\n<li><code>temperature_in_degrees_celsius<\/code> (float) &#8211; Default: ISA (15\u00b0C at MSL)<\/li>\n<li><code>altimeter_setting_in_hpa<\/code> (float) &#8211; Default: 1013.25<\/li>\n<li><code>precipitation_ratio<\/code> (float) &#8211; 0 to 1 (default: 0)<\/li>\n<li><code>clouds<\/code> (array) &#8211; Up to 3 cloud layers<\/li>\n<li><code>wind<\/code> (array) &#8211; Up to 13 wind layers<\/li>\n<\/ul>\n<p><strong>Cloud layer fields:<\/strong><\/p>\n<ul>\n<li><code>type<\/code> (string) &#8211; <code>&quot;cirrus&quot;<\/code>, <code>&quot;stratus&quot;<\/code>, <code>&quot;cumulus&quot;<\/code>, or <code>&quot;cumulunimbus&quot;<\/code><\/li>\n<li><code>cover_ratio<\/code> (float) &#8211; 0 to 1<\/li>\n<li><code>bases_in_feet_msl<\/code> (float)<\/li>\n<li><code>tops_in_feet_msl<\/code> (float)<\/li>\n<\/ul>\n<p><strong>Wind layer fields:<\/strong><\/p>\n<ul>\n<li><code>altitude_in_feet_msl<\/code> (float) &#8211; Required<\/li>\n<li><code>speed_in_knots<\/code> (float) &#8211; Required<\/li>\n<li><code>direction_in_degrees_true<\/code> (float) &#8211; Required<\/li>\n<li><code>gust_increase_in_knots<\/code> (float) &#8211; Optional<\/li>\n<li><code>shear_in_degrees<\/code> (float) &#8211; Optional<\/li>\n<li><code>turbulence_ratio<\/code> (float) &#8211; 0 to 1, optional<\/li>\n<\/ul>\n<h2 id=\"error-handling\">Error Handling<\/h2>\n<p>The API returns specific error codes to help you handle different failure scenarios:<\/p>\n<h3 id=\"error-codes\">Error Codes<\/h3>\n<ul>\n<li><code><a href=\"\/sdk\/xplm_Init_Success\/\">xplm_Init_Success<\/a><\/code> (0) &#8211; Operation completed successfully<\/li>\n<li><code><a href=\"\/sdk\/xplm_Init_Invalid\/\">xplm_Init_Invalid<\/a><\/code> (1) &#8211; Invalid JSON or validation rule violation<\/li>\n<li><code><a href=\"\/sdk\/xplm_Init_MissingAircraft\/\">xplm_Init_MissingAircraft<\/a><\/code> (2) &#8211; Specified aircraft not found<\/li>\n<li><code><a href=\"\/sdk\/xplm_Init_MissingLivery\/\">xplm_Init_MissingLivery<\/a><\/code> (3) &#8211; Specified livery not found<\/li>\n<li><code><a href=\"\/sdk\/xplm_Init_MissingAirport\/\">xplm_Init_MissingAirport<\/a><\/code> (4) &#8211; Specified airport not found<\/li>\n<li><code><a href=\"\/sdk\/xplm_Init_MissingRamp\/\">xplm_Init_MissingRamp<\/a><\/code> (5) &#8211; Specified ramp start not found<\/li>\n<li><code><a href=\"\/sdk\/xplm_Init_MissingRunway\/\">xplm_Init_MissingRunway<\/a><\/code> (6) &#8211; Specified runway not found<\/li>\n<\/ul>\n<p>When an error occurs, detailed diagnostic information is sent to the XPLMError callback (if installed) or to the log file. This information includes human-readable descriptions to aid debugging.<\/p>\n<h2 id=\"examples\">Examples<\/h2>\n<p>Here&#39;s a minimal example that starts the Boeing 737-800 at a ramp position at Portland International Airport:<\/p>\n<pre>{\n    &quot;ramp_start&quot;: {\n        &quot;airport_id&quot;: &quot;KPDX&quot;,\n        &quot;ramp&quot;: &quot;A1&quot;\n    },\n    &quot;aircraft&quot;: {\n        &quot;path&quot;: &quot;Aircraft\/Laminar Research\/Boeing 737-800\/b738.acf&quot;\n    }\n}\n<\/pre>\n<p>This example uses only the required fields. The aircraft will be loaded with default fuel and payload, engines off, at the current system time and weather. You can add any of the optional configuration fields described above to customize the initialization further.<\/p>\n<p>Here&#39;s a more completely specified flight starting at Boston Logan International Airport:<\/p>\n<pre>{\n    &quot;runway_start&quot;: {\n        &quot;airport_id&quot;: &quot;KBOS&quot;,\n        &quot;runway&quot;: &quot;22L&quot;\n    },\n    &quot;aircraft&quot;: {\n        &quot;path&quot;: &quot;Aircraft\/Laminar Research\/Cessna 172SP\/Cessna_172SP.acf&quot;,\n        &quot;livery&quot;: &quot;default&quot;\n    },\n    &quot;weight&quot;: {\n        &quot;payload_weight_in_kilograms&quot;: [80, 80, 0, 0, 0, 0, 0, 0, 0],\n        &quot;fueltank_weight_in_kilograms&quot;: [50, 50, 0, 0, 0, 0, 0, 0, 0]\n    },\n    &quot;engine_status&quot;: {\n        &quot;all_engines&quot;: {\n            &quot;running&quot;: true\n        }\n    },\n    &quot;local_time&quot;: {\n        &quot;day_of_year&quot;: 150,\n        &quot;time_in_24_hours&quot;: 14.5\n    },\n    &quot;weather&quot;: {\n        &quot;definition&quot;: &quot;vfr_scattered&quot;,\n        &quot;vertical_speed_in_thermal_in_feet_per_minute&quot;: 200,\n        &quot;wave_height_in_meters&quot;: 1.5,\n        &quot;wave_direction_in_degrees&quot;: 180,\n        &quot;terrain_state&quot;: &quot;dry&quot;,\n        &quot;variation_across_region_percentage&quot;: 50,\n        &quot;evolution_over_time_enum&quot;: &quot;static&quot;\n    }\n}\n<\/pre>\n<h2 id=\"best-practices\">Best Practices<\/h2>\n<ul>\n<li><strong>Validate your JSON<\/strong> &#8211; Use a JSON validator before passing data to the API<\/li>\n<li><strong>Check return codes<\/strong> &#8211; Always check the <code><a href=\"\/sdk\/XPLMInitResult\/\">XPLMInitResult<\/a><\/code> return value<\/li>\n<li><strong>Install an error callback<\/strong> &#8211; Register an XPLMError callback to receive detailed error messages<\/li>\n<li><strong>Test with default aircraft<\/strong> &#8211; Start development with Laminar Research default aircraft to ensure proper configuration<\/li>\n<li><strong>Handle missing resources gracefully<\/strong> &#8211; Be prepared for users who may not have certain aircraft or scenery installed<\/li>\n<li><strong>Use appropriate units<\/strong> &#8211; Pay close attention to units in field names (meters vs feet, knots vs m\/s, etc.)<\/li>\n<li><strong>Start simple<\/strong> &#8211; Begin with minimal required fields and add complexity gradually<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Description of the new Flight Initialization API included in X-Plane 12.4.x<\/p>\n","protected":false},"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","topic":[112],"article_type":[92],"version":[165],"class_list":["post-41229","article","type-article","status-publish","hentry","topic-plugin-sdk","article_type-reference","version-x-plane-12-4-0"],"yoast_head":"<title>Flight Initialization API - X-Plane Developer<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/developer.x-plane.com\/article\/flight-initialization-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Flight Initialization API - X-Plane Developer\" \/>\n<meta property=\"og:description\" content=\"Description of the new Flight Initialization API included in X-Plane 12.4.x\" \/>\n<meta property=\"og:url\" content=\"https:\/\/developer.x-plane.com\/article\/flight-initialization-api\/\" \/>\n<meta property=\"og:site_name\" content=\"X-Plane Developer\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/XPlaneOfficial\/\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-29T17:45:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/developer.x-plane.com\/wp-content\/uploads\/2017\/12\/cropped-X.png\" \/>\n\t<meta property=\"og:image:width\" content=\"512\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@XPlaneOfficial\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/developer.x-plane.com\/#website\",\"url\":\"https:\/\/developer.x-plane.com\/\",\"name\":\"X-Plane Developer\",\"description\":\"Developer resources for the X-Plane flight simulator\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/developer.x-plane.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/developer.x-plane.com\/article\/flight-initialization-api\/#webpage\",\"url\":\"https:\/\/developer.x-plane.com\/article\/flight-initialization-api\/\",\"name\":\"Flight Initialization API - X-Plane Developer\",\"isPartOf\":{\"@id\":\"https:\/\/developer.x-plane.com\/#website\"},\"datePublished\":\"2026-01-29T14:57:05+00:00\",\"dateModified\":\"2026-01-29T17:45:51+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/developer.x-plane.com\/article\/flight-initialization-api\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/developer.x-plane.com\/article\/flight-initialization-api\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/developer.x-plane.com\/article\/flight-initialization-api\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/developer.x-plane.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Flight Initialization API\"}]}]}<\/script>","yoast_head_json":{"title":"Flight Initialization API - X-Plane Developer","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/developer.x-plane.com\/article\/flight-initialization-api\/","og_locale":"en_US","og_type":"article","og_title":"Flight Initialization API - X-Plane Developer","og_description":"Description of the new Flight Initialization API included in X-Plane 12.4.x","og_url":"https:\/\/developer.x-plane.com\/article\/flight-initialization-api\/","og_site_name":"X-Plane Developer","article_publisher":"http:\/\/facebook.com\/XPlaneOfficial\/","article_modified_time":"2026-01-29T17:45:51+00:00","og_image":[{"width":512,"height":512,"url":"https:\/\/developer.x-plane.com\/wp-content\/uploads\/2017\/12\/cropped-X.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_site":"@XPlaneOfficial","twitter_misc":{"Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/developer.x-plane.com\/#website","url":"https:\/\/developer.x-plane.com\/","name":"X-Plane Developer","description":"Developer resources for the X-Plane flight simulator","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/developer.x-plane.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/developer.x-plane.com\/article\/flight-initialization-api\/#webpage","url":"https:\/\/developer.x-plane.com\/article\/flight-initialization-api\/","name":"Flight Initialization API - X-Plane Developer","isPartOf":{"@id":"https:\/\/developer.x-plane.com\/#website"},"datePublished":"2026-01-29T14:57:05+00:00","dateModified":"2026-01-29T17:45:51+00:00","breadcrumb":{"@id":"https:\/\/developer.x-plane.com\/article\/flight-initialization-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/developer.x-plane.com\/article\/flight-initialization-api\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/developer.x-plane.com\/article\/flight-initialization-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/developer.x-plane.com\/"},{"@type":"ListItem","position":2,"name":"Flight Initialization API"}]}]}},"_links":{"self":[{"href":"https:\/\/developer.x-plane.com\/wp-json\/wp\/v2\/article\/41229","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.x-plane.com\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/developer.x-plane.com\/wp-json\/wp\/v2\/types\/article"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.x-plane.com\/wp-json\/wp\/v2\/comments?post=41229"}],"version-history":[{"count":0,"href":"https:\/\/developer.x-plane.com\/wp-json\/wp\/v2\/article\/41229\/revisions"}],"wp:attachment":[{"href":"https:\/\/developer.x-plane.com\/wp-json\/wp\/v2\/media?parent=41229"}],"wp:term":[{"taxonomy":"topic","embeddable":true,"href":"https:\/\/developer.x-plane.com\/wp-json\/wp\/v2\/topic?post=41229"},{"taxonomy":"article_type","embeddable":true,"href":"https:\/\/developer.x-plane.com\/wp-json\/wp\/v2\/article_type?post=41229"},{"taxonomy":"version","embeddable":true,"href":"https:\/\/developer.x-plane.com\/wp-json\/wp\/v2\/version?post=41229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}