I am using the dronefleet/mavlink Java library to make my own GCS. I am trying to detect when the drone is ready to arm, so that I can then arm it.

I have a class that parses all GpsRawInt messages and is listening to see when the fixType on the message is greater than or equal to GPS_FIX_TYPE_3D_FIX. However, I have always noticed that the fix type reports itself as GPS_FIX_TYPE_RTK_FIXED. However, when I try to arm (if the copter hasn’t been on long enough) it says “PreArm: Need 3D Fix” in the status messages.

So is the SITL broken, or is there an alternate way to figure out if I have a 3D fix or not?

Thanks for any help.


You surely get the 3d fix need because the EKF didn’t finished to warm up. You should look at ekf status report.
Check on the other how we are doing it ! That is in Tools/autotest, surely in and

Thanks for the quick response!

I looked into Tools/autotest and found where they check if the EKF is happy or not.

I see message #230 here seems to give me the information I need. That is excellent, but whenever I request to begin a stream of message 230 to my custom (Java) GCS, I get a “No ap_message for mavlink id (230)” message from the autopilot.

I’m on the latest Copter-4.0 SITL and can’t get it working. Any ideas there?

I figured out my own issue… I needed to use message #193 which is no listed on the Mavlink common messages, but I figured out that is what MissionPlanner uses.