Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
| Download
Views: 1196
Kernel: Python 2 (SageMath)

Project 1: Part A - Operation River Boat Crossing

You are a scientist.

You have worked on the Voyager 1 project for a number of years. You receive a satellite phone call while on a team building exercise with your fellow scientists that there is an emergency with Voyager 1. You must escape hostile territory while being pursued by an enemy who wants you for your scientific prowess. You come to a river that is fast flowing, and the only safe landing point on the opposite bank is directly across from an abandoned but functional boat. The width of the river is 1.8 km. The boat has a constant speed of 21 knots. However, the boat’s rudder has been damaged and so the boat cannot be redirected once it has started moving. With you, you have a remote controlled boat which travels at a constant speed, but you do not know what that speed is. You also have a stop watch. You must predict the proper direction to point the boat in order to land on the opposite bank at the landing point.

Use the elements of the problem solving format to help you here:

  1. Facts

  2. Lacking

  3. Approximations and Assumptions

  4. Representations

  5. Solve

  6. Evaluate

Write up your solution on a separate piece of paper to turn in. Each group only needs to turn in one copy but all group members should work the problem. Make sure you take a picture of the final version before turning it in.

Project 1: Part B: Voyager Collision Course

Your team reached a clearing and has been airlifted out of hostile territory and transported to ground control for Voyager 1. An asteroid has been identified whose movement may put it on a collision course with the satellite. NASA has tasked your team with creating an accurate visual simulation of the motion of the asteroid and satellite relative to ground control and to produce a graph of the separation distance of voyager and asteroid as a function of time. Voyagers probes can provide information about the asteroid. We need your help to ensure Voyager’s 36 year mission does not come to an end.

To run the code below, click inside the cell and hit Shift+Enter. A animation window and graph should appear below this cell. If nothing seems to be happening, click on the kernel reset button, which looks like a circling arrow right next to the stop button on the toolbar above.

Try to determine how the code works and what it does. Your goal is to add code in order to get the asteroid to move and plot the correct distance between Voyager and the asteroid.

Use the elements of the problem solving format to help you here:

  1. Facts

  2. Lacking

  3. Approximations and Assumptions

  4. Representations

  5. Solve

  6. Evaluate

from __future__ import division from vpython import * from physutil import * #Objects Voyager = sphere(pos=vector(-5e10,-2e10,-3e9), radius=3e9, color=color.green, make_trail=True) Asteroid = sphere(pos = Voyager.pos + vector(-3e10,8e10,3e9), radius=5e9) #Parameters and Initial Conditions Voyager.vel = vector(1e5, 1e4, 1e4) #What info is lacking? #Time and time step dt = .25e6 t = 0 tf = 4e6 #MotionMap/Graph trackVoyager = MotionMap(Voyager, tf, 5, markerScale=4e5) separation = PhysGraph(numPlots=1) #Calculation Loop scene.waitfor('click') while t < tf: rate(2) Voyager.pos = Voyager.pos + Voyager.vel*dt #Add code here to make asteroid move Asteroid.pos=Asteroid.pos trackVoyager.update(t,Voyager.vel) separation.plot(t,mag(Voyager.pos-Asteroid.pos)) t = t + dt
File "<ipython-input-4-94fb97681898>", line 29 Asteroid.pos=Asteroid.pos ^ IndentationError: unindent does not match any outer indentation level