Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
761 lines (676 loc) · 37.5 KB
/
Copy pathindex.html
File metadata and controls
761 lines (676 loc) · 37.5 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
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
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
<!-- index.html — uWaveSuite Web PWA (структура) -->
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="theme-color" content="#1a1a2e">
<title>uWaveSuite</title>
<link rel="stylesheet" href="styles.css">
<link rel="manifest" href="manifest.json">
</head>
<body>
<div id="app">
<!-- ===== ВЕРХНЯЯ ПАНЕЛЬ ===== -->
<div id="top-bar">
<div id="connection-indicator" title="Статус соединения"></div>
<div id="vlbl-indicator" title="VLBL режим" style="display:none; padding:2px 6px; background:var(--btn-export); color:#000; border-radius:3px; font-size:10px; font-weight:700;">VLBL</div>
<span id="device-label">uWave</span>
<span id="status-text">Не подключено</span>
<button id="btn-theme" class="top-btn btn-theme" title="Тема">🎨</button>
<button id="btn-connection" class="top-btn btn-connect">🔌 uWave</button>
<button id="btn-gnss" class="top-btn btn-gnss">📡 GNSS</button>
<button id="btn-tracking" class="top-btn btn-start" disabled>▶ Трекинг</button>
<button id="btn-settings" class="top-btn btn-settings">⚙ Настройки</button>
<!-- Выпадающая кнопка Инструменты -->
<div class="dropdown" style="display:inline-block; position:relative;">
<button class="top-btn btn-tools" onclick="UWApp.toggleDropdown('tools-dropdown')">🔧 Инструменты ▾</button>
<div id="tools-dropdown" class="dropdown-menu" style="display:none; position:absolute; top:100%; right:0; z-index:300; min-width:200px;">
<div class="dropdown-item" onclick="UWApp.openTrackingPanel(); UWApp.closeAllDropdowns();">🎯 Настройка трекинга</div>
<div class="dropdown-item" onclick="UWApp.openDevicesPanel(); UWApp.closeAllDropdowns();">📡 Устройства</div>
<div class="dropdown-item" onclick="UWApp.toggleTopoPanel(); UWApp.closeAllDropdowns();">🌐 Топопривязка</div>
<div class="dropdown-item" onclick="UWApp.openAddressingPanel(); UWApp.closeAllDropdowns();">🔢 Адресация</div>
<div class="dropdown-item" onclick="UWApp.openVLBLPanel(); UWApp.closeAllDropdowns();">📡 VLBL</div>
<div class="dropdown-item" onclick="window.open('tools/coord-converter.html','_blank'); UWApp.closeAllDropdowns();">🔄 Конвертер координат</div>
</div>
</div>
<!-- Кнопка Экспорт -->
<button class="top-btn btn-export" onclick="UWApp.openExportPanel()">📤 Экспорт</button>
<!-- Выпадающая кнопка POI -->
<div class="dropdown" style="display:inline-block; position:relative;">
<button class="top-btn btn-export" onclick="UWApp.toggleDropdown('poi-dropdown')">📍 POI ▾</button>
<div id="poi-dropdown" class="dropdown-menu" style="display:none; position:absolute; top:100%; right:0; z-index:300; min-width:180px;">
<div class="dropdown-item" onclick="UWApp.loadPOI(); UWApp.closeAllDropdowns();">📂 Загрузить из CSV</div>
<div class="dropdown-item" onclick="UWApp.exportPOI_CSV(); UWApp.closeAllDropdowns();">💾 Сохранить в CSV</div>
<div class="dropdown-item" onclick="UWApp.clearPOI(); UWApp.closeAllDropdowns();">🗑 Очистить все</div>
</div>
</div>
<button id="btn-chat" class="top-btn btn-chat" onclick="UWApp.toggleChatPanel()">💬 Чат
<span id="chat-badge" style="display:none; background:#ff4444; color:#fff; border-radius:10px; padding:1px 6px; font-size:10px; margin-left:4px; font-weight:700;">0</span>
</button>
<!-- Выпадающая кнопка Лог -->
<div class="dropdown" style="display:inline-block; position:relative;">
<button class="top-btn btn-log" onclick="UWApp.toggleDropdown('log-dropdown')">📋 Лог ▾</button>
<div id="log-dropdown" class="dropdown-menu" style="display:none; position:absolute; top:100%; right:0; z-index:300; min-width:170px;">
<div class="dropdown-item" onclick="UWApp.saveLog(); UWApp.closeAllDropdowns();">💾 Сохранить</div>
<div class="dropdown-item" onclick="UWApp.loadLog(); UWApp.closeAllDropdowns();">📂 Открыть</div>
<div id="log-play-item" class="dropdown-item" onclick="UWApp.togglePlayback(); UWApp.closeAllDropdowns();">▶ Воспроизвести</div>
<div id="log-stop-item" class="dropdown-item" onclick="UWApp.togglePlayback(); UWApp.closeAllDropdowns();" style="display:none;">⏹ Остановить</div>
<div class="dropdown-item" onclick="UWApp.clearConsole(); UWApp.closeAllDropdowns();">🗑 Очистить консоль</div>
<div class="dropdown-item" onclick="UWApp.toggleConsole(); UWApp.closeAllDropdowns();">👁 Показать/скрыть консоль</div>
</div>
</div>
</div>
<!-- ===== КАРТА ===== -->
<div id="map-container">
<canvas id="map-canvas"></canvas>
<!-- Информация об антенне -->
<div id="antenna-info">
<div><span class="ai-label">Широта:</span> <span class="ai-value" id="ai-lat">--</span></div>
<div><span class="ai-label">Долгота:</span> <span class="ai-value" id="ai-lon">--</span></div>
<div><span class="ai-label">Азимут:</span> <span class="ai-value" id="ai-hdg">--</span>°</div>
<div><span class="ai-label">Глубина:</span> <span class="ai-value" id="ai-dpt">--</span> м</div>
<div><span class="ai-label">Темп.:</span> <span class="ai-value" id="ai-tmp">--</span>°C</div>
</div>
<!-- Управление треками -->
<div id="tracks-control">
<button class="track-btn active" id="btn-tracks-show">📐 Треки</button>
<button class="track-btn" id="btn-tracks-clear">🗑 Очистить</button>
<button id="btn-ruler" class="track-btn">📏 Линейка</button>
<!-- Прогресс воспроизведения -->
<div id="playback-progress" style="display:none; width:150px; height:4px; background:var(--bg-tertiary); border-radius:2px;">
<div id="playback-progress-fill" style="width:0%; height:100%; background:var(--btn-start); border-radius:2px; transition:width 0.3s;"></div>
</div>
<!-- Контрол скорости -->
<div id="playback-speed-control" style="display:none; align-items:center; gap:5px;">
<button id="btn-speed-down" class="track-btn" style="width:32px;">−</button>
<span id="playback-speed-current" style="background:var(--btn-start); color:var(--btn-text); padding:4px 10px; border-radius:4px; font-size:12px; font-weight:bold;">1x</span>
<button id="btn-speed-up" class="track-btn" style="width:32px;">+</button>
</div>
</div>
<!-- Шкала -->
<div id="scale-bar"></div>
<!-- Консоль -->
<div id="console-panel" style="display:none; position:absolute; bottom:10px; left:10px; right:10px; max-height:250px; background:var(--bg-overlay); border:1px solid var(--border-primary); border-radius:8px; z-index:50; flex-direction:column; backdrop-filter:blur(8px);">
<!-- Заголовок -->
<div id="console-header" style="display:flex; justify-content:space-between; align-items:center; padding:8px 12px; border-bottom:1px solid var(--border-primary);">
<span style="font-size:12px; font-weight:600; color:var(--text-accent);">📋 Консоль</span>
<div style="display:flex; gap:8px; align-items:center;">
<span id="console-stats" style="font-size:10px; color:var(--text-secondary); display:flex; gap:8px;"></span>
<button id="console-btn-copy" title="Копировать" style="background:none;border:none;color:var(--text-secondary);cursor:pointer;">📋</button>
<button id="console-btn-export" title="Экспорт" style="background:none;border:none;color:var(--text-secondary);cursor:pointer;">💾</button>
<button id="console-btn-clear" title="Очистить" style="background:none;border:none;color:var(--text-secondary);cursor:pointer;">🗑</button>
<button onclick="UIConsole.close()" title="Закрыть" style="background:none;border:none;color:var(--text-secondary);cursor:pointer;">✕</button>
</div>
</div>
<!-- Фильтры -->
<div style="display:flex; gap:8px; padding:6px 12px; align-items:center; flex-wrap:wrap; border-bottom:1px solid var(--border-primary);">
<input type="text" id="console-filter" placeholder="🔍 Фильтр..." style="flex:1; padding:4px 8px; border:1px solid var(--border-primary); border-radius:4px; background:var(--bg-input); color:var(--text-primary); font-size:11px; min-width:100px;">
<label style="font-size:10px; color:var(--text-info); display:flex; align-items:center; gap:2px;">
<input type="checkbox" class="console-type-checkbox" data-type="info" checked> Info
</label>
<label style="font-size:10px; color:var(--border-success); display:flex; align-items:center; gap:2px;">
<input type="checkbox" class="console-type-checkbox" data-type="success" checked> OK
</label>
<label style="font-size:10px; color:var(--border-warning); display:flex; align-items:center; gap:2px;">
<input type="checkbox" class="console-type-checkbox" data-type="warning" checked> Warn
</label>
<label style="font-size:10px; color:var(--border-danger); display:flex; align-items:center; gap:2px;">
<input type="checkbox" class="console-type-checkbox" data-type="error" checked> Err
</label>
<label style="font-size:10px; color:var(--text-muted); display:flex; align-items:center; gap:2px;">
<input type="checkbox" class="console-type-checkbox" data-type="debug"> Debug
</label>
<label style="font-size:10px; color:var(--text-secondary); display:flex; align-items:center; gap:2px;">
<input type="checkbox" id="console-auto-scroll" checked> Auto
</label>
</div>
<!-- Содержимое -->
<div id="console-content" style="padding:8px 12px; overflow-y:auto; font-family:'Consolas','Monaco',monospace; font-size:11px; line-height:1.5; flex:1;"></div>
</div>
</div>
<!-- Панель топопривязки -->
<div id="topo-panel" class="modal-panel" style="border-color: var(--border-accent);">
<h3>🌐 Топопривязка</h3>
<div id="topo-gnss-status">Внешний GNSS не подключен</div>
<div class="topo-row">
<label>Широта:</label>
<input type="text" id="topo-lat" placeholder="55.123456">
</div>
<div class="topo-row">
<label>Долгота:</label>
<input type="text" id="topo-lon" placeholder="37.654321">
</div>
<div class="topo-row">
<label>Курс (°):</label>
<input type="number" id="topo-hdg" placeholder="0" min="0" max="360" step="0.1" value="0">
</div>
<div class="topo-buttons">
<button class="btn-get-gnss" onclick="UWApp.getPhoneGPS()">📱 GPS</button>
<button class="btn-apply-topo" onclick="UWApp.applyTopoBinding()">✓ Применить</button>
<button class="btn-cancel-topo" onclick="UWApp.toggleTopoPanel()">✕ Отмена</button>
<button class="btn-reset-topo" onclick="UWApp.clearTopoBinding()">🗑 Сброс</button>
</div>
</div>
<!-- Панель чата -->
<div id="chat-panel" class="modal-panel modal-panel--chat" style="border-color: var(--btn-tools);">
<!-- Заголовок -->
<div class="chat-header">
<h3>💬 Чат</h3>
<div class="chat-header-actions">
<button onclick="UIChat.exportMessages()" title="Экспорт">💾</button>
<button onclick="UIChat.clearMessages()" title="Очистить">🗑</button>
<button onclick="UIChat.close()" title="Закрыть">✕</button>
</div>
</div>
<!-- Фильтры -->
<div class="chat-filters">
<button class="chat-filter-btn active" data-filter="all">Все</button>
<button class="chat-filter-btn" data-filter="incoming">⬇ Входящие</button>
<button class="chat-filter-btn" data-filter="outgoing">⬆ Исходящие</button>
<button class="chat-filter-btn" data-filter="async">ASYNC</button>
<button class="chat-filter-btn" data-filter="packet">Пакеты</button>
</div>
<!-- Список сообщений -->
<div id="chat-messages"></div>
<!-- Форма отправки -->
<div class="chat-send-form">
<div style="display:flex; gap:8px; margin-bottom:8px;">
<select id="chat-send-type" style="flex:1; padding:6px; border:1px solid var(--border-primary); border-radius:4px; background:var(--bg-input); color:var(--text-primary); font-size:12px;">
<option value="cdma">📻 CDMA (короткий запрос)</option>
<option value="packet">📦 Передача пакета</option>
<option value="itg">🔍 Короткий логический (PT_ITG)</option>
</select>
</div>
<!-- Форма CDMA -->
<div id="chat-form-cdma" class="chat-form">
<div class="chat-form-row">
<label>TX канал:</label>
<input type="number" id="chat-cdma-tx" value="0" min="0">
<label>RX канал:</label>
<input type="number" id="chat-cdma-rx" value="0" min="0">
<label>Команда:</label>
<select id="chat-cdma-cmd">
<option value="0">PING</option>
<option value="2" selected>Глубина (DPT)</option>
<option value="3">Температура (TMP)</option>
<option value="4">Напряжение (BAT)</option>
<option value="7">User CMD 0</option>
<option value="8">User CMD 1</option>
<option value="9">User CMD 2</option>
<option value="10">User CMD 3</option>
<option value="11">User CMD 4</option>
<option value="12">User CMD 5</option>
<option value="13">User CMD 6</option>
<option value="14">User CMD 7</option>
<option value="15">User CMD 8</option>
</select>
</div>
</div>
<!-- Форма пакета -->
<div id="chat-form-packet" class="chat-form" style="display:none;">
<div class="chat-form-row">
<label>Адрес:</label>
<input type="number" id="chat-pkt-addr" value="0" min="0" max="255">
<label>Попытки:</label>
<input type="number" id="chat-pkt-tries" value="3" min="1" max="10">
</div>
<div class="chat-form-row">
<label>Данные:</label>
<input type="text" id="chat-pkt-data" placeholder="Текст (до 64 байт)" maxlength="64">
<span id="chat-pkt-size">0/64</span>
</div>
</div>
<!-- Форма ITG -->
<div id="chat-form-itg" class="chat-form" style="display:none;">
<div class="chat-form-row">
<label>Адрес:</label>
<input type="number" id="chat-itg-addr" value="0" min="0" max="254">
<label>Data ID:</label>
<select id="chat-itg-dataid">
<option value="0">Глубина (DPT)</option>
<option value="1">Температура (TMP)</option>
<option value="2">Напряжение (BAT)</option>
</select>
</div>
</div>
<button id="chat-send-btn" class="btn-apply-topo" style="width:100%; margin-top:8px;">📤 Отправить</button>
</div>
</div>
<!-- Панель трекинга -->
<div id="tracking-panel" class="modal-panel" style="border-color: var(--btn-start);">
<h3 style="color:var(--btn-start);">🎯 Трекинг</h3>
<!-- Статус -->
<div id="tracking-status" style="text-align:center; font-size:12px; margin-bottom:12px; min-height:18px;"></div>
<!-- Кнопки управления -->
<div style="display:flex; gap:8px; margin-bottom:16px;">
<button id="tracking-btn-start" class="btn-apply-topo" style="flex:1;">▶ Старт</button>
<button id="tracking-btn-pause" class="btn-get-gnss" style="flex:1;" disabled>⏸ Пауза</button>
<button id="tracking-btn-stop" class="btn-reset-topo" style="flex:1;" disabled>⏹ Стоп</button>
</div>
<!-- Режим адресации -->
<div class="settings-section">
<h4>⚙ Режим адресации</h4>
<div class="settings-row">
<label>Режим:</label>
<select id="tracking-mode">
<option value="cdma">📻 CDMA каналы</option>
<option value="logical">🔢 Логические адреса</option>
</select>
</div>
</div>
<!-- Добавление устройства -->
<div class="settings-section">
<h4>📡 Добавить устройство</h4>
<div id="tracking-add-cdma">
<div class="settings-row">
<label>TX канал:</label>
<input type="number" id="tracking-add-tx-ch" value="0" min="0">
</div>
<div class="settings-row">
<label>RX канал:</label>
<input type="number" id="tracking-add-rx-ch" value="0" min="0">
</div>
</div>
<div id="tracking-add-logical" style="display:none;">
<div class="settings-row">
<label>Адрес:</label>
<input type="number" id="tracking-add-address" value="0" min="0" max="254">
</div>
</div>
<button id="tracking-btn-add" class="btn-apply-topo" style="width:100%; margin-top:8px;">+ Добавить</button>
</div>
<!-- Настройки -->
<div class="settings-section">
<h4>⚙ Настройки опроса</h4>
<div class="settings-row">
<label>Интервал (мс):</label>
<input type="number" id="tracking-interval" value="2000" min="100" step="100">
</div>
<div class="settings-row">
<label>Режим команд:</label>
<select id="tracking-command-mode">
<option value="weighted">Взвешенный (5:1:1)</option>
<option value="cycle">Циклический</option>
<option value="single">Одиночный</option>
</select>
</div>
</div>
<!-- Список устройств -->
<div class="settings-section">
<h4>📡 Устройства в трекинге</h4>
<div id="tracking-devices-list"></div>
<button id="tracking-btn-clear" class="btn-cancel-topo" style="width:100%; margin-top:8px;">🗑 Очистить все</button>
</div>
<!-- Статистика -->
<div class="settings-section">
<h4>📊 Статистика</h4>
<div id="tracking-stats" style="font-size:11px; line-height:1.8;"></div>
</div>
<button onclick="UITracking.close()" class="btn-cancel-topo" style="width:100%; margin-top:12px;">✕ Закрыть</button>
</div>
<!-- Панель адресации -->
<div id="addressing-panel" class="modal-panel" style="border-color: var(--btn-settings);">
<h3 style="color:var(--btn-settings);">🔢 Логический адрес</h3>
<div id="addr-status" style="text-align:center; font-size:12px; margin-bottom:12px; min-height:18px;"></div>
<div class="settings-section">
<h4>📍 Адрес локального модема</h4>
<div class="settings-row">
<label>Адрес:</label>
<input type="number" id="addr-local-address" value="0" min="0" max="255">
</div>
<div style="font-size:11px; color:var(--text-muted); margin-top:4px; line-height: 1.5;">
0-254 — индивидуальный адрес<br>
255 — широковещательный (без ACK)
</div>
<div class="settings-row" style="margin-top:12px;">
<label>Сохранить:</label>
<input type="checkbox" id="addr-save-flash" style="width:16px; height:16px;">
<span style="font-size:11px; color:var(--text-secondary);">Во flash (энергонезависимо)</span>
</div>
</div>
<div style="display:flex; gap:8px; margin-top:16px;">
<button id="addr-btn-apply" class="btn-apply-topo" style="flex:1;">✓ Применить</button>
<button id="addr-btn-read" class="btn-get-gnss" style="flex:1;">📖 Читать</button>
</div>
<button onclick="UIAddressing.close()" class="btn-cancel-topo" style="width:100%; margin-top:12px;">✕ Закрыть</button>
</div>
<!-- Панель VLBL -->
<div id="vlbl-panel" class="modal-panel" style="border-color: var(--btn-export);">
<h3 style="color:var(--btn-export);">📡 VLBL (дальномерный режим)</h3>
<div style="font-size:11px; color:var(--text-secondary); margin-bottom:12px; line-height:1.5; padding:8px; background:var(--bg-tertiary); border-radius:4px;">
Определение координат маяков по дальностям с разных точек.
Требуется GNSS и движение вокруг маяков.
</div>
<div id="vlbl-status" style="text-align:center; font-size:12px; margin-bottom:12px; min-height:18px;"></div>
<button id="vlbl-btn-toggle" class="btn-get-gnss" style="width:100%; margin-bottom:16px;">▶ Включить VLBL</button>
<div class="settings-section">
<h4>⚙ Настройки</h4>
<div class="settings-row">
<label>Решение каждые:</label>
<input type="number" id="vlbl-auto-count" value="10" min="3" max="100" step="1">
<span style="font-size:11px; color:var(--text-secondary);">изм.</span>
</div>
<div class="settings-row">
<label>Мин. интервал:</label>
<input type="number" id="vlbl-min-interval" value="3000" min="500" max="60000" step="500">
<span style="font-size:11px; color:var(--text-secondary);">мс</span>
</div>
<div class="settings-row">
<label>Размер базы:</label>
<input type="number" id="vlbl-base-size" value="4" min="3" max="20" step="1">
</div>
<div class="settings-row">
<label>Макс. измерений:</label>
<input type="number" id="vlbl-max-meas" value="200" min="10" max="1000" step="10">
</div>
<div class="settings-row">
<label>Мин. дистанция:</label>
<input type="number" id="vlbl-min-dist" value="5" min="0" max="100" step="0.5">
<span style="font-size:11px; color:var(--text-secondary);">м</span>
</div>
</div>
<div class="settings-section">
<h4>📡 Устройства</h4>
<div id="vlbl-devices-list"></div>
</div>
<div style="display:flex; gap:8px; margin-top:12px;">
<button id="vlbl-btn-clear" class="btn-reset-topo" style="flex:1;">🗑 Очистить</button>
<button onclick="UIVLBL.close()" class="btn-cancel-topo" style="flex:1;">✕ Закрыть</button>
</div>
</div>
<!-- Панель устройств -->
<div id="devices-panel" class="modal-panel" style="border-color: var(--text-accent);">
<h3 style="color:var(--text-accent);">📡 Устройства</h3>
<div style="margin-bottom:12px;">
<input type="text" id="devices-search" placeholder="🔍 Поиск..." style="width:100%; padding:8px 12px; border:1px solid var(--border-primary); border-radius:4px; background:var(--bg-input); color:var(--text-primary); font-size:12px;">
</div>
<div style="display:flex; gap:8px; margin-bottom:12px; flex-wrap:wrap;">
<label style="font-size:11px; color:var(--text-secondary); display:flex; align-items:center; gap:4px;">
<input type="checkbox" id="devices-filter-usbl" class="devices-filter-checkbox" checked> USBL
</label>
<label style="font-size:11px; color:var(--text-secondary); display:flex; align-items:center; gap:4px;">
<input type="checkbox" id="devices-filter-nonusbl" class="devices-filter-checkbox" checked> Обычные
</label>
<label style="font-size:11px; color:var(--text-secondary); display:flex; align-items:center; gap:4px;">
<input type="checkbox" id="devices-filter-timeout" class="devices-filter-checkbox" checked> Таймаут
</label>
<label style="font-size:11px; color:var(--text-secondary); display:flex; align-items:center; gap:4px;">
<input type="checkbox" id="devices-filter-active" class="devices-filter-checkbox" checked> Активные
</label>
</div>
<div style="display:flex; gap:8px; margin-bottom:12px; align-items:center;">
<select id="devices-sort" style="flex:1; padding:6px; border:1px solid var(--border-primary); border-radius:4px; background:var(--bg-input); color:var(--text-primary); font-size:11px;">
<option value="address">По адресу</option>
<option value="range">По дальности</option>
<option value="azimuth">По азимуту</option>
<option value="age">По возрасту</option>
</select>
<button id="devices-sort-order" style="padding:6px 10px; border:1px solid var(--border-primary); border-radius:4px; background:var(--bg-input); color:var(--text-primary); cursor:pointer;">↑</button>
</div>
<div id="devices-stats" style="display:flex; gap:8px; margin-bottom:12px; font-size:11px; color:var(--text-secondary); flex-wrap:wrap;"></div>
<div id="devices-list" style="max-height:50vh; overflow-y:auto;"></div>
<div style="display:flex; gap:8px; margin-top:12px;">
<button id="devices-btn-refresh" class="btn-get-gnss" style="flex:1;">🔄 Обновить</button>
<button id="devices-btn-export" class="btn-get-gnss" style="flex:1;">💾 Экспорт</button>
<button id="devices-btn-clear" class="btn-reset-topo" style="flex:1;">🗑 Очистить</button>
</div>
<button onclick="UIDevices.close()" class="btn-cancel-topo" style="width:100%; margin-top:8px;">✕ Закрыть</button>
</div>
<!-- Панель экспорта -->
<div id="export-panel" class="modal-panel" style="border-color: var(--btn-export);">
<h3 style="color:var(--btn-export);">📤 Экспорт данных</h3>
<div id="export-status" style="text-align:center; font-size:12px; margin-bottom:12px; min-height:18px;"></div>
<div id="export-stats" style="font-size:12px; margin-bottom:12px;"></div>
<div class="settings-section">
<h4>⚙ Формат</h4>
<div class="settings-row">
<label>Формат:</label>
<select id="export-format">
<option value="csv">📊 CSV</option>
<option value="kml">🗺 KML</option>
<option value="json">💾 JSON</option>
<option value="gga">📡 NMEA GGA</option>
<option value="dxf">📐 DXF (CAD)</option>
</select>
</div>
<div id="export-csv-options">
<div class="settings-row">
<label>Разделитель:</label>
<select id="export-delimiter">
<option value="semicolon">; (точка с запятой)</option>
<option value="comma">, (запятая)</option>
<option value="tab">Tab</option>
</select>
</div>
<div class="settings-row">
<label>Десятичный:</label>
<select id="export-decimal">
<option value=".">. (точка)</option>
<option value=",">, (запятая)</option>
</select>
</div>
</div>
<div id="export-kml-options" style="display:none;">
<div class="settings-row">
<small style="color:var(--text-secondary);">KML включает точки устройств и треки</small>
</div>
</div>
</div>
<div class="settings-section">
<h4>📊 Данные</h4>
<div style="display:flex; flex-wrap:wrap; gap:8px;">
<label style="font-size:11px; color:var(--text-secondary); display:flex; align-items:center; gap:4px;">
<input type="checkbox" class="export-option-checkbox" data-option="includeDepth" checked> Глубина
</label>
<label style="font-size:11px; color:var(--text-secondary); display:flex; align-items:center; gap:4px;">
<input type="checkbox" class="export-option-checkbox" data-option="includeAzimuth" checked> Азимут
</label>
<label style="font-size:11px; color:var(--text-secondary); display:flex; align-items:center; gap:4px;">
<input type="checkbox" class="export-option-checkbox" data-option="includeMSR" checked> MSR
</label>
<label style="font-size:11px; color:var(--text-secondary); display:flex; align-items:center; gap:4px;">
<input type="checkbox" class="export-option-checkbox" data-option="includeTemperature" checked> Температура
</label>
<label style="font-size:11px; color:var(--text-secondary); display:flex; align-items:center; gap:4px;">
<input type="checkbox" class="export-option-checkbox" data-option="includeVoltage" checked> Напряжение
</label>
<label style="font-size:11px; color:var(--text-secondary); display:flex; align-items:center; gap:4px;">
<input type="checkbox" class="export-option-checkbox" data-option="includeCoordinates" checked> Координаты
</label>
<label style="font-size:11px; color:var(--text-secondary); display:flex; align-items:center; gap:4px;">
<input type="checkbox" class="export-option-checkbox" data-option="includeTimestamps" checked> Время
</label>
</div>
</div>
<div class="settings-section">
<h4>👁 Превью</h4>
<pre id="export-preview" style="display:none; padding:8px; background:var(--bg-tertiary); border-radius:4px; font-size:10px; font-family:'Consolas','Monaco',monospace; max-height:200px; overflow-y:auto; white-space:pre-wrap;"></pre>
</div>
<div style="display:flex; gap:8px; margin-top:12px;">
<button id="export-btn-preview" class="btn-get-gnss" style="flex:1;">👁 Превью</button>
<button id="export-btn-copy" class="btn-get-gnss" style="flex:1;">📋 Копировать</button>
<button id="export-btn-export" class="btn-apply-topo" style="flex:1;">💾 Экспорт</button>
</div>
<button onclick="UIExport.close()" class="btn-cancel-topo" style="width:100%; margin-top:8px;">✕ Закрыть</button>
</div>
<!-- ===== ПАНЕЛЬ УСТРОЙСТВ ===== -->
<div id="devices-bar" class="empty"></div>
<!-- ===== FOOTER ===== -->
<footer class="footer">
<div class="footer-content">
<div class="footer-links">
<a href="https://github.com/ucnl/uWaveSuite/" target="_blank" class="footer-link">⭐ GitHub</a>
<a href="docs/guide.html" target="_blank" class="footer-link">📖 uWaveSuite Docs</a>
<a href="https://docs.unavlab.com/underwater_acoustic_modems_ru.html#uwave" target="_blank" class="footer-link">📖 uWave Docs</a>
</div>
<div class="footer-info">
<span class="footer-copy">© 2026 UC&NL</span>
<span class="footer-desc">Pure Open Source</span>
<a href="CHANGELOG.html" target="_blank" class="footer-link" title="История изменений">v<span id="app-version">--</span></a>
</div>
</div>
</footer>
<!-- ===== МОДАЛЬНОЕ ОКНО НАСТРОЕК ===== -->
<div id="settings-overlay">
<div id="settings-modal">
<div id="settings-header">
<h3>⚙ Настройки</h3>
<button onclick="UWApp.closeSettings()" title="Закрыть">✕</button>
</div>
<div id="settings-body">
<div class="settings-section">
<h4>📡 Устройство</h4>
<div class="settings-row">
<label>TX канал:</label>
<input type="number" id="cfg-tx-ch" value="0" min="0">
</div>
<div class="settings-row">
<label>RX канал:</label>
<input type="number" id="cfg-rx-ch" value="0" min="0">
</div>
<div class="settings-row">
<label>Солёность:</label>
<input type="number" id="cfg-salinity" value="0" min="0" max="40" step="0.1">
</div>
<div class="settings-row">
<label>g (м/с²):</label>
<input type="number" id="cfg-gravity" value="9.8" min="9.7" max="9.9" step="0.001">
</div>
<div class="settings-row">
<label>Скорость звука:</label>
<input type="number" id="cfg-soundspeed" placeholder="Авто" min="1300" max="1800" step="0.1">
</div>
<div class="settings-row">
<label>Командный режим:</label>
<input type="checkbox" id="cfg-cmd-mode-default" style="width:16px; height:16px;">
<span style="font-size:11px; color:var(--text-secondary);">По умолчанию</span>
</div>
</div>
<div class="settings-section">
<h4>📡 GNSS-компас</h4>
<div class="settings-row">
<label>Режим компаса:</label>
<select id="cfg-compass-mode">
<option value="auto">Авто</option>
<option value="hdt">Только HDT</option>
<option value="magnetic">Только магнитный</option>
</select>
</div>
<div class="settings-row">
<label>Скорость:</label>
<select id="cfg-gnss-baud">
<option value="4800">4800</option>
<option value="9600">9600</option>
<option value="19200">19200</option>
<option value="38400" selected>38400</option>
<option value="57600">57600</option>
<option value="115200">115200</option>
</select>
</div>
</div>
<div class="settings-section">
<h4>📍 Антенна</h4>
<div class="settings-row">
<label>Режим:</label>
<select id="cfg-antenna-mode">
<option value="cartesian_fixed">📐 Декартов</option>
<option value="geographic">🌍 Географический</option>
</select>
</div>
<div class="settings-row">
<label>Смещение X:</label>
<input type="number" id="cfg-offsetx" value="0" step="0.1">
</div>
<div class="settings-row">
<label>Смещение Y:</label>
<input type="number" id="cfg-offsety" value="0" step="0.1">
</div>
<div class="settings-row">
<label>φ антенны:</label>
<input type="number" id="cfg-phi" value="0" min="0" max="360" step="0.1">
</div>
<div class="settings-row">
<label>Макс. скорость:</label>
<input type="number" id="cfg-max-speed" value="2" min="0.5" max="5" step="0.1">
</div>
</div>
<div class="settings-section">
<h4>📐 Треки</h4>
<div class="settings-row">
<label>Макс. точек:</label>
<input type="number" id="cfg-maxpoints" value="500" min="50" max="10000">
</div>
<div class="settings-row">
<label>Мин. дистанция:</label>
<input type="number" id="cfg-minpointdist" value="0.5" min="0.1" max="50" step="0.1">
</div>
</div>
</div>
<div id="settings-footer">
<button class="btn-apply" onclick="UWApp.applySettings()">✓ Применить</button>
<button class="btn-close-settings" onclick="UWApp.closeSettings()">Закрыть</button>
</div>
</div>
</div>
<!-- ===== СКРИПТЫ (порядок важен) ===== -->
<!-- Математика -->
<script src="geo-utils.js"></script>
<script src="vincenty.js"></script>
<script src="haversine.js"></script>
<script src="dh-filter.js"></script>
<script src="median.js"></script>
<script src="smoother.js"></script>
<script src="dh-filter-xyz.js"></script>
<script src="smoother-xyz.js"></script>
<script src="sound-speed.js"></script>
<!-- Парсеры -->
<script src="gnss-parser.js"></script>
<script src="webview-stub.js"></script>
<!-- Ядро протокола -->
<script src="uw-protocol.js"></script>
<script src="serial-manager.js"></script>
<script src="uw-port.js"></script>
<script src="uw-queue-manager.js"></script>
<script src="uw-device-manager.js"></script>
<script src="uw-tracking-engine.js"></script>
<script src="uw-vlbl-measurements.js"></script>
<script src="uw-vlbl-store.js"></script>
<script src="uw-usbl-solver.js"></script>
<script src="uw-vlbl-solver.js"></script>
<script src="settings-storage.js"></script>
<!-- Данные -->
<script src="tracks.js"></script>
<script src="poi-manager.js"></script>
<script src="log-storage.js"></script>
<script src="logger.js"></script>
<script src="log-analyzer.js"></script>
<script src="export.js"></script>
<!-- UI модули -->
<script src="modules/ui-themes.js"></script>
<script src="modules/ui-settings.js"></script>
<script src="modules/ui-chat.js"></script>
<script src="modules/ui-tracking.js"></script>
<script src="modules/ui-addressing.js"></script>
<script src="modules/ui-vlbl.js"></script>
<script src="modules/ui-devices.js"></script>
<script src="modules/ui-console.js"></script>
<script src="modules/ui-export.js"></script>
<script src="modules/ui-map.js"></script>
<script src="modules/ui-ruler.js"></script>
<script src="modules/ui-topo.js"></script>
<!-- Главный модуль -->
<script src="app.js"></script>
<script>
if ('serviceWorker' in navigator && location.protocol.startsWith('http')) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('sw.js')
.then((reg) => console.log('[SW] Зарегистрирован:', reg.scope))
.catch((err) => console.warn('[SW] Ошибка:', err));
});
}
</script>
</body>
</html>