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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
| import hoverImg from '@/assets/images/aiNowFly/event/hover.png'
| import startRecordImg from '@/assets/images/aiNowFly/event/startRecord.png'
| import takePhotoImg from '@/assets/images/aiNowFly/event/takePhoto.png'
| // import TakePhoto from '@/views/RoutePlan/PointAirLine/EventEdit/TakePhoto.vue'
| // import CameraZoom from '@/views/RoutePlan/PointAirLine/EventEdit/CameraZoom.vue'
| // import RotateYaw from '@/views/RoutePlan/PointAirLine/EventEdit/RotateYaw.vue'
| // import GimbalYawRotate from '@/views/RoutePlan/PointAirLine/EventEdit/GimbalYawRotate.vue'
| // import GimbalPitchRotate from '@/views/RoutePlan/PointAirLine/EventEdit/GimbalPitchRotate.vue'
| // import HoverTime from '@/views/RoutePlan/PointAirLine/EventEdit/HoverTime.vue'
| import _ from 'lodash'
| // import Searchlight from '@/views/RoutePlan/PointAirLine/EventEdit/Searchlight.vue'
| // import Megaphone from '@/views/RoutePlan/PointAirLine/EventEdit/Megaphone.vue'
| import getBaseConfig from '@/buildConfig/config'
| const { hideEventSearchlight,hideEventMegaphone } = getBaseConfig()
|
| export const DRC_METHOD = {
| HEART_BEAT: 'heart_beat',
| DRONE_CONTROL: 'drone_control', // 飞行控制-虚拟摇杆
| DRONE_CONTROL2: 'stick_control', // 2代及以上飞行控制-摇杆
| DRONE_EMERGENCY_STOP: 'drone_emergency_stop', // 急停
| OSD_INFO_PUSH: 'osd_info_push', // 高频osd信息上报
| HSI_INFO_PUSH: 'hsi_info_push', // 避障信息上报
| DELAY_TIME_INFO_PUSH: 'delay_info_push', // 图传链路延时信息上报
| }
|
| export const fourGQuality = { 0: '无信号', 1: '差', 2: '较差', 3: '一般', 4: '较好', 5: '好' }
| export const SDRQuality = { 0: '无信号', 1: '差', 2: '较差', 3: '一般', 4: '较好', 5: '好' }
| export const directionMap = [
| { min: 0, max: 0, value: '正北' },
| { min: 0, max: 45, value: '北偏东' },
| { min: 45, max: 45, value: '东北' },
| { min: 45, max: 90, value: '北偏东' },
| { min: 90, max: 90, value: '正东' },
| { min: 90, max: 135, value: '东偏南' },
| { min: 135, max: 135, value: '东南' },
| { min: 135, max: 180, value: '南偏东' },
| { min: 180, max: 180, value: '正南' },
| { min: 180, max: 225, value: '南偏西' },
| { min: 225, max: 225, value: '西南' },
| { min: 225, max: 270, value: '西偏南' },
| { min: 270, max: 270, value: '正西' },
| { min: 270, max: 315, value: '西偏北' },
| { min: 315, max: 315, value: '西北' },
| { min: 315, max: 360, value: '北偏西' },
| { min: 360, max: 360, value: '正北' },
| ]
|
| export const droneEventList = [
| { name: '开始录像', value: 'startRecord', img: startRecordImg },
| { name: '悬停', value: 'hover', img: hoverImg },
| { name: '拍照', value: 'takePhoto', img: takePhotoImg },
| ]
|
| // 地图层级
| export const MAP_LEVEL = [
| { name: '县', heightRange: [0, 48651], height: 31753 },
| { name: '市', heightRange: [48651, 314863], height: 257731 },
| { name: '省', heightRange: [314863, 3796280000], height: 1987280 },
| ]
|
| const getImageUrl = name => {
| return new URL(`../assets/images/routePlan/eventList/${name}`, import.meta.url).href
| }
|
| // 探照灯参数
| function getSearchlightParams(type) {
| const searchlightParams = [
| //0关闭,1常亮,2爆闪
| { name: '开灯模式', key: 'searchlight_operate_type', value: type },
| { name: '亮度', key: 'searchlight_brightness', value: 100 },
| ]
| return _.cloneDeep(searchlightParams)
| }
|
| // 喊话参数
| function getMegaphoneParams(open) {
| const params = [
| //0关闭,1开始
| { name: '喊话动作开关', key: 'megaphone_operate_type', value: open },
| { name: '喊话动作音量', key: 'megaphone_operate_volume', value: 100 },
| { name: '是否单曲循环播放', key: 'megaphone_operate_loop', value: 0 },
| { name: '喊话音频文件在kmz中对应的路径', key: 'megaphone_operate_file_path', value: '' },
| { name: '喊话音频文件对应的名称', key: 'megaphone_file_name', value: '' },
| { name: 'uuid动作唯一标识', key: 'action_uuid', value: '' },
| { name: '喊话音频文件播放时显示的名字', key: 'megaphone_file_original_name', value: '' },
| { name: '喊话音频文件的md5值', key: 'megaphone_file_md5', value: '' },
| // 1: 比特率为8000 2: 比特率为16000 3: 比特率为24000 4: 比特率为32000 5: 比特率为48000 6: 比特率为64000
| { name: '喊话音频文件的压缩比特率', key: 'megaphone_file_bitrate', value: 1 },
| { name: '喊话文件id', key: 'speak_file_id', value: '' },
| ]
| return _.cloneDeep(params)
| }
|
| // export const pointEventList = [
| // {
| // label: '单拍',
| // key: 'takePhoto',
| // component: TakePhoto,
| // imgUrl: getImageUrl('takePhoto.png'),
| // params: [
| // { name: '拍摄照片文件后缀', key: 'file_suffix', value: '' },
| // { name: '拍摄照片存储类型', key: 'payload_lens_index', value: '' },
| // { name: '是否使用全局存储类型', key: 'use_global_payload_lens_index', value: 1 },
| // ],
| // },
| // {
| // label: '开始录像',
| // key: 'startRecord',
| // component: TakePhoto,
| // imgUrl: getImageUrl('startRecord.png'),
| // params: [
| // { name: '拍摄照片文件后缀', key: 'file_suffix', value: '' },
| // {
| // name: '拍摄照片存储类型',
| // key: 'payload_lens_index',
| // value: 'wide',
| // },
| // { name: '是否使用全局存储类型', key: 'use_global_payload_lens_index', value: '1' },
| // ],
| // },
| // {
| // label: '结束录像',
| // key: 'stopRecord',
| // imgUrl: getImageUrl('stopRecord.png'),
| // params: [],
| // },
| // {
| // label: '相机变焦',
| // component: CameraZoom,
| // key: 'zoom',
| // imgUrl: getImageUrl('zoom.png'),
| // params: [{ name: '变焦焦距', key: 'focal_length', value: 5 }],
| // },
| //
| // {
| // label: '云台偏航角',
| // key: 'gimbalRotate',
| // component: GimbalYawRotate,
| // imgUrl: getImageUrl('gimbalRotate.png'),
| // params: [
| // { name: '云台偏航角转动坐标系', key: 'gimbal_heading_yaw_base', value: 'north' },
| // { name: '云台转动模式', key: 'gimbal_rotate_mode', value: 'absoluteAngle' },
| // { name: '是否使能云台Pitch转动', key: 'gimbal_pitch_rotate_enable', value: 0 },
| // { name: '云台Pitch转动角度', key: 'gimbal_pitch_rotate_angle', value: 0 },
| // { name: '是否使能云台Roll转动 ', key: 'gimbal_roll_rotate_enable', value: 0 },
| // { name: '云台Roll转动角度', key: 'gimbal_roll_rotate_angle', value: 0 },
| // { name: '是否使能云台Yaw转动', key: 'gimbal_yaw_rotate_enable', value: 1 },
| // { name: '云台Yaw转动角度', key: 'gimbal_yaw_rotate_angle', value: 0 },
| // ],
| // },
| // {
| // label: '云台俯仰角',
| // key: 'gimbalPitchRotate',
| // component: GimbalPitchRotate,
| // imgUrl: getImageUrl('gimbalPitchRotate.png'),
| // params: [
| // { name: '云台偏航角转动坐标系', key: 'gimbal_heading_yaw_base', value: 'north' },
| // { name: '云台转动模式', key: 'gimbal_rotate_mode', value: 'absoluteAngle' },
| // { name: '是否使能云台Pitch转动', key: 'gimbal_pitch_rotate_enable', value: 1 },
| // { name: '云台Pitch转动角度', key: 'gimbal_pitch_rotate_angle', value: 0 },
| // { name: '是否使能云台Roll转动 ', key: 'gimbal_roll_rotate_enable', value: 0 },
| // { name: '云台Roll转动角度', key: 'gimbal_roll_rotate_angle', value: 0 },
| // { name: '是否使能云台Yaw转动', key: 'gimbal_yaw_rotate_enable', value: 0 },
| // { name: '云台Yaw转动角度', key: 'gimbal_yaw_rotate_angle', value: 0 },
| // ],
| // },
| // {
| // label: '飞行器偏航角',
| // key: 'rotateYaw',
| // component: RotateYaw,
| // imgUrl: getImageUrl('rotateYaw.png'),
| // params: [
| // {
| // name: '飞行器目标偏航角',
| // key: 'aircraft_heading',
| // value: 0,
| // },
| // ],
| // },
| // {
| // label: '悬停等待',
| // key: 'hover',
| // imgUrl: getImageUrl('hover.png'),
| // component: HoverTime,
| // params: [{ name: '飞行器悬停等待时间', key: 'hover_time', value: 10 }],
| // },
| // {
| // label: '全景拍照',
| // key: 'panoShot',
| // imgUrl: getImageUrl('panoShot.png'),
| // },
| // {
| // label: '喊话器',
| // key: 'megaphone',
| // hide: hideEventMegaphone,
| // imgUrl: getImageUrl('megaphone0.png'),
| // children: [
| // {
| // label: '开始喊话',
| // key: 'megaphone',
| // component: Megaphone,
| // imgUrl: getImageUrl('megaphone1.png'),
| // params: getMegaphoneParams(0),
| // },
| // {
| // label: '结束喊话',
| // key: 'megaphone',
| // imgUrl: getImageUrl('megaphone2.png'),
| // params: getMegaphoneParams(1),
| // },
| // ],
| // },
| // {
| // label: '探照灯',
| // key: 'searchlight',
| // hide: hideEventSearchlight,
| // imgUrl: getImageUrl('deng4.png'),
| // children: [
| // {
| // label: '照明',
| // key: 'searchlight',
| // component: Searchlight,
| // imgUrl: getImageUrl('deng1.png'),
| // params: getSearchlightParams(1),
| // },
| // {
| // label: '爆闪',
| // key: 'searchlight',
| // component: Searchlight,
| // imgUrl: getImageUrl('deng2.png'),
| // params: getSearchlightParams(2),
| // },
| // {
| // label: '关闭探照灯',
| // key: 'searchlight',
| // imgUrl: getImageUrl('deng0.png'),
| // params: getSearchlightParams(0),
| // },
| // ],
| // },
| // ]
|
| export const cameraModeList = [
| {
| label: '广角',
| value: 'wide',
| select: true,
| camera_mode: 1,
| },
| {
| label: '变焦',
| value: 'zoom',
| select: true,
| camera_mode: 2,
| },
| {
| label: '红外',
| value: 'ir',
| select: true,
| camera_mode: 3,
| },
| {
| label: '可见光',
| value: 'visable',
| select: true,
| camera_mode: 4,
| },
| ]
|
|