Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical
                mouse sensor)

                time_usec                 : Timestamp (microseconds, synced to UNIX time or since system boot) (uint64_t)
                sensor_id                 : Sensor ID (uint8_t)
                integration_time_us        : Integration time in microseconds. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the. (uint32_t)
                integrated_x              : Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.) (float)
                integrated_y              : Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.) (float)
                integrated_xgyro          : RH rotation around X axis (rad) (float)
                integrated_ygyro          : RH rotation around Y axis (rad) (float)
                integrated_zgyro          : RH rotation around Z axis (rad) (float)
                temperature               : Temperature * 100 in centi-degrees Celsius (int16_t)
                quality                   : Optical flow quality / confidence. 0: no valid flow, 255: maximum quality (uint8_t)
                time_delta_distance_us        : Time in microseconds since the distance was sampled. (uint32_t)
                distance                  : Distance to the center of the flow field in meters. Positive value (including zero): distance known. Negative value: Unknown distance. (float)

def hil_optical_flow_encode(self, time_usec, sensor_id, integration_time_us, integrated_x, integrated_y, integrated_xgyro, integrated_ygyro, integrated_zgyro, temperature, quality, time_delta_distance_us, distance):
                '''
                Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical
                mouse sensor)

                time_usec                 : Timestamp (microseconds, synced to UNIX time or since system boot) (uint64_t)
                sensor_id                 : Sensor ID (uint8_t)
                integration_time_us        : Integration time in microseconds. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the. (uint32_t)
                integrated_x              : Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.) (float)
                integrated_y              : Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.) (float)
                integrated_xgyro          : RH rotation around X axis (rad) (float)
                integrated_ygyro          : RH rotation around Y axis (rad) (float)
                integrated_zgyro          : RH rotation around Z axis (rad) (float)
                temperature               : Temperature * 100 in centi-degrees Celsius (int16_t)
                quality                   : Optical flow quality / confidence. 0: no valid flow, 255: maximum quality (uint8_t)
                time_delta_distance_us        : Time in microseconds since the distance was sampled. (uint32_t)
                distance                  : Distance to the center of the flow field in meters. Positive value (including zero): distance known. Negative value: Unknown distance. (float)

                '''
                return MAVLink_hil_optical_flow_message(time_usec, sensor_id, integration_time_us, integrated_x, integrated_y, integrated_xgyro, integrated_ygyro, integrated_zgyro, temperature, quality, time_delta_distance_us, distance)