Project 1 (Mini Project on Vehicle Direction Detection
The model has 2 subsystems. They are Req1 and Req2. The varaibles are created in Sldd via model explorer.
For req 1, a switch is created. If the yaw degree is >0, then the vehicle turns towards right. If the yaw degree input equlas to zero, then the vehicle direction is straight. If yaw degree is negative, the vehicle turns left. Hence this logic is implemented via switch cases. WHen a certain condition is true w.r.t the yaw signal as control input, the true or false cases are executed.
For req 2, the camera input is a boolean value meaning the camera can be turned on or off. When camera input is turned on, the vehicle direction indicator indicates the direction of the vehicle. When the camera input is 0, the vehicle direction indicator is disabled meaning that the output becomes zero.
The output from req 1 is an input to the req 2 block. this is compared to calibration values for the right, left and striaght turns. these are compared using a equal operator block. Then the output of this is compared using an AND operator and the directions are indicated, if the camera is enabled.
Thus the model is executed.
P.S: Since the simulink coder is unavailable , the code couldnot be generated.