Fix jwt-token
This commit is contained in:
@@ -21,11 +21,11 @@ DEVICES = []
|
||||
|
||||
# Realistic drone types with characteristics
|
||||
DRONE_TYPES = {
|
||||
1: {"name": "DJI Mavic", "max_speed": 65, "typical_rssi": -60, "freq": [2400, 2450]},
|
||||
2: {"name": "Racing Drone", "max_speed": 120, "typical_rssi": -55, "freq": [2400, 5800]},
|
||||
3: {"name": "DJI Phantom", "max_speed": 50, "typical_rssi": -65, "freq": [2400, 2450]},
|
||||
4: {"name": "Fixed Wing", "max_speed": 80, "typical_rssi": -70, "freq": [900, 2400]},
|
||||
5: {"name": "Surveillance", "max_speed": 40, "typical_rssi": -75, "freq": [2400, 5800]}
|
||||
0: {"name": "DJI Mavic (Consumer)", "max_speed": 65, "typical_rssi": -60, "freq": [2400, 2450]},
|
||||
1: {"name": "Orlan Military Drone", "max_speed": 150, "typical_rssi": -50, "freq": [900, 2400]}, # High threat
|
||||
2: {"name": "DJI Matrice (Professional)", "max_speed": 80, "typical_rssi": -55, "freq": [2400, 5800]},
|
||||
3: {"name": "Racing Drone", "max_speed": 120, "typical_rssi": -55, "freq": [2400, 5800]},
|
||||
4: {"name": "Unknown/Custom", "max_speed": 70, "typical_rssi": -65, "freq": [2400, 2450]}
|
||||
}
|
||||
|
||||
def fetch_devices():
|
||||
@@ -97,7 +97,21 @@ class DroneSimulator:
|
||||
def create_new_drone(self, device):
|
||||
"""Create a new drone with realistic starting position"""
|
||||
self.drone_counter += 1
|
||||
drone_type = random.choice(list(DRONE_TYPES.keys()))
|
||||
|
||||
# Drone type selection with weighted probabilities
|
||||
# Orlan drones are rare (2% chance), consumer drones common (50%), others distributed
|
||||
rand = random.random()
|
||||
if rand < 0.02: # 2% chance for Orlan (military)
|
||||
drone_type = 1
|
||||
print(f"🚨 GENERATING ORLAN MILITARY DRONE (ID: {self.drone_counter}) - High threat simulation!")
|
||||
elif rand < 0.52: # 50% chance for consumer
|
||||
drone_type = 0
|
||||
elif rand < 0.72: # 20% chance for professional
|
||||
drone_type = 2
|
||||
elif rand < 0.92: # 20% chance for racing
|
||||
drone_type = 3
|
||||
else: # 8% chance for unknown
|
||||
drone_type = 4
|
||||
|
||||
# Start at edge of coverage area
|
||||
angle = random.uniform(0, 2 * math.pi)
|
||||
|
||||
Reference in New Issue
Block a user