Aircraft Collision Avoidance System: Procedure Details
Classified in Other subjects
Written on in
English with a size of 3.34 KB
procedure Control_Collisions isCurrent_Obstacle_Distance: Distance_Type := 0; Current_Light: Light_Type := 0;Current_Pw : Power_Type := 0; Current_A: Altitude_Type :=0;Current_S :Speed_Type :=0; Pilot_P: PilotPresence_Type;Velocity_Seconds : integer := 0;Time_To_Collision : integer := 0;beginif (Control_Button.Get_Mode) thenRead_Distance(Current_Obstacle_Distance);Read_Power(Current_Pw);---InicioCurrent_S := Speed_Type (float (Current_Pw) * 1.2);Time_To_Collision := integer(Current_Obstacle_Distance) * 3600;Time_To_Collision := Time_To_Collision / 1000;Time_To_Collision := Time_To_Collision / (integer(Current_S))Pilot_P := Read_PilotPresence;Read_Light_Intensity(Current_Light);if (Control_Button.Get_Mode) thenif (Pilot_P = 1) thenif (Time_To_Collision < 10) thenAlarm(4);end if;if (Time_To_Collision < 5) thenSet_Maneuver(true);end if;elsif (Current_Light < 500 or Pilot_P = 0) thenif (Time_To_Collision < 15) thenAlarm(4);end if;if (Time_To_Collision < 10) thenSet_Maneuver(true);end if;end if;--Control Maneuverif (Get_Maneuver) thenCurrent_A := Read_Altitude;if (Maneuver_Progress_Pitch > 1 or Current_A <= 8500) thenManeuver_Progress_Pitch := Maneuver_Progress_Pitch + 1;Set_Aircraft_Pitch(20);end if;if (Maneuver_Progress_Roll > 1 or Current_A > 8500) thenManeuver_Progress_Roll := Maneuver_Progress_Roll + 1;Set_Aircraft_Roll(45);end if;if (Maneuver_Progress_Pitch = 12) thenif (Maneuver_Progress_Roll = 1) thenSet_Maneuver(False);end if;Set_Aircraft_Pitch(0);Maneuver_Progress_Pitch := 1;end if;if (Maneuver_Progress_Roll = 12) thenif (Maneuver_Progress_Pitch = 1) thenSet_Maneuver(False);end if;Set_Aircraft_Roll(0);Maneuver_Progress_Roll := 1;end if;end if;end if;elseif (Time_To_Collision < 10) thenAlarm(4);end if;end if;end Control_Collisions;