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