-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdraw_task_diff.py
More file actions
177 lines (147 loc) · 24.4 KB
/
Copy pathdraw_task_diff.py
File metadata and controls
177 lines (147 loc) · 24.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
import tkinter as tk
from tkinter import ttk
import re
import json
import ast
def extract_plans_from_log(log_path):
"""
從 log 文件中提取 raw_plan 和 compressed 數據
Args:
log_path (str): log 文件的路徑
Returns:
tuple: (raw_plan, compressed) 兩個列表
"""
raw_plan = []
compressed = []
try:
with open(log_path, 'r', encoding='utf-8') as f:
content = f.read()
# 提取 raw_plan - 使用更精確的正則表達式來匹配完整的列表
# 尋找從 raw_plan: 開始到下一行的 INFO 或文件結尾
raw_pattern = r'raw_plan:(\[.*?\])(?=\n\d{4}-\d{2}-\d{2}|\Z)'
raw_match = re.search(raw_pattern, content, re.DOTALL)
if raw_match:
raw_str = raw_match.group(1)
print(f"找到 raw_plan 數據,長度: {len(raw_str)}")
print(f"raw_plan 前100字符: {raw_str[:100]}")
print(f"raw_plan 後100字符: {raw_str[-100:]}")
try:
# 嘗試直接解析為 JSON
raw_plan = json.loads(raw_str)
print("使用 JSON 解析成功")
except json.JSONDecodeError as e:
print(f"JSON 解析失敗: {e}")
try:
# 如果 JSON 解析失敗,嘗試使用 ast.literal_eval
raw_plan = ast.literal_eval(raw_str)
print("使用 ast.literal_eval 解析成功")
print(f"解析後的 raw_plan 類型: {type(raw_plan)}, 長度: {len(raw_plan) if raw_plan else 0}")
except Exception as e2:
print(f"ast.literal_eval 解析失敗: {e2}")
print(f"錯誤詳情: {type(e2).__name__}: {str(e2)}")
raw_plan = []
else:
print("未找到 raw_plan 數據")
# 提取 compressed - 同樣的方法
compressed_pattern = r'compressed:(\[.*?\])(?=\n\d{4}-\d{2}-\d{2}|\Z)'
compressed_match = re.search(compressed_pattern, content, re.DOTALL)
if compressed_match:
compressed_str = compressed_match.group(1)
print(f"找到 compressed 數據,長度: {len(compressed_str)}")
try:
# 嘗試直接解析為 JSON
compressed = json.loads(compressed_str)
print("使用 JSON 解析成功")
except json.JSONDecodeError as e:
print(f"JSON 解析失敗: {e}")
try:
# 如果 JSON 解析失敗,嘗試使用 ast.literal_eval
compressed = ast.literal_eval(compressed_str)
print("使用 ast.literal_eval 解析成功")
print(f"解析後的 compressed 類型: {type(compressed)}, 長度: {len(compressed) if compressed else 0}")
except Exception as e2:
print(f"ast.literal_eval 解析失敗: {e2}")
print(f"錯誤詳情: {type(e2).__name__}: {str(e2)}")
compressed = []
else:
print("未找到 compressed 數據")
print(f"最終結果 - raw_plan: {len(raw_plan)} 個步驟")
print(f"最終結果 - compressed: {len(compressed)} 個步驟")
except FileNotFoundError:
print(f"找不到 log 文件: {log_path}")
except Exception as e:
print(f"讀取 log 文件時發生錯誤: {e}")
return raw_plan, compressed
def create_comparison_gui(raw_plan, compressed):
"""
創建比較 GUI
Args:
raw_plan (list): 原始計劃數據
compressed (list): 壓縮後的計劃數據
"""
root = tk.Tk()
root.title("Task Sequence Comparison")
# 創建樹形視圖
tree = ttk.Treeview(root, columns=("Step", "Raw", "Compressed"), show="headings")
style = ttk.Style()
style.configure("Treeview", font=("TkDefaultFont", 12)) # 調整為你想要的字體大小
tree.heading("Step", text="Step")
tree.heading("Raw", text="Raw Plan")
tree.heading("Compressed", text="Compressed")
# 設置列寬
tree.column("Step", width=50)
tree.column("Raw", width=400)
tree.column("Compressed", width=400)
# 添加數據
for step in sorted(set(item['step'] for item in raw_plan + compressed)):
# 獲取rawplan條目
raw_items = [item for item in raw_plan if item['step'] == step]
# 獲取compressed條目
compressed_items = [item for item in compressed if item['step'] == step]
max_rows = max(len(raw_items), len(compressed_items))
for i in range(max_rows):
raw_text = f"{raw_items[i]['agent']}: {raw_items[i]['instruction']}" if i < len(raw_items) else ""
compressed_text = f"{compressed_items[i]['agent']}: {compressed_items[i]['instruction']}" if i < len(compressed_items) else ""
if not compressed_items and raw_items:
compressed_text = "MISSING"
tree.insert("", "end", values=(step, raw_text, compressed_text), tags=("missing",))
else:
tree.insert("", "end", values=(step if i == 0 else "", raw_text, compressed_text))
# 設置缺失行的顏色
tree.tag_configure("missing", background="lightgreen")
# 添加滾動條
scrollbar = ttk.Scrollbar(root, orient="vertical", command=tree.yview)
tree.configure(yscrollcommand=scrollbar.set)
# 布局
tree.pack(side="left", fill="both", expand=True)
scrollbar.pack(side="right", fill="y")
root.mainloop()
def main():
"""
主函數:從 log 文件提取數據並創建比較 GUI
"""
# 你可以修改這裡的 log 路徑
log_path = "log/20250721/111739/planner.log" # 默認路徑,你可以修改
print(f"正在從 {log_path} 提取數據...")
raw_plan, compressed = extract_plans_from_log(log_path)
print(f"main 函數中 - raw_plan: {len(raw_plan) if raw_plan else 0} 個步驟")
print(f"main 函數中 - compressed: {len(compressed) if compressed else 0} 個步驟")
if raw_plan and compressed:
print("開始創建比較 GUI...")
create_comparison_gui(raw_plan, compressed)
else:
print("無法提取到有效的計劃數據,請檢查 log 文件路徑和內容")
if not raw_plan:
print("raw_plan 為空")
if not compressed:
print("compressed 為空")
# 保留原有的硬編碼數據作為備用
raw_plan= [
{'step': 1, 'agent': 'RIO', 'instruction': 'When on the ground, set Targeting Pod Power Switch to POD.'}, {'step': 2, 'agent': 'RIO', 'instruction': 'Set VIDEO switch to FLIR to select LANTIRN video feed in lieu of TCS feed for the TID.'}, {'step': 3, 'agent': 'RIO', 'instruction': 'Set TID Mode to TV to display LANTIRN feed.'}, {'step': 4, 'agent': 'RIO', 'instruction': 'LANTIRN pod will warm up during 8 minutes, When warm-up is complete, the LANTIRN Mode switch will automatically switch to STANDBY mode.'}, {'step': 5, 'agent': 'RIO', 'instruction': 'Press LANTIRN Mode switch to set it to OPERATE. STANDBY caution will flash for 30 seconds, then will switch to OPER.'}, {'step': 6, 'agent': 'RIO', 'instruction': 'Set Laser Arm switch to ARM. LASER ARMED indication will illuminate.'}, {'step': 7, 'agent': 'RIO', 'instruction': 'Press the LANTIRN Slider laser/focus'}, {'step': 8, 'agent': 'RIO', 'instruction': 'Modify the laser code using the Right Four-Way Hat (S4) switch Left/Right switch to select what digit to edit and the Right S4 Hat Up/Down switch to increment/decrement a digit.'}, {'step': 9, 'agent': 'RIO', 'instruction': 'Depress the Right Four-Way Hat (S4) switch to cycle between Auto and Manual mode. We will select manual mode since the RIO will manually lase the target.'}, {'step': 10, 'agent': 'RIO', 'instruction': 'Press the LANTIRN Slider laser/focus button again to deselect laser code.'}, {'step': 11, 'agent': 'RIO', 'instruction': 'Press the LANTIRN Slider AGC/MGC to set Automatic or Manual Gain Control. We will set Automatic.'}, {'step': 12, 'agent': 'RIO', 'instruction': 'Press the LANTIRN Mode Toggle to select between A/A (Air-to-Air) and A/G (Air-to-Ground) Mode. We will select A/G Mode.'}, {'step': 13, 'agent': 'RIO', 'instruction': 'If a waypoint is close to the target, you can slew the LANTIRN pod to this waypoint by using the Left Four-Way Hat switch Right (QWP + ) to select the desired waypoint. This will use an existing waypoint as a cue for the targeting pod.'}, {'step': 14, 'agent': 'RIO', 'instruction': 'If no waypoint is available, you can use the Right S4 Down switch to use QSNO (Cue-Snowplow) Mode. This will slew the pod to the direction the aircraft nose is pointing. You can coordinate with the pilot to point the aircraft in an approximate location of the target and let you slew the pod manually from there.'}, {'step': 15, 'agent': 'RIO', 'instruction': 'Use the LANTIRN Toggle FOV button to zoom in or out as required.'}, {'step': 16, 'agent': 'RIO', 'instruction': 'Slew the LANTIRN using the Center Slew Hat Switch to move the cursor manually on the target.'}, {'step': 17, 'agent': 'RIO', 'instruction': 'If desired, toggle between Black Hot (BHOT) and White Hot (WHOT) by depressing the Center Slew Hat Switch'}, {'step': 18, 'agent': 'RIO', 'instruction': 'Once cursor is on the target, press the Left Four-Way Hat switch Up (Area Track) to stop the cursor from drifting.'}, {'step': 19, 'agent': 'RIO', 'instruction': 'If desired, press the Left Four Way Hat switch Down (Point Track) to track an object like a high-contrast vehicle.'}, {'step': 20, 'agent': 'RIO', 'instruction': 'Press the LANTIRN Trigger Full-Action (second Detent) to designate the target. Once designated, the TTG (Time-to-Go) value and slant range values will be calculated properly.', 'note': 'When TREL (time to release) counter reaches 0, press and hold the LANTIRN Trigger Full-Action (second Detent) to lase the target. The « L » will blink as the laser is being fired. If the autolase mode is activated, the laser will begin firing at 10 seconds TIMP (Time-to-Impact) until TIMP zero + 4 seconds.'}, {'step': 21, 'agent': 'RIO', 'instruction': 'You can also use the Laser Latched button to fire the laser. Selecting it fires the laser for 60 seconds which can be overridden by pressing and releasing the first trigger detent.'}, {'step': 22, 'agent': 'RIO', 'instruction': 'To undesignate a target, depress the LANTIRN Mode Toggle selector (LANTIRN Undesignate control).'}, {'step': 23, 'agent': 'PILOT', 'instruction': ' Drive to the target waypoint until you reach there.'}, {'step': 24, 'agent': 'RIO', 'instruction': 'Select A/G Operation Mode by using the LANTIRN A/A-A/G Toggle Switch.'}, {'step': 25, 'agent': 'RIO', 'instruction': 'Slew Targeting Pod with Center Slew Hat'}, {'step': 26, 'agent': 'RIO', 'instruction': 'Press LANTIRN Two-Stage Trigger second detent to designate QDES. This will save the LANTIRN reticle’s position as QDES.'}, {'step': 27, 'agent': 'RIO', 'instruction': 'Press Right Four-Way Hat (S4) switch RIGHT to slave the FLIR to the QDES (designation cue) we just saved. This targeting pod’s line-of-sight will snap to the last saved QDES position. This is useful to re-acquire targets.'}, {'step': 28, 'agent': 'RIO', 'instruction': 'When on the ground, set Targeting Pod Power Switch to POD.'}, {'step': 29, 'agent': 'RIO', 'instruction': 'LANTIRN pod will warm up during 8 minutes.'}, {'step': 30, 'agent': 'RIO', 'instruction': 'While we wait, check if your laser code is set to the desired code (1688 by default). Press “RSHIFT + K” to show the GROUND SETTINGS page. You can ask the ground crew to modify the laser code by using “RSHIFT + RALT + 1”, “RSHIFT + RALT + 2” and “RSHIFT + RALT + 3”.'}, {'step': 31, 'agent': 'RIO', 'instruction': 'When warm-up is complete, the LANTIRN Mode switch will automatically switch to STANDBY mode.'}, {'step': 32, 'agent': 'RIO', 'instruction': 'Press LANTIRN Mode switch to set it to OPERATE. STANDBY caution will flash for 30 seconds, then will switch to OPER.'}, {'step': 33, 'agent': 'RIO', 'instruction': 'Set Laser Arm switch to ARM. LASER ARMED indication will illuminate.'}, {'step': 34, 'agent': 'RIO', 'instruction': 'Set VIDEO switch to FLIR to select LANTIRN video feed in lieu of TCS feed for the TID.'}, {'step': 35, 'agent': 'RIO', 'instruction': 'Set TID Mode to TV to display LANTIRN feed.'}, {'step': 36, 'agent': 'RIO', 'instruction': 'Set LANTIRN laser code setting to the laser code set by the ground crew (in our case, 1688). To modify LANTIRN laser code option:', 'sub_steps': ['Press the LANTIRN Slider laser/focus', 'Modify the laser code using the Right S4 Left/Right switch to select what digit to edit and the Right S4 Hat Up/Down switch to increment/decrement a digit.', 'Press the Right S4 Press switch to switch between Auto and Manual mode. We will select manual mode since the RIO will manually lase the target.', 'Press the LANTIRN Slider laser/focus button again to deselect laser code.', 'Press the LANTIRN Slider AGC/MGC to set Automatic or Manual Gain Control. We will set Automatic.', 'Press the LANTIRN Mode Toggle to select between A/A (Air-to-Air) and A/G (Air-to-Ground) Mode. We will select A/G Mode.']}, {'step': 37, 'agent': 'RIO', 'instruction': 'Select GBU-12 WPN TYPE'}, {'step': 38, 'agent': 'RIO', 'instruction': 'Select Manual Attack Mode'}, {'step': 39, 'agent': 'RIO', 'instruction': 'Select desired Delivery Mode (we will use STP and SGL, Step and Single). • STP (Step) releases a single bomb per bomb release button press. • RPL (Ripple) releases multiple bombs per bomb release button press. • SGL (Single) releases a single bomb per bomb release button press. • PRS (Pairs) releases a pair of bombs per bomb release button press.'}, {'step': 40, 'agent': 'RIO', 'instruction': 'Select Mechanical Fuze to NOSE'}, {'step': 41, 'agent': 'RIO', 'instruction': 'Select Electronic Fuze to INST (Instantaneous)'}, {'step': 42, 'agent': 'RIO', 'instruction': 'Select Delivery options if necessary (we will not use any since we use STP-SGL)'}, {'step': 43, 'agent': 'RIO', 'instruction': 'Arm Stations that you want to use. We will use stations 3, 4, 5 and 6 (param).'}, {'step': 44, 'agent': 'RIO', 'instruction': 'If a waypoint is close to the target, you can slew the LANTIRN pod to this waypoint by using the Left Four-Way Hat switch Right (QWP + ) to select the desired waypoint. This will use an existing waypoint as a cue for the targeting pod.'}, {'step': 45, 'agent': 'RIO', 'instruction': 'If no waypoint is available, you can use the Right S4 Down switch to use QSNO (Cue-Snowplow) Mode. This will slew the pod to the direction the aircraft nose is pointing. You can coordinate with the pilot to point the aircraft in an approximate location of the target and let you slew the pod manually from there.'}, {'step': 46, 'agent': 'RIO', 'instruction': 'Use the LANTIRN Toggle FOV button to zoom in or out as required.'}, {'step': 47, 'agent': 'RIO', 'instruction': 'Move the LANTIRN stick lever to move the cursor manually on the target.'}, {'step': 48, 'agent': 'RIO', 'instruction': 'Once cursor is on the target, press the Left Four-Way Hat switch Up (Area Track) to stop the cursor from drifting.'}, {'step': 49, 'agent': 'RIO', 'instruction': 'If desired, press the Left Four Way Hat switch Down (Point Track) to track an object like a high-contrast vehicle.'}, {'step': 50, 'agent': 'RIO', 'instruction': 'A) Press the LANTIRN Trigger Full-Action (second Detent) to designate the target. Once designated, the TTG (Time-to-Go) value and slant range values will be calculated properly. B) When TREL (time to release) counter reaches 0, press and hold the LANTIRN Trigger Full-Action (second Detent) to lase the target. The « L » will blink as the laser is being fired. If the autolase mode is activated, the laser will begin firing at 10 seconds TIMP (Time-to-Impact) until TIMP zero + 4 seconds.'}, {'step': 51, 'agent': 'RIO', 'instruction': 'You can also use the Laser Latched button to fire the laser. Selecting it fires the laser for 60 seconds which can be overridden by the pressing and releasing the first trigger detent.'}, {'step': 52, 'agent': 'PILOT', 'instruction': 'Master Arm switch – ON (UP)'}, {'step': 53, 'agent': 'PILOT', 'instruction': 'Set the WEAPON SELECTOR button in, hold it in and cycle the Weapon Selector DOWN to OFF.'}, {'step': 54, 'agent': 'PILOT', 'instruction': 'HUD Display Mode – A/G'}, {'step': 55, 'agent': 'PILOT', 'instruction': 'Set VDI Mode - TV'}, {'step': 56, 'agent': 'PILOT', 'instruction': 'Verify that stations 3, 4, 5 and 6 are selected'}, {'step': 57, 'agent': 'PILOT', 'instruction': 'Set Wing Sweep Thumb switch DOWN to BOMB mode. Wing sweep will automatically go to 55 deg.'}, {'step': 58, 'agent': 'PILOT', 'instruction': 'Once the Time to Release reaches 0 and the Bomb Release Cue crosses the two lines, press the STORE RELEASE button to drop the bomb.'}, {'step': 59, 'agent': 'PILOT', 'instruction': 'As the pilot, take extreme care to fly in a gentle right-hand turn over the target to provide the least disturbance to the camera limits, maintaining the targeting pod laser tracking. If the targeting pod gets masked by the aircraft fuselage, the laser link will be broken and the guided bombs will go dumb and miss their mark.'}, {'step': 60, 'agent': 'RIO', 'instruction': 'To undesignate the target, depress the LANTIRN Mode Toggle selector (LANTIRN Undesignate control).'}]
compressed = [
{'step': 1, 'agent': 'RIO', 'instruction': 'When on the ground, set Targeting Pod Power Switch to POD.'}, {'step': 2, 'agent': 'RIO', 'instruction': 'Set VIDEO switch to FLIR to select LANTIRN video feed in lieu of TCS feed for the TID.'}, {'step': 3, 'agent': 'RIO', 'instruction': 'Set TID Mode to TV to display LANTIRN feed.'}, {'step': 4, 'agent': 'RIO', 'instruction': 'LANTIRN pod will warm up during 8 minutes, When warm-up is complete, the LANTIRN Mode switch will automatically switch to STANDBY mode.'}, {'step': 5, 'agent': 'RIO', 'instruction': 'Press LANTIRN Mode switch to set it to OPERATE. STANDBY caution will flash for 30 seconds, then will switch to OPER.'}, {'step': 6, 'agent': 'RIO', 'instruction': 'Set Laser Arm switch to ARM. LASER ARMED indication will illuminate.'}, {'step': 7, 'agent': 'RIO', 'instruction': 'Press the LANTIRN Slider laser/focus'}, {'step': 8, 'agent': 'RIO', 'instruction': 'Modify the laser code using the Right Four-Way Hat (S4) switch Left/Right switch to select what digit to edit and the Right S4 Hat Up/Down switch to increment/decrement a digit.'}, {'step': 9, 'agent': 'RIO', 'instruction': 'Depress the Right Four-Way Hat (S4) switch to cycle between Auto and Manual mode. We will select manual mode since the RIO will manually lase the target.'}, {'step': 10, 'agent': 'RIO', 'instruction': 'Press the LANTIRN Slider laser/focus button again to deselect laser code.'}, {'step': 11, 'agent': 'RIO', 'instruction': 'Press the LANTIRN Slider AGC/MGC to set Automatic or Manual Gain Control. We will set Automatic.'}, {'step': 12, 'agent': 'RIO', 'instruction': 'Press the LANTIRN Mode Toggle to select between A/A (Air-to-Air) and A/G (Air-to-Ground) Mode. We will select A/G Mode.'}, {'step': 13, 'agent': 'RIO', 'instruction': 'If a waypoint is close to the target, you can slew the LANTIRN pod to this waypoint by using the Left Four-Way Hat switch Right (QWP + ) to select the desired waypoint. This will use an existing waypoint as a cue for the targeting pod.'}, {'step': 14, 'agent': 'RIO', 'instruction': 'If no waypoint is available, you can use the Right S4 Down switch to use QSNO (Cue-Snowplow) Mode. This will slew the pod to the direction the aircraft nose is pointing. You can coordinate with the pilot to point the aircraft in an approximate location of the target and let you slew the pod manually from there.'}, {'step': 15, 'agent': 'RIO', 'instruction': 'Use the LANTIRN Toggle FOV button to zoom in or out as required.'}, {'step': 16, 'agent': 'RIO', 'instruction': 'Slew the LANTIRN using the Center Slew Hat Switch to move the cursor manually on the target.'}, {'step': 17, 'agent': 'RIO', 'instruction': 'If desired, toggle between Black Hot (BHOT) and White Hot (WHOT) by depressing the Center Slew Hat Switch'}, {'step': 18, 'agent': 'RIO', 'instruction': 'Once cursor is on the target, press the Left Four-Way Hat switch Up (Area Track) to stop the cursor from drifting.'}, {'step': 19, 'agent': 'RIO', 'instruction': 'If desired, press the Left Four Way Hat switch Down (Point Track) to track an object like a high-contrast vehicle.'}, {'step': 20, 'agent': 'RIO', 'instruction': 'Press the LANTIRN Trigger Full-Action (second Detent) to designate the target. Once designated, the TTG (Time-to-Go) value and slant range values will be calculated properly.', 'note': 'When TREL (time to release) counter reaches 0, press and hold the LANTIRN Trigger Full-Action (second Detent) to lase the target. The « L » will blink as the laser is being fired. If the autolase mode is activated, the laser will begin firing at 10 seconds TIMP (Time-to-Impact) until TIMP zero + 4 seconds.'}, {'step': 21, 'agent': 'RIO', 'instruction': 'You can also use the Laser Latched button to fire the laser. Selecting it fires the laser for 60 seconds which can be overridden by pressing and releasing the first trigger detent.'}, {'step': 22, 'agent': 'RIO', 'instruction': 'To undesignate a target, depress the LANTIRN Mode Toggle selector (LANTIRN Undesignate control).'}, {'step': 23, 'agent': 'PILOT', 'instruction': ' Drive to the target waypoint until you reach there.'}, {'step': 26, 'agent': 'RIO', 'instruction': 'Press LANTIRN Two-Stage Trigger second detent to designate QDES. This will save the LANTIRN reticle’s position as QDES.'}, {'step': 27, 'agent': 'RIO', 'instruction': 'Press Right Four-Way Hat (S4) switch RIGHT to slave the FLIR to the QDES (designation cue) we just saved. This targeting pod’s line-of-sight will snap to the last saved QDES position. This is useful to re-acquire targets.'}, {'step': 30, 'agent': 'RIO', 'instruction': 'While we wait, check if your laser code is set to the desired code (1688 by default). Press “RSHIFT + K” to show the GROUND SETTINGS page. You can ask the ground crew to modify the laser code by using “RSHIFT + RALT + 1”, “RSHIFT + RALT + 2” and “RSHIFT + RALT + 3”.'}, {'step': 37, 'agent': 'RIO', 'instruction': 'Select GBU-12 WPN TYPE'}, {'step': 38, 'agent': 'RIO', 'instruction': 'Select Manual Attack Mode'}, {'step': 39, 'agent': 'RIO', 'instruction': 'Select desired Delivery Mode (we will use STP and SGL, Step and Single). • STP (Step) releases a single bomb per bomb release button press. • RPL (Ripple) releases multiple bombs per bomb release button press. • SGL (Single) releases a single bomb per bomb release button press. • PRS (Pairs) releases a pair of bombs per bomb release button press.'}, {'step': 40, 'agent': 'RIO', 'instruction': 'Select Mechanical Fuze to NOSE'}, {'step': 41, 'agent': 'RIO', 'instruction': 'Select Electronic Fuze to INST (Instantaneous)'}, {'step': 42, 'agent': 'RIO', 'instruction': 'Select Delivery options if necessary (we will not use any since we use STP-SGL)'}, {'step': 43, 'agent': 'RIO', 'instruction': 'Arm Stations that you want to use. We will use stations 3, 4, 5 and 6 (param).'}, {'step': 52, 'agent': 'PILOT', 'instruction': 'Master Arm switch – ON (UP)'}, {'step': 53, 'agent': 'PILOT', 'instruction': 'Set the WEAPON SELECTOR button in, hold it in and cycle the Weapon Selector DOWN to OFF.'}, {'step': 54, 'agent': 'PILOT', 'instruction': 'HUD Display Mode – A/G'}, {'step': 55, 'agent': 'PILOT', 'instruction': 'Set VDI Mode - TV'}, {'step': 56, 'agent': 'PILOT', 'instruction': 'Verify that stations 3, 4, 5 and 6 are selected'}, {'step': 57, 'agent': 'PILOT', 'instruction': 'Set Wing Sweep Thumb switch DOWN to BOMB mode. Wing sweep will automatically go to 55 deg.'}, {'step': 58, 'agent': 'PILOT', 'instruction': 'Once the Time to Release reaches 0 and the Bomb Release Cue crosses the two lines, press the STORE RELEASE button to drop the bomb.'}, {'step': 59, 'agent': 'PILOT', 'instruction': 'As the pilot, take extreme care to fly in a gentle right-hand turn over the target to provide the least disturbance to the camera limits, maintaining the targeting pod laser tracking. If the targeting pod gets masked by the aircraft fuselage, the laser link will be broken and the guided bombs will go dumb and miss their mark.'}]
if __name__ == "__main__":
# 使用自動提取功能
main()
# 如果你想使用硬編碼的數據進行測試,可以取消下面的註釋
# create_comparison_gui(raw_plan, compressed)