From 186d7ba836a48b01d9f16d523d3e9cea553ba44c Mon Sep 17 00:00:00 2001 From: Juan Pablo Pino Bravo Date: Fri, 22 May 2026 11:04:29 +0200 Subject: [PATCH 1/5] Add LaserDetection message for tracked laser output --- protobuf_definitions/message_formats.proto | 24 ++++++++++++++++++++++ protobuf_definitions/telemetry.proto | 1 + 2 files changed, 25 insertions(+) diff --git a/protobuf_definitions/message_formats.proto b/protobuf_definitions/message_formats.proto index 26a3fa45..04f1ef18 100644 --- a/protobuf_definitions/message_formats.proto +++ b/protobuf_definitions/message_formats.proto @@ -103,6 +103,30 @@ 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). + int image_width = 6; // Source frame width. + int image_height = 7; // Source frame height. } // Latitude and longitude position in WGS 84 decimal degrees format. diff --git a/protobuf_definitions/telemetry.proto b/protobuf_definitions/telemetry.proto index 3c684c12..7574b90f 100644 --- a/protobuf_definitions/telemetry.proto +++ b/protobuf_definitions/telemetry.proto @@ -87,6 +87,7 @@ 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. From 6d09c2c3af1a8e93c5ea7a9616886d6108bde4ae Mon Sep 17 00:00:00 2001 From: Juan Pablo Pino Bravo Date: Fri, 22 May 2026 11:09:14 +0200 Subject: [PATCH 2/5] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- protobuf_definitions/message_formats.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protobuf_definitions/message_formats.proto b/protobuf_definitions/message_formats.proto index 04f1ef18..56a040ec 100644 --- a/protobuf_definitions/message_formats.proto +++ b/protobuf_definitions/message_formats.proto @@ -125,8 +125,8 @@ message LaserDetection { 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). - int image_width = 6; // Source frame width. - int image_height = 7; // Source frame height. + uint32 image_width = 6; // Source frame width. + uint32 image_height = 7; // Source frame height. } // Latitude and longitude position in WGS 84 decimal degrees format. From 12471f2d7eb9db625f894f39d5de4de681d8aece Mon Sep 17 00:00:00 2001 From: Juan Pablo Pino Bravo Date: Fri, 22 May 2026 11:34:42 +0200 Subject: [PATCH 3/5] Format LaserDetection comments --- protobuf_definitions/telemetry.proto | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/protobuf_definitions/telemetry.proto b/protobuf_definitions/telemetry.proto index 7574b90f..527bac8a 100644 --- a/protobuf_definitions/telemetry.proto +++ b/protobuf_definitions/telemetry.proto @@ -87,7 +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. + 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. From ecc45c7a2c2e9411ba8d9d0a7af87509225a185d Mon Sep 17 00:00:00 2001 From: Juan Pablo Pino Bravo Date: Fri, 22 May 2026 12:58:11 +0200 Subject: [PATCH 4/5] Add laser_width field to LaserDetection --- protobuf_definitions/message_formats.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/protobuf_definitions/message_formats.proto b/protobuf_definitions/message_formats.proto index 56a040ec..5d56aaf0 100644 --- a/protobuf_definitions/message_formats.proto +++ b/protobuf_definitions/message_formats.proto @@ -127,6 +127,7 @@ message LaserDetection { 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). } // Latitude and longitude position in WGS 84 decimal degrees format. From 9b5c8aee7f3bd4901a4c9cb3c9e2457bc5f9e725 Mon Sep 17 00:00:00 2001 From: Juan Pablo Pino Bravo Date: Tue, 26 May 2026 14:54:49 +0200 Subject: [PATCH 5/5] Add distance estimate on LaserDetection message --- protobuf_definitions/message_formats.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/protobuf_definitions/message_formats.proto b/protobuf_definitions/message_formats.proto index 5d56aaf0..21b0e28d 100644 --- a/protobuf_definitions/message_formats.proto +++ b/protobuf_definitions/message_formats.proto @@ -128,6 +128,8 @@ message LaserDetection { 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.