Fix jwt-token
This commit is contained in:
@@ -65,9 +65,14 @@ class AlertService {
|
||||
|
||||
// Adjust threat level based on drone type and category
|
||||
if (droneTypeInfo.category.includes('Military') && droneTypeInfo.name !== 'Unknown') {
|
||||
// Special handling for known military drones - only escalate if not at extreme distance
|
||||
if (rssi >= -85 && (droneTypeInfo.name === 'Orlan' || droneTypeInfo.name === 'Zala' || droneTypeInfo.name === 'Eleron')) {
|
||||
// Military drones within reasonable detection range get escalated
|
||||
// Military drones are always critical threat regardless of distance
|
||||
if (droneTypeInfo.name === 'Orlan' || droneTypeInfo.name === 'Zala' || droneTypeInfo.name === 'Eleron') {
|
||||
threatLevel = 'critical';
|
||||
description = `CRITICAL THREAT: ${droneTypeInfo.name.toUpperCase()} MILITARY DRONE - IMMEDIATE RESPONSE REQUIRED`;
|
||||
actionRequired = true;
|
||||
console.log(`🚨 MILITARY DRONE DETECTED: ${droneTypeInfo.name} - Escalated to CRITICAL (RSSI: ${rssi})`);
|
||||
} else {
|
||||
// Other military drones get escalated one level from distance-based
|
||||
if (distanceBasedThreat === 'monitoring') threatLevel = 'low';
|
||||
else if (distanceBasedThreat === 'low') threatLevel = 'medium';
|
||||
else if (distanceBasedThreat === 'medium') threatLevel = 'high';
|
||||
@@ -76,10 +81,6 @@ class AlertService {
|
||||
description = `MILITARY THREAT: ${droneTypeInfo.name.toUpperCase()} DETECTED - ENHANCED RESPONSE REQUIRED`;
|
||||
actionRequired = (threatLevel !== 'low' && threatLevel !== 'monitoring');
|
||||
console.log(`🚨 MILITARY DRONE DETECTED: ${droneTypeInfo.name} - Escalated to ${threatLevel} (RSSI: ${rssi})`);
|
||||
} else {
|
||||
// For very distant military drones (RSSI < -85), preserve distance-based assessment
|
||||
description += ` - ${droneTypeInfo.name.toUpperCase()} MILITARY DRONE DETECTED (DISTANT)`;
|
||||
console.log(`🚨 MILITARY DRONE DETECTED: ${droneTypeInfo.name} - Using distance-based threat level: ${threatLevel} (RSSI: ${rssi})`);
|
||||
}
|
||||
} else if (droneTypeInfo.threat_level === 'high' || droneTypeInfo.category.includes('Professional')) {
|
||||
// Professional/Commercial drone - escalate threat one level from distance-based
|
||||
|
||||
Reference in New Issue
Block a user