serialize method

  1. @override
ByteData serialize()
override

Implementation

@override
ByteData serialize() {
  var data_ = ByteData(mavlinkEncodedLength);
  data_.setInt32(0, latitude, Endian.little);
  data_.setInt32(4, longitude, Endian.little);
  data_.setFloat32(8, altitudeBarometric, Endian.little);
  data_.setFloat32(12, altitudeGeodetic, Endian.little);
  data_.setFloat32(16, height, Endian.little);
  data_.setFloat32(20, timestamp, Endian.little);
  data_.setUint16(24, direction, Endian.little);
  data_.setUint16(26, speedHorizontal, Endian.little);
  data_.setInt16(28, speedVertical, Endian.little);
  data_.setUint8(30, targetSystem);
  data_.setUint8(31, targetComponent);
  MavlinkMessage.setUint8List(data_, 32, idOrMac);
  data_.setUint8(52, status);
  data_.setUint8(53, heightReference);
  data_.setUint8(54, horizontalAccuracy);
  data_.setUint8(55, verticalAccuracy);
  data_.setUint8(56, barometerAccuracy);
  data_.setUint8(57, speedAccuracy);
  data_.setUint8(58, timestampAccuracy);
  return data_;
}