def process_state(self, t, dt): StateAgent.process_state(self, t, dt) # Calculate the lateral distance to the threat aircraft entity = self.beliefs.entity_state threat = self.beliefs.threat_state self.is_left_down = helpers.transition_condition( entity.tactical_3d(), threat.tactical_3d(), self.LEFT_DOWN) self.is_left_up = helpers.transition_condition(entity.tactical_3d(), threat.tactical_3d(), self.LEFT_UP) self.is_pull_up = helpers.transition_condition(entity.tactical_3d(), threat.tactical_3d(), self.PULL_UP) self.is_level_flight = helpers.transition_condition( entity.tactical_3d(), threat.tactical_3d(), self.LEVEL_FLIGHT) self.is_right_up = helpers.transition_conditionhelpers.transition_condition( entity.tactical_3d(), threat.tactical_3d(), self.RIGHT_UP) self.is_right_down = helpers.transition_condition( entity.tactical_3d(), threat.tactical_3d(), self.RIGHT_DOWN) if self.is_left_down or self.is_left_up or self.is_pull_up or self.is_level_flight or self.is_right_up or self.is_right_down: self.transition_request = transition( self.is_left_down, self.is_left_up, self.is_pull_up, self.is_level_flight, self.is_right_up, self.is_right_down, LeftDown, LeftUp, PullUp, LevelFlight, RightUp, RightDown)
def process_state(self, t, dt): StateAgent.process_state(self, t, dt) # print 'State: ', self.__class__.__name__, ' at time step: ', t if self.beliefs.threat_state: entity = self.beliefs.entity_state threat = self.beliefs.threat_state self.is_param_one = helpers.transition_condition(entity.tactical_3d(), threat.tactical_3d(), self.PP2FR) self.is_param_two = helpers.transition_condition(entity.tactical_3d(), threat.tactical_3d(), self.PP2FO) self.is_param_three = helpers.transition_condition(entity.tactical_3d(), threat.tactical_3d(), self.PP2C) if self.is_param_one or self.is_param_two or self.is_param_three: self.transition_request = transition(self.is_param_one, self.is_param_two, self.is_param_three, EcuFlyRelativeBearing, EcuFlyingOffset, EcuConverting)
def process_state(self, t, dt): StateAgent.process_state(self, t, dt) # print 'State: ', self.__class__.__name__, ' at time step: ', t if self.beliefs.threat_state: # Calculate the lateral distance to the threat aircraft entity = self.beliefs.entity_state threat = self.beliefs.threat_state self.is_param_one = helpers.transition_condition(entity.tactical_3d(), threat.tactical_3d(), self.C2PP) self.is_param_two = helpers.transition_condition(entity.tactical_3d(), threat.tactical_3d(), self.C2FR) self.is_param_three = helpers.transition_condition(entity.tactical_3d(), threat.tactical_3d(), self.C2FO) if self.is_param_one or self.is_param_two or self.is_param_three: self.transition_request = transition(self.is_param_one, self.is_param_two, self.is_param_three, EcuPureIntercept, EcuFlyRelativeBearing, EcuFlyingOffset)
def process_state(self, t, dt): StateAgent.process_state(self, t, dt) # Calculate the lateral distance to the threat aircraft entity = self.beliefs.entity_state threat = self.beliefs.threat_state self.is_param_one = helpers.transition_condition( entity.tactical_3d(), threat.tactical_3d(), self.PARAMETER_SET_ONE) self.is_param_two = helpers.transition_condition( entity.tactical_3d(), threat.tactical_3d(), self.PARAMETER_SET_TWO) self.is_param_three = helpers.transition_condition( entity.tactical_3d(), threat.tactical_3d(), self.PARAMETER_SET_THREE) self.is_param_four = helpers.transition_condition( entity.tactical_3d(), threat.tactical_3d(), self.PARAMETER_SET_FOUR) self.is_param_five = helpers.transition_condition( entity.tactical_3d(), threat.tactical_3d(), self.PARAMETER_SET_FIVE) self.is_param_six = helpers.transition_condition( entity.tactical_3d(), threat.tactical_3d(), self.PARAMETER_SET_SIX) if self.is_param_one or self.is_param_two or self.is_param_three or self.is_param_four or self.is_param_five or self.is_param_six: self.transition_request = transition( self.is_param_one, self.is_param_two, self.is_param_three, self.is_param_four, self.is_param_five, self.is_param_six, LeftDown, LeftUp, PullUp, LevelFlight, PushDown, RightUp)