serialize method

  1. @override
ByteData serialize()
override

Implementation

@override
ByteData serialize() {
  var data_ = ByteData(mavlinkEncodedLength);
  data_.setFloat32(0, q1, Endian.little);
  data_.setFloat32(4, q2, Endian.little);
  data_.setFloat32(8, q3, Endian.little);
  data_.setFloat32(12, q4, Endian.little);
  data_.setFloat32(16, roll, Endian.little);
  data_.setFloat32(20, pitch, Endian.little);
  data_.setFloat32(24, yaw, Endian.little);
  data_.setFloat32(28, xacc, Endian.little);
  data_.setFloat32(32, yacc, Endian.little);
  data_.setFloat32(36, zacc, Endian.little);
  data_.setFloat32(40, xgyro, Endian.little);
  data_.setFloat32(44, ygyro, Endian.little);
  data_.setFloat32(48, zgyro, Endian.little);
  data_.setFloat32(52, lat, Endian.little);
  data_.setFloat32(56, lon, Endian.little);
  data_.setFloat32(60, alt, Endian.little);
  data_.setFloat32(64, stdDevHorz, Endian.little);
  data_.setFloat32(68, stdDevVert, Endian.little);
  data_.setFloat32(72, vn, Endian.little);
  data_.setFloat32(76, ve, Endian.little);
  data_.setFloat32(80, vd, Endian.little);
  data_.setInt32(84, latInt, Endian.little);
  data_.setInt32(88, lonInt, Endian.little);
  return data_;
}