diff --git a/protobuf_definitions/message_formats.proto b/protobuf_definitions/message_formats.proto index 26a3fa45..21b0e28d 100644 --- a/protobuf_definitions/message_formats.proto +++ b/protobuf_definitions/message_formats.proto @@ -103,6 +103,33 @@ message Lights { // turns the laser on. message Laser { float value = 1; // Laser intensity, any value above 0 turns the laser on (0..1). + bool modulated = 2; // Modulate the laser at 5Hz for tracking. Only available on Ultra. +} + +// Point in 2D space. +message Point2D { + float x = 1; // X coordinate of the point (px). + float y = 2; // Y coordinate of the point (px). +} + +// Message representing the detection of scaling lasers in the main camera. +// +// The message contains the centroids of the detected dots, the distance between them in pixels, +// and the confidence of the detection. The dots are detected through temporal DFT analysis of +// 5 Hz laser modulation, isolating flickering pixels from the static scene background. +// +// Only available on Ultra. +message LaserDetection { + bool detected = 1; // True if the laser is detected by the drone. + Point2D dot1 = 2; // First dot centroid (leftmost). + Point2D dot2 = 3; // Second dot centroid (rightmost). + float pixel_distance = 4; // Distance between dots in pixels. + float confidence = 5; // Confidence of the detection (0..1). + uint32 image_width = 6; // Source frame width. + uint32 image_height = 7; // Source frame height. + float laser_width = 8; // Real world distance between the two laser dots (m). + float corrected_pixel_distance = 9; // Distance after lens undistortion (px). + float estimated_distance = 10; // Estimated subject distance (m). } // Latitude and longitude position in WGS 84 decimal degrees format. diff --git a/protobuf_definitions/telemetry.proto b/protobuf_definitions/telemetry.proto index 3c684c12..527bac8a 100644 --- a/protobuf_definitions/telemetry.proto +++ b/protobuf_definitions/telemetry.proto @@ -87,6 +87,9 @@ message GuestPortLightsTel { // Receive the status of any lasers connected to the drone. message LaserTel { Laser laser = 1; // Laser status. + LaserDetection laser_detection = + 2; // Detection of the laser by the computer vision pipeline. Only + // available on Ultra. } // Pilot position (originating from device GPS) for logging.