Disarm upon GPS_FIX_TYPE not 5 or 6

I’d like my Rover to disarm if the GPS_FIX_TYPE changes to be other than 5 or 6.

(I doubt it, but…) Is there a configuration parameter that will achieve this without code? (Somewhat similar to AHRS_GPS_MINSATS)

Else, what are the approaches to implementing this in code? Goal is something that’s quite robust, i.e. doesn’t drop messages, if even at the cost of programming complexity.

  • Write a program (python?) that runs on the pixhawk at boot (standard etc/init.d startup), subscribes to MAVLINK messages, and sends a MAV_CMD_DO_SET_MODE message?
  • Should I create a Lua Script (although it seems I would have to add a new binding)
  • Install a companion computer and write a custom mavlink client that runs on it?

@rmackay9 any pointers in the right direction would be appreciated.

Thanks

I don’t think this is currently possible, maybe we could setup a gps fail-safe. Then could would switch into hold mode, or loiter for a flying thing and wait for the fix to come back.

As @iampete says this isn’t currently implemented but I think a Lua Script would be a good way to do it. As you say a new binding would be required and Lua scripts are only available with Rover-3.6-dev which hasn’t entered beta testing yet - but if you’re OK with all this, then I think it could work.

I implemented this on my companion computer…