serialize method

  1. @override
ByteData serialize()
override

Implementation

@override
ByteData serialize() {
  var data_ = ByteData(mavlinkEncodedLength);
  data_.setUint64(0, timeUsec, Endian.little);
  data_.setFloat32(8, x, Endian.little);
  data_.setFloat32(12, y, Endian.little);
  data_.setFloat32(16, z, Endian.little);
  MavlinkMessage.setFloat32List(data_, 20, q);
  data_.setFloat32(36, vx, Endian.little);
  data_.setFloat32(40, vy, Endian.little);
  data_.setFloat32(44, vz, Endian.little);
  data_.setFloat32(48, rollspeed, Endian.little);
  data_.setFloat32(52, pitchspeed, Endian.little);
  data_.setFloat32(56, yawspeed, Endian.little);
  MavlinkMessage.setFloat32List(data_, 60, poseCovariance);
  MavlinkMessage.setFloat32List(data_, 144, velocityCovariance);
  data_.setUint8(228, frameId);
  data_.setUint8(229, childFrameId);
  data_.setUint8(230, resetCounter);
  data_.setUint8(231, estimatorType);
  data_.setInt8(232, quality);
  return data_;
}