Environment

To simulate properly a model is necessary to take in account that the environment variables changes depending on the uav position. User can choose between a simple and constant model or modify in each step the environment variables according to a complex model.

This model should group the atmospherical properties (temperature, pressure, etc.) which change with the altitude (also you can add an offset), the gravity vector as well as the magnetic field which change according to certain coordinates on earth. All this information is required by the S-function or is necessary for a good characterization of the sensors measurements. A basic example is shown below. It is divided into 3 different models (ISA atmosphere model, WGS84 model for gravity vector, and the World Magnetic Model). Each model is included in a user Matlab function whose arguments are the inputs of the block.

../../_images/environment.png

Environment block

Instead of creating their own functions, user can employ those that are included in Aerospace Toolbox:

  1. World Magnetic Model 2015

  2. ISA Atmosphere Model

  3. WGS84 Gravity Model

../../_images/aerospace.png

Aerospace blockset functions

The input of this block is the state (in the previous step) of your vehicule. You have to compute this state from a dynamic model whose inputs are the values of the actuators (outputs of the autopilot). These variables (position, velocity, acceleration, etc.) can be group in a vector or a bus. If a vector is chosen then you have to pick the desired variables with a demux block or a selector block. In the case of a bus, the information is separated with a bus selector block.

../../_images/bus_selector.png

Bus selector block

For the environment block the only variables required are these shown in the picture below:

../../_images/LLA.png

Environment input