also dded assert on optical flow to ensure the script is used with a version of AP that includes the optical flow bindings
this supports automatic switching between GPS and opticalflow