serialize method

  1. @override
ByteData serialize()
override

Implementation

@override
ByteData serialize() {
  var data_ = ByteData(mavlinkEncodedLength);
  data_.setUint32(0, icaoAddress, Endian.little);
  data_.setInt32(4, lat, Endian.little);
  data_.setInt32(8, lon, Endian.little);
  data_.setInt32(12, altitude, Endian.little);
  data_.setUint16(16, heading, Endian.little);
  data_.setUint16(18, horVelocity, Endian.little);
  data_.setInt16(20, verVelocity, Endian.little);
  data_.setUint16(22, flags, Endian.little);
  data_.setUint16(24, squawk, Endian.little);
  data_.setUint8(26, altitudeType);
  MavlinkMessage.setInt8List(data_, 27, callsign);
  data_.setUint8(36, emitterType);
  data_.setUint8(37, tslc);
  return data_;
}