AoaSsa.parse constructor

AoaSsa.parse(
  1. ByteData data_
)

Implementation

factory AoaSsa.parse(ByteData data_) {
  if (data_.lengthInBytes < AoaSsa.mavlinkEncodedLength) {
    var len = AoaSsa.mavlinkEncodedLength - data_.lengthInBytes;
    var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
    data_ = Uint8List.fromList(d).buffer.asByteData();
  }
  var timeUsec = data_.getUint64(0, Endian.little);
  var aoa = data_.getFloat32(8, Endian.little);
  var ssa = data_.getFloat32(12, Endian.little);

  return AoaSsa(timeUsec: timeUsec, aoa: aoa, ssa: ssa);
}