Fix jwt-token
This commit is contained in:
@@ -65,12 +65,19 @@ class AlertService {
|
||||
|
||||
// Adjust threat level based on drone type and category
|
||||
if (droneTypeInfo.category.includes('Military') && droneTypeInfo.name !== 'Unknown') {
|
||||
// Military drones are always critical threat regardless of distance
|
||||
// Military drones are escalated based on 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})`);
|
||||
// For very distant military drones (RSSI < -80), escalate to critical
|
||||
if (rssi < -80) {
|
||||
threatLevel = 'critical';
|
||||
description = `CRITICAL THREAT: ${droneTypeInfo.name.toUpperCase()} MILITARY DRONE - IMMEDIATE RESPONSE REQUIRED`;
|
||||
actionRequired = true;
|
||||
console.log(`🚨 DISTANT MILITARY DRONE DETECTED: ${droneTypeInfo.name} - Escalated to CRITICAL (RSSI: ${rssi})`);
|
||||
} else {
|
||||
// For closer military drones, keep distance-based assessment but enhance description
|
||||
description = description.replace('IMMEDIATE THREAT:', `CRITICAL THREAT: ${droneTypeInfo.name.toUpperCase()} MILITARY DRONE -`);
|
||||
console.log(`🚨 MILITARY DRONE DETECTED: ${droneTypeInfo.name} - Distance-based assessment (RSSI: ${rssi})`);
|
||||
}
|
||||
} else {
|
||||
// Other military drones get escalated one level from distance-based
|
||||
if (distanceBasedThreat === 'monitoring') threatLevel = 'low';
|
||||
|
||||
Reference in New Issue
Block a user