serialize method

  1. @override
ByteData serialize()
override

Implementation

@override
ByteData serialize() {
  var data_ = ByteData(mavlinkEncodedLength);
  data_.setInt32(0, lat, Endian.little);
  data_.setInt32(4, lon, Endian.little);
  data_.setFloat32(8, alt, Endian.little);
  data_.setFloat32(12, hAcc, Endian.little);
  data_.setFloat32(16, vAcc, Endian.little);
  data_.setFloat32(20, velN, Endian.little);
  data_.setFloat32(24, velE, Endian.little);
  data_.setFloat32(28, velD, Endian.little);
  data_.setFloat32(32, velAcc, Endian.little);
  data_.setFloat32(36, dist, Endian.little);
  data_.setFloat32(40, hdg, Endian.little);
  data_.setFloat32(44, hdgAcc, Endian.little);
  data_.setUint8(48, trackingStatus);
  return data_;
}