Fix jwt-token

This commit is contained in:
2025-09-15 13:50:59 +02:00
parent 4f0ce39c69
commit 44f2607773
2 changed files with 25 additions and 3 deletions

View File

@@ -61,11 +61,16 @@ class AlertService {
const droneTypeInfo = getDroneTypeInfo(droneType);
// Adjust threat level based on drone type and category
if (droneType === 2) { // Orlan - always critical regardless of distance
if (droneType === 2 && rssi >= -70) { // Orlan - escalate to critical only if within medium range or closer
threatLevel = 'critical';
description = `CRITICAL THREAT: ${droneTypeInfo.name.toUpperCase()} DETECTED - IMMEDIATE RESPONSE REQUIRED`;
actionRequired = true;
console.log(`🚨 ORLAN DRONE DETECTED: ${droneTypeInfo.name} - Force escalating to CRITICAL threat level (RSSI: ${rssi})`);
console.log(`🚨 ORLAN DRONE DETECTED: ${droneTypeInfo.name} - Escalating to CRITICAL threat level (RSSI: ${rssi})`);
} else if (droneType === 2) { // Orlan at long range - still high priority but not critical
if (threatLevel === 'low' || threatLevel === 'monitoring') threatLevel = 'medium';
if (threatLevel === 'medium') threatLevel = 'high';
description += ` - ${droneTypeInfo.name.toUpperCase()} DETECTED AT LONG RANGE`;
actionRequired = true;
} else if (droneTypeInfo.threat_level === 'high' || droneTypeInfo.category.includes('Professional')) {
// Professional/Commercial drone - escalate threat one level only if close enough
if (rssi >= -70) { // Only escalate if medium distance or closer