qgroundcontrol icon indicating copy to clipboard operation
qgroundcontrol copied to clipboard

[ObstacleDistanceOverlay] Fix 90 degree offset

Open dakejahl opened this issue 1 year ago • 2 comments

Fixes issue where obstacle distances are displayed with a +90 degree offset. This is due to an error in the coordinate system math along with an error in calculating the degrees for the current distance index. The yaw angle theta is measured CW from North and therefore r * cos(theta) is negative Y axis and r * sin(theta) is positive X.

Qt docs

The x values increase to the right and the y values increase downwards. image

There's more still that needs to be done. The ObstacleDistanceOverlayVideo.qml probably needs this fix. There's also the VehicleObjectAvoidance class which seems to be entirely unused other than the distances array. This feature is currently broken in PX4 and I don't think anyone has used it in years. I want to resurrect the feature and make it all work again.

dakejahl avatar Nov 29 '23 00:11 dakejahl

@dakejahl Any updates on this. It's still marked Draft.

DonLakeFlyer avatar Jan 20 '24 18:01 DonLakeFlyer

No not yet, I haven't come back to working on this. The first step is to get the feature working again in PX4.

dakejahl avatar Jan 23 '24 20:01 dakejahl