# Agricultural Aviation One of the more difficult career activities available in Microsoft Flight Simulator 2024 is that of flying **agricultural flights**. On these flights, the pilot is expected to fly close to the ground and may have to dodge obstacles like trees or power lines, all while ensuring that the crops get dusted correctly, or that the seeds get spread evenly. If you wish your aircraft to be used on these activities you will need a **preset** that has been appropriately set up as part of the [Modular SimObject,](../modular-simobjects/modular-simobjects/) as explained below.**NOTE**: Currently only the **crop spraying** activity is available to users. {{< image-center src="images/5_Content_Config/Careers/Agricultural/agriculture_1_flying.png" alt="Example Of Aircraft Performing Agricultural Activities" >}}   For more information on the various other career activities and how to prepare your aircraft, please see here: - [Career Activities](career-activities/)     ### Agricultural Aviation Constraints When it comes to setting up aircraft for the available agricultural activities, there are a few requirements that must be fulfilled by both planes and rotorcraft:   - The aircraft will need to have the `navigation_graph_pilot.cfg` (as explained [here](general-career-information/spawn-pilot-transversal/)). - The aircraft will need to have the `ApronWithoutCovers.flt` file (as explained [below](#flt_files)). - The `operating_status` must be either "*in\_service*" or "*experimental*". - The aircraft cannot be flagged as [military](../cfg-files/aircraft.cfg/#military). - The aircraft cannot be flagged as [premium](../cfg-files/aircraft.cfg/#premium). - The plane `ui_max_range` must be greater than 1. - The plane *model* must accurately show the appropriate equipment: - For seed spreading this includes a spreader attachment under the aircraft in the style of a typical **ram air spreader**, consisting of a hopper and a spreader tray **(*Please note that this mission type is not currently available*)**. - For crop spraying, the aircraft should have a tank placed under the aircraft, and then have sprayer attachments extending along both wings, or out on struts for a rotorcraft. This will also need to be correctly setup, as explained in the [Tank And Nozzle Setup (All Aircraft)](agricultural-aviation/#tank_setup) section below. There must be *more than four* sprayers defined. {{< image-center src="images/5_Content_Config/Careers/Agricultural/agriculture_2_spray.png" alt="Example Of Crop Spraying Setup For A Plane" >}} - The cockpit model will require controls to start/stop the spraying/spreading, normally some kind of lever that can be used to vary the amount of output.     For **planes** you have the following additional constraints: - The `targeted_specializations` must include the `AEA-PLN` dressing code. - The `object_class` must be "*Airplane*". - The plane *can* have either **wheels** or **[big-wheels](general-career-information/career-additional-information/#big-wheels)** for landing gear. - The plane *cannot* have **skis** or **floats** for landing gear. - The plane must have liquid dropping [tanks](../cfg-files/system/modular-liquid-dropping-system-information/#tankn) with a *minimum* total capacity of 510 litres (approximately 134 {{< glossterm >}}gallons{{< /glossterm >}}).     For **rotorcraft** you have the following additional constraints: - The `targeted_specializations` must include the `AEA-ROT` dressing code. - The `object_class` must be either "*helicopter*" or "*tiltrotor*". - The rotorcraft *can* have either **wheels** or skids for landing gear. - The rotorcraft *cannot* have **floats** for landing gear. - The rotorcraft must have liquid dropping [tanks](../cfg-files/system/modular-liquid-dropping-system-information/#tankn) with a *minimum* total capacity of 170 litres (approximately 44 {{< glossterm >}}gallons{{< /glossterm >}}).   Following these constraints will give the aircraft the `AEA_Cabin` type. See here for more information: - [Note On Cabin Codes](general-career-information/career-additional-information/#cabin-codes)     ### Mission Flow The flow for an **agricultural** mission is as follows: {{< image-center src="images/5_Content_Config/Careers/Guidelines/career_flowchart_6_agriculture.png" alt="Mission Flow Chart" >}} This flow will also require the aircraft to be setup for - and follow - the [General Career Mode Requirements](general-career-information/general-career-mode-requirements/).     ### SimVars The SimVars given below are those that will be used and checked to ensure that the agricultural mission is performed correctly. These SimVars rely on the being setup correctly in the aircraft, so you should ensure that all the required components are included and correct.   Penalty SimVar Description **Pilot Performance** `LIQUID DROPPING TANK TOTAL WEIGHT` This is used to check the quantity of insecticide in the tank(s). `LIQUID DROPPING TOTAL DROPPED FLOW` This is used to check the quantity of insecticide that has been sprayed at any given moment. `LIQUID DROPPING DOOR OPEN TARGET` This is used to set the status of the insecticide sprayers ("doors", open / closed). `DESIGN SPEED VS0` This is used to determine the speed of the aircraft when spraying the crops.     ### Tank And Nozzle Setup (All Aircraft) In the SimObject editor it is assumed you will a [Preset](../modular-simobjects/modular-simobject-project-structure/#presets) to be used for this kind of activity, so then in [systems.cfg](../cfg-files/systems.cfg/) tab you can go ahead and set up the [Modular Liquid Dropping System](../cfg-files/system/modular-liquid-dropping-system-information/). This system is used to simulate the liquid fertilizer, insecticide, etc... and will require one [Tank](../cfg-files/system/modular-liquid-dropping-system-information/#tankn) and multiple [Door](../cfg-files/system/modular-liquid-dropping-system-information/#doorn) modules, where each "door" represents a nozzle from the sprayer on the aircraft. These should be setup as follows:   - The **tank** should be placed in a position appropriate to the model, and the capacity will depend on the aircraft that you are using, varying from between 300 and 3000 {{< glossterm >}}gallons{{< /glossterm >}}. For example, the *Air Tractor AT-802A* can hold up to 800{{< glossterm >}}gallons{{< /glossterm >}}.   - Each spray nozzle on the aircraft should have it's own **door** and then all the doors should be associated with the **tank**, by adding them into the `Doors` array in the tank hashmap. Note too that you may need to add an additional door definition into the hashmap if you wish to incorporate an *emergency dump* option into the aircraft controls.   - Since doors do not have a position directly associated with them, a `reference_points.cfg` will be needed to set the position and direction of the nozzle doors. This file needs the same number of reference points as defined doors, and the `Name` parameter of each point **must** be `pos_door_N`, where *N* is the door number + 1 (doors are created with an initial index of 0, but for the reference point CFG the index starts at 1, so `pos_door_1` references `Door.0`). The reference points should also all be flagged as being **exterior**. ![Reference Point Positioning For Spray Nozzles](images/5_Content_Config/Careers/Agricultural/agriculture_3_refpoint.png)Note too that you may need to add an additional reference point if the aircraft supports an *emergency dump* procedure (this would be positioned at the opening of the dump door in the tank). Finally, it should be understood that these reference points are *not* related to how the VFX will spawn, but are instead required to have an accurate simulation of the water being dropped. VFX is controlled through **model behaviors**, as explained below.   The minimum controls for the spray can be setup in the [Model XML](../models/model-xml-properties/) file, using the [ASOBO\_CT\_Lever\_Template](../models/modelbehaviors/templateexplorer/asobo-ex1/common/shared/utils/interaction/interaction-templates/#ASOBO_CT_Lever_Template) to create the interaction between the lever model and the spray output. For example: ``` xml LEVER_SPRAY SPRAY AUXILIARY Y ASOBO_Liquid_Dropping_Lever_Settings_Config ```     ### VFX Setup The aircraft will also need some specific model behavior XML to ensure that the appropriate VFX spawn at each of the nozzle locations. This is done in the XML file associated with the sprayer model and uses the `ASOBO_ET_FX_CROPDUSTING_SINGLE` template, something like this: ``` xml 1 pos_door_1 rateMultiplier, 0.99 1 pos_door_2 rateMultiplier, 1.05 ``` You can find a complete example of the setup for this career here: - [Crop Dusting VFX Example](../models/modelbehaviors/usingbehaviours/vfx/vfx-template-examples/#crop_dusting)   In the template for the nozzles you need to supply the following information: - `` - This defines a unique index number for the nozzle and should be different for each one. - `` - This is *either* the name of the reference point (as defined in the `reference_points.cfg` file) associated with the nozzle, *or* a helper node on the actual model itself where the nozzle is. - `` - Here you give a value to the `rateMultiplier` parameter. This parameter is used to set a random value for each crop dusting jet to randomise how the VFX is spawned and avoid visual repetition. Be careful when setting this since, if the gap between each value is too wide, it could affect the fidelity of the VFX. We recommend values between 0.9 and 1.1.     #### Low Speed Flight There is another sprayer nozzle effect template that can (and should) be used along with the one described above: `ASOBO_ET_FX_CROPDUSTING_SINGLE_LOWSPEED`. This template will generate a modified effect designed to look more realistic when the aircraft is flying at slower speeds. To use this you can copy/paste the component code for the regular sprayer outputs and simply substitute the template `ASOBO_ET_FX_CROPDUSTING_SINGLE` for `ASOBO_ET_FX_CROPDUSTING_SINGLE_LOWSPEED`.     #### Emergency Dumping If the aircraft has an emergency dump option then you will also need to set this up in the same section of the XML, this time using either the `ASOBO_ET_FX_CROPDUSTING_DROP_PLANE` template or `ASOBO_ET_FX_CROPDUSTING_DROP_HELICOPTER` template depending on the aircraft: ``` xml pos_door_32 doorIndex, 31 (A:LIQUID DROPPING DOOR FLOW:31, Pounds per hour) 0 > (A:LIQUID DROPPING DOOR OPEN VALUE:31, Percent over 100) 0 > and pos_door_32 doorIndex, 31 (A:LIQUID DROPPING DOOR FLOW:31, Pounds per hour) 0 > (A:LIQUID DROPPING DOOR OPEN VALUE:31, Percent over 100) 0 > and ``` In this template you need to supply the following information: - `` - This is *either* the name of the reference point (as defined in the `reference_points.cfg` file) associated with the emergency dump door, *or* a helper node on the actual model itself where the door is. - `` - Here you give a value to the `doorIndex` parameter. This needs to be the **index** (not the *name*) of the emergency dump door. - `` - The code shown should be copied and used "as is", with the exception of the index given to the two SimVars (`LIQUID DROPPING DOOR FLOW` and `LIQUID DROPPING DOOR OPEN VALUE`), which should match the door index given to the `doorIndex` parameter.     #### Spray Vortices There is an additional template that is available and that should be used for all rotorcraft, and that can also be used for airplanes (specifically if they are high speed): `ASOBO_ET_FX_CROPDUSTING_VORTEX`. This template is used to add an additional VFX to simulate the effect of the rotors (or high-speed airflow) on the sprayer output, and would be added into the same component section as the previously discussed XML: ``` xml sprayWidth, 14 -0.600 ``` The offsets used here are relative to the [Datum Reference Point](../modular-simobjects/aircraft/aircraft/#datum-reference-point), and in general they should be at (0, 0, 0), although they can be adjusted if the effect looks off at the default position. There is also a parameter that should be set, `sprayWidth`. This is defines the width of the spraybar and is used to correctly place the vortex effect at the extremity of the spray.     ### FLT Files For both planes and rotorcraft, the pilot will start by going through the usual [Preflight checks](general-career-information/preflight/), and so these aircraft will need to have the `Apron.flt` setup in the activity preset as follows:   - Section `[SimVars.0]` must have the parameter `SimOnGround` set to `true`. - All *defined* `[Covers]` need to be set to `true` (see [here](general-career-information/general-career-mode-requirements/#general-flt-file-requirements) for more information). - Section `[Controls.0]` must have the parameter `ParkingBrake` set to 100.00 (if the aircraft has a parking brake). - Aircraft electrics and engines must be turned off. - The aircraft flight parameters (trim, flaps, etc...) should be set for a **cold** and **idle** aircraft.   An additional FLT file is required - the `ApronWithoutCovers.flt` file - for those occasions when the user may skip the preflight phase and there is an RTC event, or when something causes a [Back On Track](../flt-files/back-on-track/) event after preflight. This file should be set up like a regular apron FLT file, however you should ensure that these changes are made:   - All *defined* `[Covers]` need to be set to `false` (see [here](general-career-information/general-career-mode-requirements/#general-flt-file-requirements) for more information).