Fix jwt-token
This commit is contained in:
@@ -61,19 +61,19 @@ class AlertService {
|
||||
const droneTypeInfo = getDroneTypeInfo(droneType);
|
||||
|
||||
// Adjust threat level based on drone type and category
|
||||
if (droneTypeInfo.threat_level === 'critical' || droneTypeInfo.category.includes('Military')) {
|
||||
// Military/Combat drones - ALWAYS CRITICAL regardless of distance
|
||||
if (droneType === 2) { // Orlan - always critical regardless of distance
|
||||
threatLevel = 'critical';
|
||||
description = `CRITICAL THREAT: ${droneTypeInfo.name.toUpperCase()} DETECTED - IMMEDIATE RESPONSE REQUIRED`;
|
||||
actionRequired = true;
|
||||
console.log(`🚨 MILITARY DRONE DETECTED: ${droneTypeInfo.name} - Force escalating to CRITICAL threat level (RSSI: ${rssi})`);
|
||||
console.log(`🚨 ORLAN DRONE DETECTED: ${droneTypeInfo.name} - Force escalating to CRITICAL threat level (RSSI: ${rssi})`);
|
||||
} else if (droneTypeInfo.threat_level === 'high' || droneTypeInfo.category.includes('Professional')) {
|
||||
// Professional/Commercial drone - escalate threat one level
|
||||
if (threatLevel === 'low') threatLevel = 'medium';
|
||||
if (threatLevel === 'medium') threatLevel = 'high';
|
||||
if (threatLevel === 'high') threatLevel = 'critical';
|
||||
description += ` - ${droneTypeInfo.name.toUpperCase()} DETECTED`;
|
||||
actionRequired = true;
|
||||
// Professional/Commercial drone - escalate threat one level only if close enough
|
||||
if (rssi >= -70) { // Only escalate if medium distance or closer
|
||||
if (threatLevel === 'low') threatLevel = 'medium';
|
||||
if (threatLevel === 'medium') threatLevel = 'high';
|
||||
description += ` - ${droneTypeInfo.name.toUpperCase()} DETECTED`;
|
||||
actionRequired = true;
|
||||
}
|
||||
} else if (droneTypeInfo.category.includes('Racing')) {
|
||||
// Racing/Fast drone - escalate if close
|
||||
if (rssi >= -55 && threatLevel !== 'critical') {
|
||||
|
||||
Reference in New Issue
Block a user