Exemplo n.º 1
0
    def calc_pos_from_E(self, E):
        #todo: can optimise this a lot
        r = self.calc_r_from_E(E)
        v = self.calc_true_anomaly(E)
        angle_sum = self.arg_per + v

        x = Vector3.X()
        n_dir = x.rotate(Rotation.aroundZ(self.long_asc))
        h_dir = self.h_vec.norm()
        r_dir = n_dir.rotate(Rotation.aroundVector(h_dir, v))
        r_vec = r_dir.fmul(self.calc_r_from_E(E))
        r_vec = r_vec.rotate(Rotation.aroundVector(h_dir, self.arg_per))
        return r_vec
Exemplo n.º 2
0
    def calc_pos_from_E(self, E):
        #todo: can optimise this a lot
        r = self.calc_r_from_E(E)
        v = self.calc_true_anomaly(E)
        angle_sum = self.arg_per + v

        x = Vector3.X()
        n_dir = x.rotate(Rotation.aroundZ(self.long_asc))
        h_dir = self.h_vec.norm()
        r_dir = n_dir.rotate(Rotation.aroundVector(h_dir, v))
        r_vec = r_dir.fmul(self.calc_r_from_E(E))
        r_vec = r_vec.rotate(Rotation.aroundVector(h_dir, self.arg_per))
        return r_vec