EkfStatusReport.parse constructor
EkfStatusReport.parse(
- ByteData data_
Implementation
factory EkfStatusReport.parse(ByteData data_) {
if (data_.lengthInBytes < EkfStatusReport.mavlinkEncodedLength) {
var len = EkfStatusReport.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var velocityVariance = data_.getFloat32(0, Endian.little);
var posHorizVariance = data_.getFloat32(4, Endian.little);
var posVertVariance = data_.getFloat32(8, Endian.little);
var compassVariance = data_.getFloat32(12, Endian.little);
var terrainAltVariance = data_.getFloat32(16, Endian.little);
var flags = data_.getUint16(20, Endian.little);
var airspeedVariance = data_.getFloat32(22, Endian.little);
return EkfStatusReport(
velocityVariance: velocityVariance,
posHorizVariance: posHorizVariance,
posVertVariance: posVertVariance,
compassVariance: compassVariance,
terrainAltVariance: terrainAltVariance,
flags: flags,
airspeedVariance: airspeedVariance);
}