Beispiel #1
0
	def test_gg_data_type(self):
		qBI = np.array([0.,0.,0.,1.])
		wBIb = np.array([0.,0.,0.])
		v_pos_i = np.array([7070e3,0.,0.])
		v_vel_i = np.array([2.0e3,2.8,-73.2])
		qBO = fs.qBI2qBO(qBI,v_pos_i,v_vel_i)
		wBOB = fs.wBIb2wBOb(wBIb,qBO,v_w_IO_o)
		sat = Satellite(np.hstack((qBO,wBOB)),13.)
		sat.setPos(np.array([7070e3,0.,0.]))  
		sat.setQ_BI(qBI)
		dist.ggTorqueb(sat)
		result = sat.getggDisturbance_b()        
		self.assertEqual(type(result),np.ndarray)
    def test_inertia_eigenvec(self, value):

        qBI = np.array([0., 0., 0., 1.])
        wBIb = np.array([0.1, -0.02, -0.2])
        v_pos_i = value
        v_vel_i = np.array([5.60, -5.0, 0.0])
        qBO = fs.qBI2qBO(qBI, v_pos_i, v_vel_i)
        wBOB = fs.wBIb2wBOb(wBIb, qBO, v_w_IO_o)
        sat = Satellite(np.hstack((qBO, wBOB)), 13.)
        sat.setPos(value)
        sat.setVel(v_vel_i)
        dist.ggTorqueb(sat)
        result = sat.getggDisturbance_b()
        self.assertTrue(np.allclose(result, [0., 0., 0.]))