Professional Documents
Culture Documents
Attachment 1 3
Attachment 1 3
Homework 1
Angmering Raceway Car Jumping Simulation with Graphical User Interface (GUI)
Angmering Raceway is a motor racing circuit on the outskirts of Angmering, West Sussex in the
United Kingdom. Here is the Angmering Raceway website. Angmering Raceway - Oval Raceway at
Angmering, West Sussex
One of the Angmering Raceway Car Jumping Competitions is in the following YouTube Video.
https://www.youtube.com/watch?v=vPqIh3HlHA8
The objective of the car jump competition is to drive over a 7 m long (horizontally) and 1.5 m high
(vertically) jump ramp and jump over 9 cars parked tightly side-by-side, approximately 1.8 m x 9 =
16.2 m long distance.
Car jumps utilize the slop of the ramp and fast speed to create a catapult effect that launch the car
into the air at an angle like a catapult. Since the slop of the ramp is fixed, the distance of the jump
will be determined by the velocity of the car when it jumps off the ramp.
Car repairs can be time consuming and expensive. Write a MATLAB App Designer app using
Graphical User Interface (GUI) to help the race driver to visualize the jump and simulate the result.
Add an Axes to show a picture of the race car in GUI when the app starts [2 pt].
Add another Axes in GUI to plot the jump ramp and parked cars in GUI when the app starts [2 pt].
1. The jump ramp is 7 meters long (measured horizontally) and 1.5 meters tall (measured
vertically). Create a new variable to store the jump ramp x-direction coordinates, 0 and 7
[1pt]. Create another new variable to store the jump ramp y-direction coordinates, 0 and 1.5
[1pt].
2. The tightly parked cars (for the race drivers to jump over) are 16.2 meters long and 1.5
meters high. Create a new variable to store the parked cars x-direction coordinates, 7, 7,
(7+16.2), and (7+16.2) [1 pt]. Create another variable to store the parked cars y-direction
coordinates, 0, 1.5, 1.5, and 0 [1 pt].
3. Plot the jump ramp [2 pt] and the tightly parked cars [2 pt].
4. Set XLim to [0 35] [1 pt]. Set YLim to [0 25] [1 pt].
5. Add plot title [2 pt], x-axis label [1 pt], y-axis label [1 pt], and legend [2 pt] to the plot.
Add a Label in GUI to show the race driver the current car speed in MPH [2 pt]. The label should show
0 MPH when the app starts [2 pt].
Add a speedometer Gauge in GUI to show the race car in MPH [2 pt]. The gauge should point to 0
MPH when the app starts [2 pt].
Add a start Button in GUI [2 pt] for the race driver to click to start the simulation and to start speeding
up the car. When this start Button is clicked, the app should:
1. Modify the picture of the race car to show another picture [2 pt].
2. Increment the text shown in the car speed label by 1 MPH every 0.2 seconds (200
milliseconds) [2 pt].
3. Increment the gauge value by 1 MPH every 0.2 seconds (200 milliseconds) [2 pt].
Add a Jump Button in GUI [2 pt] for the race drive to click when the car reaches the desired jump
speed. When this Jump Button is clicked, the app should:
1. Stop the car speed increment of the text shown in the car speed Label [2 pt].
2. Stop the increment of the Gauge value [2 pt].
3. Take the current car speed value in MPH from the Gauge and use the value for the simulation
computation [2 pt].
4. Convert the car speed from miles per hour (mph) to meters per second (m/s) [2 pt].
5. Compute the jump ramp incline angle [2 pt].
6. Compute the initial velocity of the car in the x [2 pt] and y [2 pt] directions (vx0 and vy0).
7. Compute the time it takes for the car to reach the maximum height (vy = 0) using vy = vy0 + ay t
[2 pt].
14. The tightly parked cars (for the race drivers to jump over) are 16.2 meters long and 1.5
meters high. Create a new variable to store the parked cars x-direction coordinates, 7, 7,
(7+16.2), and (7+16.2) [1 pt]. Create another variable to store the parked cars y-direction
coordinates, 0, 1.5, 1.5, and 0 [1 pt].
15. Use element-by-element addition to add the length of the jump ramp (7 m) to every value in
the large array of x projectile motion coordinates [2 pt].
16. Now we are ready to prepare the coordinates for the top of the race car. The race car is 1.5
meters tall. The x-direction coordinates for the top of the race car can be obtained from
combining the jump ramp x-direction coordinates and the new x-direction projectile
coordinates together into a new array [2 pt]. The y-direction coordinates for the top of the
race car can be obtained from combining the jump ramp y-direction coordinates + 1.5 and
the y-direction projectile coordinates + 1.5 together into a new array [2 pt].
17. Plot the jump ramp [2 pt], the tightly parked cars [2 pt], the bottom of the race car projectile
motion [2 pt] and the top of the race car projectile motion [2 pt] in the same figure.
18. Set XLim to [0 35] [1 pt]. Set YLim to [0 25] [1 pt].
19. Add plot title [2 pt], x-axis label [1 pt], y-axis label [1 pt], and legend [2 pt] to the plot.
20. Multiply the time it takes for the car to reach the maximum height by 2 to obtain the time
the race car flies above 1.5 m [2 pt].
21. Compute the horizontal distance the race car flies above 1.5 m using x = x0 + vx0t + ½ ax t2.
Recall that ax = 0 [2 pt].
22. If the horizontal distance the race car flies above 1.5 m value is greater than 16.2 [2 pt]:
a. Modify the picture of the race car to show a successful picture [2 pt].
23. Else:
a. Modify the picture of the race car to show a crash picture [2 pt].
24. End.