khagler,
This is the way I thought about the problem: gravity is accelerating the rocket downward, which means that the rocket’s downward velocity is continuously increasing(but all falling objects in Earth’s atmosphere have a terminal(or maximum) velocity–which I ignored). If the rocket opens a parachute, then it makes sense that the rocket will stop accelerating downwards–otherwise its velocity would keep increasing–rendering the parachute not effective enough. So, let’s just say that the parachute creates an upward acceleration that counteracts the acceleration of gravity, namely an acceleration of +9.8 m/s^2. Using those figures, you can create a simple solution in your code. Note that whatever velocity the rocket has when a +9.8m/s^2 acceleration is applied by the parachute, counteracting the -9.8 m/s^2 acceleration of gravity, will be the velocity that the rocket has when it hits the ground. If the net acceleration of the rocket is zero, then its velocity remains constant because acceleration is a measure of how much the velocity changes per second.
However, I read up on parachutes, and it turns out that a parachute will initially provide a bigger acceleration upwards than gravity’s acceleration downward–which will cause the rocket’s velocity to slow. For example, if the velocity of the rocket just before the parachute opens is -100 m/s, we know gravity is accelerating the rocket at -9.8 m/s^2 (i.e. for every second the rocket falls, its velocity is increasing by -9.8 m/s), so if the parachute initially provides an acceleration of +20 m/s^2, then the net acceleration will be:
Notice that the net acceleration is in the upward direction. Therefore, 1 s after the parachute is deployed, the change in velocity will by +10.2 m/s:
So, the new velocity of the rocket one second after the parachute is opened will be
But notice, if that state of things continued, then after 9 more seconds, the rocket would start moving upwards, i.e. its velocity would be positive. Of course, that doesn’t happen: after a skydiver pulls their rip cord they do not float upwards back to the plane they jumped out of. The reason that doesn’t happen is because as the velocity of the rocket+parachute decreases, the upward acceleration provided by the parachute decreases(there’s less air resistance at slower velocities). At some point, the velocity slows enough so that the parachute only provides an upward acceleration that is roughly equal to gravity’s downward acceleration, and thereafter the rocket falls at a constant velocity to the ground.
But of course, we bought the book to learn about Cocoa programming, not graduate level physics.