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

     1  //autogenerated:yes
     2  //nolint:revive,misspell,govet,lll
     3  package common
     4  
     5  // Low level message to control a gimbal device's attitude.
     6  // This message is to be sent from the gimbal manager to the gimbal device component.
     7  // The quaternion and angular velocities can be set to NaN according to use case.
     8  // For the angles encoded in the quaternion and the angular velocities holds:
     9  // If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame).
    10  // If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame).
    11  // If neither of these flags are set, then (for backwards compatibility) it holds:
    12  // If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame),
    13  // else they are relative to the vehicle heading (vehicle frame).
    14  // Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed.
    15  // These rules are to ensure backwards compatibility.
    16  // New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME.
    17  type MessageGimbalDeviceSetAttitude struct {
    18  	// System ID
    19  	TargetSystem uint8
    20  	// Component ID
    21  	TargetComponent uint8
    22  	// Low level gimbal flags.
    23  	Flags GIMBAL_DEVICE_FLAGS `mavenum:"uint16"`
    24  	// Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored.
    25  	Q [4]float32
    26  	// X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored.
    27  	AngularVelocityX float32
    28  	// Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored.
    29  	AngularVelocityY float32
    30  	// Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored.
    31  	AngularVelocityZ float32
    32  }
    33  
    34  // GetID implements the message.Message interface.
    35  func (*MessageGimbalDeviceSetAttitude) GetID() uint32 {
    36  	return 284
    37  }