serialize method

  1. @override
ByteData serialize()
override

Implementation

@override
ByteData serialize() {
  var data_ = ByteData(mavlinkEncodedLength);
  data_.setUint64(0, time, Endian.little);
  data_.setInt32(8, lat, Endian.little);
  data_.setInt32(12, lon, Endian.little);
  data_.setInt32(16, alt, Endian.little);
  data_.setInt32(20, relativeAlt, Endian.little);
  data_.setInt32(24, nextLat, Endian.little);
  data_.setInt32(28, nextLon, Endian.little);
  data_.setInt32(32, nextAlt, Endian.little);
  data_.setInt16(36, vx, Endian.little);
  data_.setInt16(38, vy, Endian.little);
  data_.setInt16(40, vz, Endian.little);
  data_.setUint16(42, hAcc, Endian.little);
  data_.setUint16(44, vAcc, Endian.little);
  data_.setUint16(46, velAcc, Endian.little);
  data_.setUint16(48, updateRate, Endian.little);
  MavlinkMessage.setUint8List(data_, 50, uasId);
  data_.setUint8(68, flightState);
  data_.setUint8(69, flags);
  return data_;
}