コード例 #1
0
ファイル: burn.py プロジェクト: mwhagedorn/basaGC
    def terminate(self):

        """ Terminates the burn, disabling autopilot if running
        :return: None
        """
        self._disable_directional_autopilot()

        # if the throttle is open, close it
        if telemachus.get_telemetry("throttle") > 0:
            telemachus.cut_throttle()

        gc.remove_burn(self)
コード例 #2
0
ファイル: burn.py プロジェクト: mwhagedorn/basaGC
    def _thrust_monitor(self):

        # recalculate accumulated delta-v so far
        self.accumulated_delta_v = self._calculate_accumulated_delta_v()

        if self.accumulated_delta_v > (self.delta_v_required - 10) and not self._is_thrust_reduced:
            utils.log("Throttling back to 10%", log_level="DEBUG")
            telemachus.set_throttle(10)
            self._is_thrust_reduced = True

        if self.accumulated_delta_v > (self.delta_v_required - 0.5):
            telemachus.cut_throttle()
            utils.log("Closing throttle, burn complete!", log_level="DEBUG")
            gc.dsky.current_verb.terminate()
            gc.execute_verb(verb="06", noun="14")
            gc.main_loop_table.remove(self._thrust_monitor)
            gc.burn_complete()
            self.terminate()
            gc.go_to_poo()