A short Simulink workshop + Hebrew presentation
30 Apr 2012
A short 'What is Simulink' workshop I've passed on May 1st, 2012.
function desired_velocity = variable_v(position,velocity)
This function receives the following inputs:
1. Position of the aircraft- [x, y, z]
2. Velocity of the aircraft - [x,y,z]
Using the inputs, the function returns the value of the desired velocity,
Created by Roni Peer, 11.7.2010
height = position(3); % Get the Height.
if height > 500 % Maintain velocity.
desired_descent_rate = velocity(3);
elseif height > 200 % Slow down.
desired_descent_rate = -10;
elseif height > 100
desired_descent_rate = -2;
elseif height > 10
desired_descent_rate = -1;
desired_descent_rate = -0.5; % Break.
desired_velocity = [0; 0; desired_descent_rate];