Skip to content
Test_Engineering_tools.py 880 B
Newer Older
Vivien's avatar
Vivien committed
#!/usr/bin/env python

from Engineering_tools import *

import unittest



class TestEngineeringTools(unittest.TestCase):

   def test_initial_vel(self):        
      latitude = 30
      v_velocity = initial_vel(latitude)
      self.assertTrue(v_velocity is not None)
      
   
   def test_final_target_vel(self):        
Vivien's avatar
Vivien committed
      v_eject_altitude = 5000
      v_orbit_semi_major_axis = 100
      
      v_f_velocity = final_target_vel(v_eject_altitude,v_orbit_semi_major_axis)
      
      self.assertTrue(v_f_velocity is not None)
     

   def test_staging_optim(self):
      v_isp1 = 300
      v_isp2 = 300
      v_eps1 = 0.8
      v_eps2 = 0.7
      v_Vc = 100
      v_Mp = 3000
      v_m1, v_m2 = staging_optim(v_isp1,v_isp2,v_eps1,v_eps2,v_Vc,v_Mp)
      
      self.assertTrue(v_m1 is not None and v_m2 is not None)
     
if __name__ == '__main__':      
   unittest.main()