Доработка.

This commit is contained in:
sasha80
2024-01-16 11:11:21 +03:00
parent a774151147
commit cdca75b8a7
4 changed files with 144 additions and 126 deletions

View File

@@ -1,11 +1,9 @@
[gd_scene load_steps=8 format=3 uid="uid://dnuexoef2nnv5"]
[gd_scene load_steps=6 format=3 uid="uid://dnuexoef2nnv5"]
[ext_resource type="PackedScene" uid="uid://d3iqb5e4g81m5" path="res://scenes/контроль/element_h.tscn" id="2_lpj3d"]
[ext_resource type="PackedScene" uid="uid://p2suppildvq0" path="res://scenes/контроль/element_v.tscn" id="3_2shxq"]
[ext_resource type="Texture2D" uid="uid://c4mdrmk7h638f" path="res://data/nine-patch-round.png" id="4_i1no5"]
[ext_resource type="Texture2D" uid="uid://dnreyfh3cd1k2" path="res://data/состояние-исправности-1.png" id="5_n0aaa"]
[ext_resource type="Texture2D" uid="uid://c6nve6f8sfyj2" path="res://data/состояние-исправности-0.png" id="6_sj3be"]
[ext_resource type="Texture2D" uid="uid://c6booa8753u5t" path="res://data/состояние-исправности-2.png" id="7_rhdhp"]
[ext_resource type="PackedScene" uid="uid://dyjtmfm4u58mu" path="res://scenes/контроль/indicator_h.tscn" id="8_q1orh"]
[node name="pribor_prd_n_1" type="Control"]
@@ -779,67 +777,10 @@ offset_bottom = 233.0
scale = Vector2(0.1, 0.1)
texture = ExtResource("5_n0aaa")
[node name="txr_legend0" type="TextureRect" parent="."]
layout_mode = 0
offset_left = 223.0
offset_top = 925.0
offset_right = 447.0
offset_bottom = 1149.0
scale = Vector2(0.1, 0.1)
texture = ExtResource("6_sj3be")
[node name="lbl_legend0" type="Label" parent="."]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 0
offset_left = 251.0
offset_top = 925.0
offset_right = 407.0
offset_bottom = 945.0
theme_override_font_sizes/font_size = 17
text = "Ожидание результата"
[node name="lbl_legend1" type="Label" parent="."]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 0
offset_left = 56.0
offset_top = 925.0
offset_right = 129.0
offset_bottom = 945.0
theme_override_font_sizes/font_size = 17
text = "Исправно"
[node name="txr_legend1" type="TextureRect" parent="."]
layout_mode = 0
offset_left = 32.0
offset_top = 925.0
offset_right = 256.0
offset_bottom = 1149.0
scale = Vector2(0.1, 0.1)
texture = ExtResource("5_n0aaa")
[node name="txr_legend2" type="TextureRect" parent="."]
layout_mode = 0
offset_left = 480.0
offset_top = 925.0
offset_right = 704.0
offset_bottom = 1149.0
scale = Vector2(0.1, 0.1)
texture = ExtResource("7_rhdhp")
[node name="lbl_legend2" type="Label" parent="."]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 0
offset_left = 508.0
offset_top = 925.0
offset_right = 664.0
offset_bottom = 945.0
theme_override_font_sizes/font_size = 17
text = "Сбой"
[node name="lbl_header" type="Label" parent="."]
layout_mode = 0
offset_top = 195.0
offset_right = 860.0
offset_right = 875.0
offset_bottom = 221.0
theme_override_font_sizes/font_size = 22
text = "Контроль исправности прибора ПРД-Н1"
@@ -849,9 +790,8 @@ vertical_alignment = 1
[node name="lbl_dev_warning" type="Label" parent="."]
self_modulate = Color(0.835294, 0.141176, 0.286275, 1)
layout_mode = 0
offset_left = 145.0
offset_top = 910.0
offset_right = 520.0
offset_right = 875.0
offset_bottom = 929.0
text = "** Позиционные обозначения требуют уточнения **"
horizontal_alignment = 1

View File

@@ -18,89 +18,79 @@ patch_margin_top = 16
patch_margin_right = 16
patch_margin_bottom = 16
[node name="ref_A1" parent="ref_G1" instance=ExtResource("2_bp8jp")]
offset_left = 77.0
offset_top = 345.0
offset_right = 234.0
offset_bottom = 800.0
[node name="ref_A1" parent="." instance=ExtResource("2_bp8jp")]
offset_left = 175.0
offset_top = 529.0
offset_right = 332.0
offset_bottom = 984.0
self_size = Vector2i(157, 455)
fname = "МАА150-1С27"
rname = "A1"
state = 1
[node name="ref_A2" parent="ref_G1" instance=ExtResource("2_bp8jp")]
offset_left = 398.0
offset_top = 347.0
offset_right = 533.0
offset_bottom = 804.0
[node name="ref_A2" parent="." instance=ExtResource("2_bp8jp")]
offset_left = 496.0
offset_top = 531.0
offset_right = 631.0
offset_bottom = 988.0
self_size = Vector2i(135, 457)
fname = "МАА150-1С27"
rname = "A2"
state = 1
[node name="ref_A3" parent="ref_G1" instance=ExtResource("2_bp8jp")]
offset_left = 279.0
offset_top = 347.0
offset_right = 370.0
offset_bottom = 801.0
[node name="ref_A3" parent="." instance=ExtResource("2_bp8jp")]
offset_left = 377.0
offset_top = 531.0
offset_right = 468.0
offset_bottom = 985.0
self_size = Vector2i(91, 454)
fname = "МАА150-1С27"
rname = "A2"
state = 1
[node name="lbl_legend1" type="Label" parent="ref_G1"]
[node name="lbl_legend1" type="Label" parent="."]
self_modulate = Color(1, 1, 1, 0.627451)
offset_left = 32.0
offset_top = 880.0
offset_right = 105.0
offset_bottom = 900.0
offset_left = 130.0
offset_top = 1064.0
offset_right = 203.0
offset_bottom = 1084.0
theme_override_font_sizes/font_size = 17
text = "Исправно"
[node name="txr_legend0" type="TextureRect" parent="ref_G1"]
offset_left = 204.0
offset_top = 880.0
offset_right = 428.0
offset_bottom = 1104.0
[node name="txr_legend0" type="TextureRect" parent="."]
offset_left = 302.0
offset_top = 1064.0
offset_right = 526.0
offset_bottom = 1288.0
scale = Vector2(0.1, 0.1)
texture = ExtResource("3_vvbft")
[node name="lbl_legend0" type="Label" parent="ref_G1"]
[node name="lbl_legend0" type="Label" parent="."]
self_modulate = Color(1, 1, 1, 0.627451)
offset_left = 232.0
offset_top = 880.0
offset_right = 388.0
offset_bottom = 900.0
offset_left = 330.0
offset_top = 1064.0
offset_right = 486.0
offset_bottom = 1084.0
theme_override_font_sizes/font_size = 17
text = "Ожидание результата"
[node name="txr_legend2" type="TextureRect" parent="ref_G1"]
offset_left = 461.0
offset_top = 880.0
offset_right = 685.0
offset_bottom = 1104.0
[node name="txr_legend2" type="TextureRect" parent="."]
offset_left = 559.0
offset_top = 1064.0
offset_right = 783.0
offset_bottom = 1288.0
scale = Vector2(0.1, 0.1)
texture = ExtResource("4_ly6ja")
[node name="lbl_legend2" type="Label" parent="ref_G1"]
[node name="lbl_legend2" type="Label" parent="."]
self_modulate = Color(1, 1, 1, 0.627451)
offset_left = 489.0
offset_top = 880.0
offset_right = 645.0
offset_bottom = 900.0
offset_left = 587.0
offset_top = 1064.0
offset_right = 743.0
offset_bottom = 1084.0
theme_override_font_sizes/font_size = 17
text = "Сбой"
[node name="Label" type="Label" parent="ref_G1"]
self_modulate = Color(0.835294, 0.141176, 0.286275, 1)
offset_left = 146.0
offset_top = 855.0
offset_right = 521.0
offset_bottom = 874.0
text = "** Позиционные обозначения требуют уточнения **"
horizontal_alignment = 1
vertical_alignment = 1
[node name="lbl_header" type="Label" parent="."]
offset_left = 10.0
offset_top = 156.0
@@ -110,3 +100,13 @@ theme_override_font_sizes/font_size = 22
text = "Контроль исправности прибора Щ3"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Label" type="Label" parent="."]
self_modulate = Color(0.835294, 0.141176, 0.286275, 1)
offset_left = 244.0
offset_top = 1039.0
offset_right = 619.0
offset_bottom = 1058.0
text = "** Позиционные обозначения требуют уточнения **"
horizontal_alignment = 1
vertical_alignment = 1

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=7 format=3 uid="uid://lwmw4egynmd1"]
[gd_scene load_steps=10 format=3 uid="uid://lwmw4egynmd1"]
[ext_resource type="Script" path="res://scenes/контроль/контроль.gd" id="1_x5d6w"]
[ext_resource type="Texture2D" uid="uid://bar8k5qef7kch" path="res://data/УФ.png" id="2_0nvm1"]
@@ -6,6 +6,9 @@
[ext_resource type="Texture2D" uid="uid://b4isaggma6q3" path="res://data/Грани22.png" id="4_l0nc7"]
[ext_resource type="Texture2D" uid="uid://d2jxmtd6n5jd1" path="res://data/Щ3.png" id="5_kvnex"]
[ext_resource type="Texture2D" uid="uid://bos68thpqqvn" path="res://data/ПРД.png" id="6_i1yfn"]
[ext_resource type="Texture2D" uid="uid://c6nve6f8sfyj2" path="res://data/состояние-исправности-0.png" id="7_6j01w"]
[ext_resource type="Texture2D" uid="uid://dnreyfh3cd1k2" path="res://data/состояние-исправности-1.png" id="8_isjua"]
[ext_resource type="Texture2D" uid="uid://c6booa8753u5t" path="res://data/состояние-исправности-2.png" id="9_ll0vs"]
[node name="Контроль" type="Panel"]
anchors_preset = 15
@@ -235,3 +238,60 @@ stretch_mode = 4
[node name="pribor_sch" type="Panel" parent="."]
layout_mode = 0
[node name="txr_legend0" type="TextureRect" parent="."]
layout_mode = 0
offset_left = 1199.0
offset_top = 961.0
offset_right = 1423.0
offset_bottom = 1185.0
scale = Vector2(0.1, 0.1)
texture = ExtResource("7_6j01w")
[node name="lbl_legend0" type="Label" parent="."]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 0
offset_left = 1227.0
offset_top = 961.0
offset_right = 1383.0
offset_bottom = 981.0
theme_override_font_sizes/font_size = 17
text = "Ожидание результата"
[node name="lbl_legend1" type="Label" parent="."]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 0
offset_left = 1032.0
offset_top = 961.0
offset_right = 1105.0
offset_bottom = 981.0
theme_override_font_sizes/font_size = 17
text = "Исправно"
[node name="txr_legend1" type="TextureRect" parent="."]
layout_mode = 0
offset_left = 1008.0
offset_top = 961.0
offset_right = 1232.0
offset_bottom = 1185.0
scale = Vector2(0.1, 0.1)
texture = ExtResource("8_isjua")
[node name="txr_legend2" type="TextureRect" parent="."]
layout_mode = 0
offset_left = 1456.0
offset_top = 961.0
offset_right = 1680.0
offset_bottom = 1185.0
scale = Vector2(0.1, 0.1)
texture = ExtResource("9_ll0vs")
[node name="lbl_legend2" type="Label" parent="."]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 0
offset_left = 1484.0
offset_top = 961.0
offset_right = 1640.0
offset_bottom = 981.0
theme_override_font_sizes/font_size = 17
text = "Сбой"

View File

@@ -1,10 +1,11 @@
extends Node
## Веб-утилиты для работы с меркаторскими XYZ-плитками.
## Веб-утилиты для работы с меркаторовскими XYZ-плитками.
const R2D: = 180.0 / PI
const RE: = 6378137.0 ## Радиус Земли в метрах
const CE: = 2.0 * PI * RE ## Длина окружности Земли в метрах
const RE: = 6378137.0 ## Радиус Земли экваториальный в метрах
const RP: = 6356752.31424518 ## Радиус Земли полярный в метрах
const CE: = 2.0 * PI * RE ## Длина окружности Земли в метрах по экватору
const EPSILON: = 1e-14
const LL_EPSILON: = 1e-11
const MAX_ZOOM: = 20
@@ -115,6 +116,24 @@ func rshift(val: int, n: int) -> int: return (val % 0x100000000) >> n
func asinh(val: float): return log(val + sqrt(val * val + 1.0))
# To convert lon/lat/alt (lon in degrees East, lat in degrees North, alt in
# meters) to earth centered fixed coordinates (x, y, z)
func lnglat_to_ecef(lng: float, lat: float, alt: float = 0.0):
alt += RE
var latrad: float = radians(lat)
var lonrad: float = radians(lng)
var coslat: float = cos(latrad)
var sinlat: float = sin(latrad)
var coslon: float = cos(lonrad)
var sinlon: float = sin(lonrad)
var term1: float = (RE * coslat) / tools.hypot(RE * coslat, RP * sinlat)
var term2: float = alt * coslat + term1;
var x: float = coslon * term2
var y: float = sinlon * term2
var z: float = alt * sinlat + (RP * sinlat) / tools.hypot(RE * coslat, RP * sinlat)
return [x, y, z]
func find_up_left(tiles: Array):
var x = 0
var y = 0
@@ -128,20 +147,19 @@ func find_up_left(tiles: Array):
## Lon./lat. to tile numbers
func deg2num(lat: float, lon: float, zoom: int):
lat = radians(lat)
func deg2num(lng: float, lat: float, zoom: int):
var n: = float(1 << zoom)
var xtile: = int((lon + 180.0) / 360.0 * n)
var ytile: = int((1.0 - asinh(tan(lat)) / PI) / 2.0 * n)
var xtile: = int((lng + 180.0) / 360.0 * n)
var ytile: = int((1.0 - asinh(tan(radians(lat))) / PI) / 2.0 * n)
return [xtile, ytile]
## Tile numbers to lon./lat.
func num2deg(xtile: int, ytile: int, zoom: int):
func num2deg(x: int, y: int, zoom: int):
var n: = float(1 << zoom)
var lon: = float(xtile) / n * 360.0 - 180.0
var lat: = atan(sinh(PI * (1.0 - 2.0 * float(ytile) / n)))
return [degrees(lat), lon]
var lng: = float(x) / n * 360.0 - 180.0
var lat: = atan(sinh(PI * (1.0 - 2.0 * float(y) / n)))
return [lng, degrees(lat)]
## Расстояние по горизонтали в метрах, представленное одним пикселем
@@ -253,7 +271,7 @@ func ul2(tile: Tile) -> Array[float]:
var lon_deg = tile.x / z2 * 360.0 - 180.0
var lat_rad = atan(sinh(PI * (1 - 2 * tile.y / z2)))
var lat_deg = degrees(lat_rad)
return [lat_deg, lon_deg]
return [lon_deg, lat_deg]
## Возвращает граничную область плитки.[br]