Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions docking.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,24 @@ def accel_grav(d):
# Parameters
r_init = 99*(10**6) # m distance away from planet during landing/docking stage ### Will have to change
v0 = -7*10**5 # initial velocity (m/s) ### Will have to change
m_mars = float(input("What it the mass of Mars?\n ____ x 10^23> ")) * 10**23 #6.39*(10**23) = mass of Mars (kg)
r = float(input("What is the radius of Mars?\n____x 10^6> "))*10**6 #3.3895*(10**6) = radius of Mars (m)
G = float(input("What is the gravitational constant G?\n ____x 10^-11> "))*10**-11 #6.67408*(10**-11)= gravitational constant
input1 = float(input("What it the mass of Mars?\n ____ x 10^23> ")) #6.39*(10**23) = mass of Mars (kg)
while input1!=6.39:
input1=float(input("Try again! What it the mass of Mars?\n ____ x 10^23> "))
if input1==6.39:
print('Correct!')
m_mars=input1*(10**23)
input2 = float(input("What is the radius of Mars?\n____x 10^6> ")) #3.3895*(10**6) = radius of Mars (m)
while input2!=3.3895:
input2=float(input("Try again! What is the radius of Mars?\n____x 10^6> "))
if input2==3.3895:
print('Correct!')
r=input2*(10**6)
input3 = float(input("What is the gravitational constant G?\n ____x 10^-11> ")) #6.67408*(10**-11)= gravitational constant
while input3!=6.67408:
input3=float(input("Try again! What is the gravitational constant G?\n ____x 10^-11> "))
if input3==6.67408:
print('Correct!')
G=input3*(10**-11)
F_thrust = 2*10**5 # kg*m/s^2 Reverse thrust of rocket ### Will Have to change constant
v_ex = -4*10**(3) # m/s velocity of ejecting fuel ### Will have to change constant
mass_fuel = MASS_FUEL
Expand Down