Environment¶
To simulate a model correctly, it is necessary to take into account that the environmental variables change depending on the position of the UAV. The user can choose between using a simple and constant model or modifying at each step the environmental variables according to a complex model.
This model should group the atmospheric properties (temperature, pressure, etc.) which change with altitude (an offset can also be added), the gravity vector, as well as the magnetic field which changes according the UAV coordinates. All this information can be used for a better characterisation of the sensor 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.
Instead of creating their own functions, users can use those included in the Aerospace Toolbox:
World Magnetic Model 2020:
ISA Atmosphere Model:
WGS84 Gravity Model: