Section 3.3 - Mars SmallSat Aerocapture - Interplanetary Arrival, Approach

[1]:
import numpy as np
from astropy.time import Time
from AMAT.arrival import Arrival
[2]:
arrival = Arrival()
arrival.set_vinf_vec_from_lambert_arc(lastFlybyPlanet='EARTH',
                                      arrivalPlanet='MARS',
                                      lastFlybyDate=Time("2020-07-30 00:00:00", scale='tdb'),
                                      arrivalDate=Time("2021-02-18 00:00:00", scale='tdb'),
                                      ephem_file='../../../spice-data/de432s.bsp')
[3]:
print("Arrival v_inf vector, ICRF: "+str(arrival.v_inf_vec)+" km/s")
print("Arrival VINF MAG: "+str(round(arrival.v_inf_mag, 2))+" km/s.")
print("Arrival Declination: "+str(round(arrival.declination, 2))+" deg.")
Arrival v_inf vector, ICRF: [ 2.23930482  1.20086474 -0.73683367] km/s
Arrival VINF MAG: 2.65 km/s.
Arrival Declination: -1.65 deg.
[4]:
import numpy as np
from AMAT.approach import Approach
[5]:
approach1 = Approach("MARS", v_inf_vec_icrf_kms=arrival.v_inf_vec,
                            rp=(3389.5+52)*1e3, psi=3*np.pi/2,
                            is_entrySystem=True, h_EI=120e3)

print("Entry altitude, km: "+ str(approach1.h_EI/1e3))
print("Entry longitude BI, deg: "+ str(round(approach1.longitude_entry_bi*180/np.pi, 2)))
print("Entry latitude BI, deg: "+ str(round(approach1.latitude_entry_bi*180/np.pi, 2)))
print("Atm. relative entry speed, km/s: "+str(round(approach1.v_entry_atm_mag/1e3, 4)))
print("Atm. relative heading angle, deg: "+str(round(approach1.heading_entry_atm*180/np.pi, 4)))
print("Atm. relative EFPA, deg: "+str(round(approach1.gamma_entry_atm*180/np.pi, 4)))

print("Inclination, deg: "+str(approach1.i*180/np.pi))
Entry altitude, km: 120.0
Entry longitude BI, deg: -89.76
Entry latitude BI, deg: -0.71
Atm. relative entry speed, km/s: 5.3586
Atm. relative heading angle, deg: 9.3778
Atm. relative EFPA, deg: -9.2475
Inclination, deg: 1.6533397822244609

Run the following code to generate the approach trajectory plot. The code is also available in the file section-03-mars-smallsat-approach-viz.py.

from mayavi import mlab
import numpy as np
from tvtk.tools import visual
from AMAT.approach import Approach
from astropy.time import Time
from AMAT.arrival import Arrival

def Arrow_From_A_to_B(x1, y1, z1, x2, y2, z2):
    ar1 = visual.arrow(x=x1, y=y1, z=z1)
    ar1.length_cone = 0.4

    arrow_length = np.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2 + (z2 - z1) ** 2)
    ar1.actor.scale = [arrow_length, arrow_length, arrow_length]
    ar1.pos = ar1.pos / arrow_length
    ar1.axis = [x2 - x1, y2 - y1, z2 - z1]
    return ar1

arrival = Arrival()
arrival.set_vinf_vec_from_lambert_arc(lastFlybyPlanet='EARTH',
                                      arrivalPlanet='MARS',
                                      lastFlybyDate=Time("2020-07-30 00:00:00", scale='tdb'),
                                      arrivalDate=Time("2021-02-18 00:00:00", scale='tdb'),
                                      ephem_file='../../../spice-data/de432s.bsp')



probe = Approach("MARS",
                    v_inf_vec_icrf_kms=np.array([ 2.23930484,  1.20086474, -0.73683366]),
                    rp=(3389.5+52)*1e3, psi=3*np.pi/2,
                    is_entrySystem=True, h_EI=120e3)


space = Approach("MARS",
                    v_inf_vec_icrf_kms=np.array([ 2.23930484,  1.20086474, -0.73683366]),
                    rp=(3389.5+250)*1e3, psi=np.pi)

north_pole_bi_vec = probe.ICRF_to_BI(arrival.north_pole)

theta_star_arr_probe = np.linspace(-2, probe.theta_star_entry, 101)
pos_vec_bi_arr_probe = probe.pos_vec_bi(theta_star_arr_probe)/3389.5e3


theta_star_arr_space = np.linspace(-1.85, 0.0, 101)
pos_vec_bi_arr_space = space.pos_vec_bi(theta_star_arr_space)/3389.5e3

x_arr_probe = pos_vec_bi_arr_probe[0][:]
y_arr_probe = pos_vec_bi_arr_probe[1][:]
z_arr_probe = pos_vec_bi_arr_probe[2][:]

x_arr_space = pos_vec_bi_arr_space[0][:]
y_arr_space = pos_vec_bi_arr_space[1][:]
z_arr_space = pos_vec_bi_arr_space[2][:]


u = np.linspace(0, 2 * np.pi, 100)
v = np.linspace(0, np.pi, 100)
x = 1*np.outer(np.cos(u), np.sin(v))
y = 1*np.outer(np.sin(u), np.sin(v))
z = 1*np.outer(np.ones(np.size(u)), np.cos(v))

x1 = 1.040381198513972*np.outer(np.cos(u), np.sin(v))
y1 = 1.040381198513972*np.outer(np.sin(u), np.sin(v))
z1 = 1.040381198513972*np.outer(np.ones(np.size(u)), np.cos(v))


x_ring_1 = 1.1*np.cos(u)
y_ring_1 = 1.1*np.sin(u)
z_ring_1 = 0.0*np.cos(u)

x_ring_2 = 1.2*np.cos(u)
y_ring_2 = 1.2*np.sin(u)
z_ring_2 = 0.0*np.cos(u)

mlab.figure(bgcolor=(0,0,0))
s1 = mlab.mesh(x, y, z, color=(0.8,0,0.2))
s2 = mlab.mesh(x1, y1, z1, color=(0.8,0,0.2), opacity=0.3)
r1 = mlab.plot3d(x_ring_1, y_ring_1, z_ring_1, color=(1,1,1), line_width=1, tube_radius=None)
#r2 = mlab.plot3d(x_ring_2, y_ring_2, z_ring_2, color=(1,1,1), line_width=1, tube_radius=None)

p1 = mlab.plot3d(x_arr_probe, y_arr_probe, z_arr_probe, color=(0,1,0), line_width=3, tube_radius=None)
#p2 = mlab.plot3d(x_arr_space, y_arr_space, z_arr_space, color=(0,0,1), line_width=3, tube_radius=None)


mlab.plot3d([0, 1.2 * north_pole_bi_vec[0]],
                   [0, 1.2 * north_pole_bi_vec[1]],
                   [0, 1.2 * north_pole_bi_vec[2]])

mlab.show()
[6]:
from IPython.display import Image
Image(filename='../../../plots/mars-smallsat-approach.png', width=1200)
[6]:
../../_images/mdpi-aerospace-notebooks_smallsat-mission-concepts_section-3-3-mars-smallsat-mission-interplanetary-arrival-conditions_8_0.png
[7]:
from AMAT.orbiter import PropulsiveOrbiter
[8]:
approach2 = Approach("MARS", v_inf_vec_icrf_kms=arrival.v_inf_vec,
                            rp=(3389.5+200)*1e3, psi=3*np.pi/2)
[9]:
orbiter = PropulsiveOrbiter(approach=approach2, apoapsis_alt_km=2000)
[10]:
orbiter.DV_OI_mag
[10]:
1770.77991034905
[11]:
def mf_m0(DV, Isp):
    return np.exp(-DV/(Isp*9.80665))
[12]:
mf_m0(DV=1770, Isp=320)
[12]:
0.568911421875651
[16]:
29/0.568
[16]:
51.056338028169016
[13]:
orbiter = PropulsiveOrbiter(approach=approach2, apoapsis_alt_km=300)
[14]:
orbiter.DV_OI_mag
[14]:
2077.5582787844314
[15]:
mf_m0(DV=2077, Isp=320)
[15]:
0.5158911143415997
[16]:
29/0.5158
[16]:
56.22334238076773
[17]:
approach3 = Approach("MARS", v_inf_vec_icrf_kms=arrival.v_inf_vec,
                            rp=(3389.5+250)*1e3, psi=np.pi)
[12]:
orbiter = PropulsiveOrbiter(approach=approach3, apoapsis_alt_km=70000)
[18]:
orbiter.DV_OI_mag
[18]:
2077.5582787844314