Csci 1301 Lab Assignment 2 2007.06.13 1. Our problem in lab today will be to calculate how far an arbitrarily massive satellite in low earth orbit powered by an arbitrarily forceful ion thruster will travel in an arbitrary amount of time and how fast it will be travelling at that point. An ion thruster can push a satellite with a very small amount of force for a very long period of time. As a result, ion thrusters can accelerate an object to very high speeds. We are going to assume that the thruster can fire forever (a rather unrealistic assumption). We will also be ignoring the gravity of Earth and Sun as well as the relativistic effects of high speeds. (If you get final velocities anywhere approaching the speed of light, 300,000 km/s then the final results are only accurate for our imaginary universe, not the real one.) Our program should look something like this. > Input the force of the thrusters in Newtons: > 0.092 > Input the mass of the satellite in kilograms: > 486.3 > Input the duration in years: > 1.0 > > Final velocity = 13.97 km/s > Distance travelled = 346653682 km Your output may differ somewhat due to rounding errors and Java's formatting, if it's close you've probably got it right. (Unless I messed when I calculated this!) This all sounds very complicated, doesn't it? Actually, this problem is easier than it seems, and with a little bit of planning, is very straightforward. First we need to ask the user for the force of the thrusters (measured in Newtons), the mass of the satellite (measured in kilograms), and the time spent travelling (in years). Let's use doubles to store these values. Next, we need three equations and three constants from our high school physics classes: a = F / m, where a is acceleration in meters/(second^2), F is force in Newtons, and m is mass in kilograms v1 = v0 + a * t, where v1 is final velocity in meters/second, v0 is intitial velocity (also m/s), and t is time in seconds d = v0 * t + 0.5 * a * t^2, where d is distance travelled in meters METERS_PER_KILOMETER = 1000 SECONDS_PER_YEAR = 31,556,926 LEO_KM_PER_SEC = 8.0, this is an approximate velocity of an object in low earth orbit and will be our value of v0, once we've converted it to m/s Using the first equation you can calculate acceleration in m/(s^2). Then you can use the second equation to calculate the final velocity in m/s. Finally, use the third equation to calculate the distance travelled in meters. You should output the final velocity in kilometers per second and the distance travelled in kilometers. See, not so bad! BTW, the values in the force and mass in the example are for the Deep Space 1 spacecraft. It actually fired for the better part of 2 years. Unfortunately, it wasn't immune to the forces of gravity.