[Solved] CST 8233 Assignment 3

$25

File Name: CST_8233_Assignment_3.zip
File Size: 197.82 KB

SKU: [Solved] CST 8233 Assignment 3 Category: Tag:
5/5 - (1 vote)

Martian Lander

Purpose: Solve Ordinary differential Equations (ODEs) in real-time for a planetary lander flight simulator.

Algorithm

While the user wishes to continue, the application will ask the user to select whether to run the simulation one more time. The simulation uses Heuns adaptation of Eulers method, as explained in lecture notes, to solve the following differential equations that describe the descent of a landing module on Mars under gravity with atmospheric drag and an additional booster term B:

dv/dt = g c*(v + a*(v/vmax)3) B v = dx/dt

The values of the constants are g = 3.7, c = 0.13, a = 8.3, vmax = 46

Solving these equations means calculating the velocity v and position x of the module as time t (seconds) passes after it starts its descent from an initial location 1000 meters above the Martian surface at the instant of being released from the mother ship. It then falls to the surface under the above equations.

The meanings of the terms are:

  1. dv/dt in the acceleration of the lander module as it falls to the surface where v (in metres/second) is positive in a downward direction. At the instant of release v is zero and x is 1000 metres and time t (in seconds) is zero. Time is measured from the computer clock.
  2. g is the downward acceleration caused by gravity (which on Mars is only 38% of Earths gravity).
  3. c*(v + a*(v/vmax)3) is the deceleration caused by atmospheric drag. It is small when the velocity is small and gets large as a power law as the velocity increases. At some high velocity (called the terminal velocity) it balances gravity and acceleration becomes zero..
  4. B is the deceleration cause by a burn from the braking rocket on the landing module. This always acts in an upward direction to counter gravity. This rocket can be turned on and off and adjusted from the keyboard using the keys W (increases B) and E (decreases B). However, braking uses up fuel at the rate of B units per second and so depletes the fixed reserve of 100 units.

When the simulation starts, the lander is 1000 meters above the Martian surface at the instant of being released from the mother ship. It then falls to the surface under the above equations. The purpose of the simulation is to get a soft landing which is taken as a speed of < 1metre/sec at a distance above the surface of <1 metre. If the module hits the surface faster than this it gets bounced back up again (v becomes v) until gravity pulls it down again. The best landing is a straight descent without a single bounce. The number of bounces is recorded. Try to land without a single bounce.

There is a bare-bones console executable lander.exe in a zip file on BS that runs the simulation as a single shot it does not offer a repeat and does not save the results to file. Your version should work the same and display the same information in the same way. In addition add the following:

  1. offer the user the option of repeating the simulation
  2. save the results of all simulations to file and display them on-screen at the end in order of best-toworst landings together with the name of the user. The best is shortest time with fewest bounces.

Set up a Win32 console project in Visual Studio 2015 with the name ass3. In a file named ass3.cpp using the C (or/C++) programming language write the code to implement the application as described above. Remember to implement the Heun improvement not just the Euler method.

1

CST 8233 F18 Assignment 3

See the Marking Sheet for how you can lose marks, but you definitely lose 60% or more if:

  • your application wont build in Visual Studio 2015
  • your application crashes in normal operation
  • I cant build it because you submitted the wrong files or the files are missing, even if its an honest mistake 100% deduction.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CST 8233 Assignment 3
$25