qgroundcontrol
qgroundcontrol copied to clipboard
[ObstacleDistanceOverlay] Fix 90 degree offset
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.
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 Any updates on this. It's still marked Draft.
No not yet, I haven't come back to working on this. The first step is to get the feature working again in PX4.