github.com/bluenviron/gomavlib/v2@v2.2.1-0.20240308101627-2c07e3da629c/pkg/dialects/common/message_optical_flow.go (about)

     1  //autogenerated:yes
     2  //nolint:revive,misspell,govet,lll
     3  package common
     4  
     5  // Optical flow from a flow sensor (e.g. optical mouse sensor)
     6  type MessageOpticalFlow struct {
     7  	// Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
     8  	TimeUsec uint64
     9  	// Sensor ID
    10  	SensorId uint8
    11  	// Flow in x-sensor direction
    12  	FlowX int16
    13  	// Flow in y-sensor direction
    14  	FlowY int16
    15  	// Flow in x-sensor direction, angular-speed compensated
    16  	FlowCompMX float32
    17  	// Flow in y-sensor direction, angular-speed compensated
    18  	FlowCompMY float32
    19  	// Optical flow quality / confidence. 0: bad, 255: maximum quality
    20  	Quality uint8
    21  	// Ground distance. Positive value: distance known. Negative value: Unknown distance
    22  	GroundDistance float32
    23  	// Flow rate about X axis
    24  	FlowRateX float32 `mavext:"true"`
    25  	// Flow rate about Y axis
    26  	FlowRateY float32 `mavext:"true"`
    27  }
    28  
    29  // GetID implements the message.Message interface.
    30  func (*MessageOpticalFlow) GetID() uint32 {
    31  	return 100
    32  }