uint8_tsurface_quality;// image quality (below TBD you can't trust the dx,dy values returned)
Vector2fflowRate;// optical flow angular rate in rad/sec measured about the X and Y body axis. A RH rotation about a sensor axis produces a positive rate.
Vector2fbodyRate;// body inertial angular rate in rad/sec measured about the X and Y body axis. A RH rotation about a sensor axis produces a positive rate.
};
// return a 3D vector defining the position offset of the sensors focal point in metres relative to the body frame origin
constVector3f&get_pos_offset(void)const{
return_pos_offset;
}
// parameter var info table
staticconststructAP_Param::GroupInfovar_info[];
private:
staticOpticalFlow*_singleton;
OpticalFlow_backend*backend;
structAP_OpticalFlow_Flags{
uint8_thealthy:1;// true if sensor is healthy
}_flags;
// parameters
AP_Int8_type;// user configurable sensor type
AP_Int16_flowScalerX;// X axis flow scale factor correction - parts per thousand
AP_Int16_flowScalerY;// Y axis flow scale factor correction - parts per thousand
AP_Int16_yawAngle_cd;// yaw angle of sensor X axis with respect to vehicle X axis - centi degrees
AP_Vector3f_pos_offset;// position offset of the flow sensor in the body frame
AP_Int8_address;// address on the bus (allows selecting between 8 possible I2C addresses for px4flow)
// method called by backend to update frontend state:
voidupdate_state(constOpticalFlow_state&state);
// state filled in by backend
structOpticalFlow_state_state;
uint32_t_last_update_ms;// millis() time of last update
voidLog_Write_Optflow();
uint32_t_log_bit=-1;// bitmask bit which indicates if we should log. -1 means we always log