better military icao detection, airlines and stock image indicator
This commit is contained in:
@@ -200,7 +200,7 @@ const navball = computed(() => {
|
||||
z-index: 100;
|
||||
pointer-events: auto;
|
||||
background: rgba(0,0,0,0.88);
|
||||
border: 1px solid rgba(200,200,220,0.3);
|
||||
border: 1px solid rgba(0, 255, 0, 0.3);
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 24px rgba(0,0,0,0.5);
|
||||
overflow: hidden;
|
||||
@@ -213,7 +213,7 @@ const navball = computed(() => {
|
||||
.ap-header {
|
||||
position: relative;
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid rgba(200,200,220,0.2);
|
||||
border-bottom: 1px solid rgba(0, 255, 0, 0.2);
|
||||
cursor: move;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
|
||||
@@ -390,7 +390,7 @@ function restoreOverlayState() {
|
||||
if (activeOverlays.value.has('rain')) refreshRain();
|
||||
}
|
||||
|
||||
function getAutoLayer(category: AutoCategory) {
|
||||
function getAutoLayer(category: AutoCategory): any {
|
||||
if (category === 'aircraft') return airTraffic;
|
||||
if (category === 'marine') return aisLayer;
|
||||
return sats;
|
||||
@@ -402,7 +402,7 @@ function getAutoId(category: AutoCategory, target: any): string {
|
||||
return String(target.satellite);
|
||||
}
|
||||
|
||||
function getAutoTarget(category: AutoCategory, id: string) {
|
||||
function getAutoTarget(category: AutoCategory, id: any) {
|
||||
if (category === 'aircraft') return airTraffic.getById(id);
|
||||
if (category === 'marine') return aisLayer.getById(id);
|
||||
return sats.getById(id);
|
||||
@@ -444,9 +444,7 @@ function focusAutoTarget(category: AutoCategory, target: any, animate = true) {
|
||||
function closeAutoPopup() {
|
||||
if (!autoCategory.value || !autoTarget.value) return;
|
||||
|
||||
getAutoLayer(autoCategory.value).closeAutoPopup(
|
||||
getAutoId(autoCategory.value, autoTarget.value),
|
||||
);
|
||||
getAutoLayer(autoCategory.value).closeAutoPopup(getAutoId(autoCategory.value, autoTarget.value));
|
||||
}
|
||||
|
||||
function clearAutoTarget() {
|
||||
@@ -520,15 +518,11 @@ function getAutoDistance(object: AutoObject): number {
|
||||
}
|
||||
|
||||
function getNewest(objects: AutoObject[]): AutoObject | null {
|
||||
return objects
|
||||
.slice()
|
||||
.sort((a, b) => b.discoveredAt - a.discoveredAt)[0] ?? null;
|
||||
return objects.slice().sort((a, b) => b.discoveredAt - a.discoveredAt)[0] ?? null;
|
||||
}
|
||||
|
||||
function getClosest(objects: AutoObject[]): AutoObject | null {
|
||||
return objects
|
||||
.slice()
|
||||
.sort((a, b) => getAutoDistance(a) - getAutoDistance(b))[0] ?? null;
|
||||
return objects.slice().sort((a, b) => getAutoDistance(a) - getAutoDistance(b))[0] ?? null;
|
||||
}
|
||||
|
||||
function setAutoTarget(object: AutoObject) {
|
||||
@@ -548,10 +542,8 @@ function setAutoTarget(object: AutoObject) {
|
||||
function shouldNewTargetSteal(currentObject: AutoObject, newObject: AutoObject): boolean {
|
||||
const currentDistance = getAutoDistance(currentObject);
|
||||
const newDistance = getAutoDistance(newObject);
|
||||
|
||||
if (!isFinite(currentDistance)) return true;
|
||||
if (!isFinite(newDistance)) return false;
|
||||
|
||||
return newDistance <= currentDistance * AUTO_DISTANCE_MARGIN;
|
||||
}
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ const compass = computed(() => {
|
||||
z-index: 100;
|
||||
pointer-events: auto;
|
||||
background: rgba(0,0,0,0.88);
|
||||
border: 1px solid rgba(200,200,220,0.3);
|
||||
border: 1px solid rgba(0,255,255,0.3);
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 24px rgba(0,0,0,0.5);
|
||||
overflow: hidden;
|
||||
@@ -217,7 +217,7 @@ const compass = computed(() => {
|
||||
.sp-header {
|
||||
position: relative;
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid rgba(200,200,220,0.2);
|
||||
border-bottom: 1px solid rgba(0,255,255,0.2);
|
||||
cursor: move;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
|
||||
@@ -424,7 +424,7 @@ onUnmounted(() => {
|
||||
<div class="tp-meta">
|
||||
<div class="flex-c flex-fill">
|
||||
<span>Type: {{ latest?.type || 'Unknown' }}</span>
|
||||
<span>Freq: {{ latest?.frequency?.toFixed(3) || '—' }} MHz</span>
|
||||
<span>Freq: {{ latest?.frequency?.toFixed(2) || '—' }} MHz</span>
|
||||
</div>
|
||||
|
||||
<div class="flex-c flex-fill align-x-end">
|
||||
@@ -486,7 +486,7 @@ onUnmounted(() => {
|
||||
<div class="tp-environment">
|
||||
<div class="tp-environment-label">Environment</div>
|
||||
|
||||
<div class="tp-environment-cards gap-4">
|
||||
<div class="tp-environment-cards gap-1">
|
||||
<div class="tp-environment-card">
|
||||
<span class="tp-environment-icon">🌡️</span>
|
||||
<div class="tp-environment-info">
|
||||
@@ -507,6 +507,16 @@ onUnmounted(() => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tp-environment-card">
|
||||
<span class="tp-environment-icon">⬇️</span>
|
||||
<div class="tp-environment-info">
|
||||
<span class="tp-environment-stat-label">Pressure</span>
|
||||
<span class="tp-environment-stat-value">
|
||||
{{ latest?.pressure > 0 ? latest.pressure : '—' }} hpa
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tp-environment-card">
|
||||
<span class="tp-environment-icon">🫧</span>
|
||||
<div class="tp-environment-info">
|
||||
@@ -525,7 +535,7 @@ onUnmounted(() => {
|
||||
:currentAltitude="currentAltitude"
|
||||
:unit="altitudeUnit.label"
|
||||
start-time=" "
|
||||
:end-time="formatDate('HH:MM A', latest.timestamp)"
|
||||
:end-time="formatDate('HH:mm:ss', latest.timestamp)"
|
||||
color="#ffaa00"
|
||||
/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user