Local_position_ned message not streaming\not received

I am trying to receive LOCAL_POSITION_NED messages.
I am using optical flow (loiter mode works great, so I know the optical flow is functioning), however I am not receiving LOCAL_POSITION_NED (#32) messages. I have set SRX_POSITION to 10 and armed the quadcopter, but still nothing.
I have version 3.6.12 running.
Any ideas?

You only get that if you have GPS lock

So how do I get a local position solution - (x,y,z) when using optical flow?


You need to set the home position using a mavlink message

do you mean set_home_position (#243)?

yes, I meant that. Does it work ?

Actually, it didn’t work. I used MAV_CMD_DO_SET_HOME though, and that worked fine.

Maybe you can tell me -
I am using optical flow and lidar in guided mode. I’m successfully moving the drone around with velocity (vx,vy) and yaw rate requests with set_position_target_local_ned. I was wondering exactly how vertical velocity is treated, especially if the terrain height changes (Say, I fly over a building, or a tree, for example). Further - is it possible to set the barometer as the altitude measurement source and use the lidar just for the optical flow solution?

Try EK2_ALT_SOURCE parameter