// Pack returns a packed byte array which represents a GpsStatus payload
498527
func (m *GpsStatus) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.SATELLITES_VISIBLE)
	binary.Write(data, binary.LittleEndian, m.SATELLITE_PRN)
	binary.Write(data, binary.LittleEndian, m.SATELLITE_USED)
	binary.Write(data, binary.LittleEndian, m.SATELLITE_ELEVATION)
	binary.Write(data, binary.LittleEndian, m.SATELLITE_AZIMUTH)
	binary.Write(data, binary.LittleEndian, m.SATELLITE_SNR)
	return data.Bytes()
}
1254564
func (m *HilControls) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TIME_USEC)
	binary.Write(data, binary.LittleEndian, m.ROLL_AILERONS)
	binary.Write(data, binary.LittleEndian, m.PITCH_ELEVATOR)
	binary.Write(data, binary.LittleEndian, m.YAW_RUDDER)
	binary.Write(data, binary.LittleEndian, m.THROTTLE)
	binary.Write(data, binary.LittleEndian, m.AUX1)
	binary.Write(data, binary.LittleEndian, m.AUX2)
	binary.Write(data, binary.LittleEndian, m.AUX3)
	binary.Write(data, binary.LittleEndian, m.AUX4)
	binary.Write(data, binary.LittleEndian, m.MODE)
	binary.Write(data, binary.LittleEndian, m.NAV_MODE)
	return data.Bytes()
}
1303954
func (m *VisionSpeedEstimate) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.USEC)
	binary.Write(data, binary.LittleEndian, m.X)
	binary.Write(data, binary.LittleEndian, m.Y)
	binary.Write(data, binary.LittleEndian, m.Z)
	return data.Bytes()
}
44757
func Pack(w io.Writer, buf []byte) error {
	if len(buf) > messageMax {
		return errors.New("message is too large")
	}

	var bl [2]byte
	binary.LittleEndian.PutUint16(bl[:], uint16(len(buf)))
	_, err := w.Write(bl[:])
	if err != nil {
		return err
	}

	_, err = w.Write(buf)
	return err
}
858964
func (m *SerialControl) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.BAUDRATE)
	binary.Write(data, binary.LittleEndian, m.TIMEOUT)
	binary.Write(data, binary.LittleEndian, m.DEVICE)
	binary.Write(data, binary.LittleEndian, m.FLAGS)
	binary.Write(data, binary.LittleEndian, m.COUNT)
	binary.Write(data, binary.LittleEndian, m.DATA)
	return data.Bytes()
}
193965
func (m *SetQuadSwarmRollPitchYawThrust) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.ROLL)
	binary.Write(data, binary.LittleEndian, m.PITCH)
	binary.Write(data, binary.LittleEndian, m.YAW)
	binary.Write(data, binary.LittleEndian, m.THRUST)
	binary.Write(data, binary.LittleEndian, m.GROUP)
	binary.Write(data, binary.LittleEndian, m.MODE)
	return data.Bytes()
}
1057566
func (m *TerrainCheck) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.LAT)
	binary.Write(data, binary.LittleEndian, m.LON)
	return data.Bytes()
}
794750
func (m *LocalPositionSetpoint) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.X)
	binary.Write(data, binary.LittleEndian, m.Y)
	binary.Write(data, binary.LittleEndian, m.Z)
	binary.Write(data, binary.LittleEndian, m.YAW)
	binary.Write(data, binary.LittleEndian, m.COORDINATE_FRAME)
	return data.Bytes()
}
590542
func (m *SimState) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.Q1)
	binary.Write(data, binary.LittleEndian, m.Q2)
	binary.Write(data, binary.LittleEndian, m.Q3)
	binary.Write(data, binary.LittleEndian, m.Q4)
	binary.Write(data, binary.LittleEndian, m.ROLL)
	binary.Write(data, binary.LittleEndian, m.PITCH)
	binary.Write(data, binary.LittleEndian, m.YAW)
	binary.Write(data, binary.LittleEndian, m.XACC)
	binary.Write(data, binary.LittleEndian, m.YACC)
	binary.Write(data, binary.LittleEndian, m.ZACC)
	binary.Write(data, binary.LittleEndian, m.XGYRO)
	binary.Write(data, binary.LittleEndian, m.YGYRO)
	binary.Write(data, binary.LittleEndian, m.ZGYRO)
	binary.Write(data, binary.LittleEndian, m.LAT)
	binary.Write(data, binary.LittleEndian, m.LON)
	binary.Write(data, binary.LittleEndian, m.ALT)
	binary.Write(data, binary.LittleEndian, m.STD_DEV_HORZ)
	binary.Write(data, binary.LittleEndian, m.STD_DEV_VERT)
	binary.Write(data, binary.LittleEndian, m.VN)
	binary.Write(data, binary.LittleEndian, m.VE)
	binary.Write(data, binary.LittleEndian, m.VD)
	return data.Bytes()
}
869468
func (m *SetQuadMotorsSetpoint) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.MOTOR_FRONT_NW)
	binary.Write(data, binary.LittleEndian, m.MOTOR_RIGHT_NE)
	binary.Write(data, binary.LittleEndian, m.MOTOR_BACK_SE)
	binary.Write(data, binary.LittleEndian, m.MOTOR_LEFT_SW)
	binary.Write(data, binary.LittleEndian, m.TARGET_SYSTEM)
	return data.Bytes()
}
1138317
func (m *MemoryVect) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.ADDRESS)
	binary.Write(data, binary.LittleEndian, m.VER)
	binary.Write(data, binary.LittleEndian, m.TYPE)
	binary.Write(data, binary.LittleEndian, m.VALUE)
	return data.Bytes()
}
721931
func (m *Statustext) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.SEVERITY)
	binary.Write(data, binary.LittleEndian, m.TEXT)
	return data.Bytes()
}
829758
func (m *ParamRequestRead) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.PARAM_INDEX)
	binary.Write(data, binary.LittleEndian, m.TARGET_SYSTEM)
	binary.Write(data, binary.LittleEndian, m.TARGET_COMPONENT)
	binary.Write(data, binary.LittleEndian, m.PARAM_ID)
	return data.Bytes()
}
869314
func (m *CommandAck) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.COMMAND)
	binary.Write(data, binary.LittleEndian, m.RESULT)
	return data.Bytes()
}
431837
func (m *AttitudeQuaternion) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TIME_BOOT_MS)
	binary.Write(data, binary.LittleEndian, m.Q1)
	binary.Write(data, binary.LittleEndian, m.Q2)
	binary.Write(data, binary.LittleEndian, m.Q3)
	binary.Write(data, binary.LittleEndian, m.Q4)
	binary.Write(data, binary.LittleEndian, m.ROLLSPEED)
	binary.Write(data, binary.LittleEndian, m.PITCHSPEED)
	binary.Write(data, binary.LittleEndian, m.YAWSPEED)
	return data.Bytes()
}
467927
func (m *TerrainReport) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.LAT)
	binary.Write(data, binary.LittleEndian, m.LON)
	binary.Write(data, binary.LittleEndian, m.TERRAIN_HEIGHT)
	binary.Write(data, binary.LittleEndian, m.CURRENT_HEIGHT)
	binary.Write(data, binary.LittleEndian, m.SPACING)
	binary.Write(data, binary.LittleEndian, m.PENDING)
	binary.Write(data, binary.LittleEndian, m.LOADED)
	return data.Bytes()
}
636052
func (m *BatteryStatus) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.CURRENT_CONSUMED)
	binary.Write(data, binary.LittleEndian, m.ENERGY_CONSUMED)
	binary.Write(data, binary.LittleEndian, m.VOLTAGE_CELL_1)
	binary.Write(data, binary.LittleEndian, m.VOLTAGE_CELL_2)
	binary.Write(data, binary.LittleEndian, m.VOLTAGE_CELL_3)
	binary.Write(data, binary.LittleEndian, m.VOLTAGE_CELL_4)
	binary.Write(data, binary.LittleEndian, m.VOLTAGE_CELL_5)
	binary.Write(data, binary.LittleEndian, m.VOLTAGE_CELL_6)
	binary.Write(data, binary.LittleEndian, m.CURRENT_BATTERY)
	binary.Write(data, binary.LittleEndian, m.ACCU_ID)
	binary.Write(data, binary.LittleEndian, m.BATTERY_REMAINING)
	return data.Bytes()
}