-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsensor-DS.cpp
More file actions
26 lines (23 loc) · 938 Bytes
/
sensor-DS.cpp
File metadata and controls
26 lines (23 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <array>
#include <cmath>
#include <cstdint>
// Raw data coming off the UV/IR sensor hardware
struct SensorReading {
uint64_t timestamp_us; // microsecond timestamp
double ir_intensity; // infrared signature (watts/sr)
double uv_intensity; // ultraviolet signature (rocket plume)
double azimuth_deg; // where the signal came from
double elevation_deg;
double delta_intensity; // how fast it's growing
bool sensor_valid; // hardware health flag
};
// What we conclude after processing
struct ThreatAssessment {
enum class Confidence { NONE, LOW, MEDIUM, HIGH, CERTAIN };
bool threat_detected;
Confidence confidence;
double azimuth_deg; // direction of incoming missile
double elevation_deg;
double time_to_impact_s; // estimated seconds until impact
int threat_id; // track number
};