Displaying LIDAR Altitude on OSD

Hello everyone!

I have a CubeOrange flight controller and an external MinimOSD board. Can you please advise on how to display LIDAR altitude on the OSD screen? In the default settings, I only see altitude displayed based on GPS/barometer readings, but I specifically need to use LIDAR data.

Thank you in advance for your help.

What firmware are you running on the minimOSD?

I use MWOSD GUI Configurator from (https://www.virtualpilot.co.uk/) and firmware (last update more than 2 years ago((( ) - MW-OSD (scarab-osd).

Looks like you’ll have to build it yourself with custom options set in scarab-osd/MW_OSD/Config.h:

/******************** Mavlink distance sensor settings *********************/
// Choose ONLY ONE SENSOR option AND enable MAVSENSORACTIVE
//#define MAVSENSORGPSACTIVE 5      // When enabled, displays sensor distance instead of GPS altitude. Default = 5m. Requires stream configured on MAV FC
//#define MAVSENSOR173              // When enabled, uses RANGEFINDER - MAVLINK #173 command for the distance. Requires MAVSENSORGPSACTIVE enabled
//#define MAVSENSOR132              // When enabled, uses INFO_DISTANCE - MAVLINK #132 command for the distance. Requires MAVSENSORGPSACTIVE enabled
1 Like

OK, thank you! I will try it and then write you!
Thanks again!

1 Like

Hi there!
I tried to display the LiDAR data on the OSD following your advice. To do this, I uncommented the following lines:
#define MAVSENSOR132 // When enabled, uses INFO_DISTANCE - MAVLINK #132 command for the distance. Requires MAVSENSORGPSACTIVE enabled and compile this osd project in the arduino ide.
In Mission Planner settings, I set SR2_EXTRA3 to 5 Hz and configured Serial2 to 115200 baud rate and MAVLink 1. In theory, the OSD should already be receiving information from the LiDAR. But how do I display this information on the screen? I think I need to specify my own LiDAR display option in the custom.ino file in the OSD. However, I haven’t been successful so far, as I don’t fully understand the code yet. I would appreciate any advice on the next steps. Thank you in advance.
P.S. I use MWOSD configurator, and as I think my custom lidar could show on page “Custom”?

Oh boy, haven’t configured an OSD in years… is the link from FC to OSD working, i.e. are you getting some telemetry other than lidar on your OSD?

I think, it should be enough when you select GPS Altitude in the MWOSD configurator, as per the code description: //#define MAVSENSORGPSACTIVE 5 // When enabled, displays sensor distance instead of GPS altitude.

image