AirspeedAutocal.parse constructor
AirspeedAutocal.parse(
- ByteData data_
Implementation
factory AirspeedAutocal.parse(ByteData data_) {
if (data_.lengthInBytes < AirspeedAutocal.mavlinkEncodedLength) {
var len = AirspeedAutocal.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var vx = data_.getFloat32(0, Endian.little);
var vy = data_.getFloat32(4, Endian.little);
var vz = data_.getFloat32(8, Endian.little);
var diffPressure = data_.getFloat32(12, Endian.little);
var eas2tas = data_.getFloat32(16, Endian.little);
var ratio = data_.getFloat32(20, Endian.little);
var stateX = data_.getFloat32(24, Endian.little);
var stateY = data_.getFloat32(28, Endian.little);
var stateZ = data_.getFloat32(32, Endian.little);
var pax = data_.getFloat32(36, Endian.little);
var pby = data_.getFloat32(40, Endian.little);
var pcz = data_.getFloat32(44, Endian.little);
return AirspeedAutocal(
vx: vx,
vy: vy,
vz: vz,
diffPressure: diffPressure,
eas2tas: eas2tas,
ratio: ratio,
stateX: stateX,
stateY: stateY,
stateZ: stateZ,
pax: pax,
pby: pby,
pcz: pcz);
}