AutopilotStateForGimbalDevice.parse constructor
AutopilotStateForGimbalDevice.parse(
- ByteData data_
Implementation
factory AutopilotStateForGimbalDevice.parse(ByteData data_) {
if (data_.lengthInBytes <
AutopilotStateForGimbalDevice.mavlinkEncodedLength) {
var len = AutopilotStateForGimbalDevice.mavlinkEncodedLength -
data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var timeBootUs = data_.getUint64(0, Endian.little);
var q = MavlinkMessage.asFloat32List(data_, 8, 4);
var qEstimatedDelayUs = data_.getUint32(24, Endian.little);
var vx = data_.getFloat32(28, Endian.little);
var vy = data_.getFloat32(32, Endian.little);
var vz = data_.getFloat32(36, Endian.little);
var vEstimatedDelayUs = data_.getUint32(40, Endian.little);
var feedForwardAngularVelocityZ = data_.getFloat32(44, Endian.little);
var estimatorStatus = data_.getUint16(48, Endian.little);
var targetSystem = data_.getUint8(50);
var targetComponent = data_.getUint8(51);
var landedState = data_.getUint8(52);
var angularVelocityZ = data_.getFloat32(53, Endian.little);
return AutopilotStateForGimbalDevice(
timeBootUs: timeBootUs,
q: q,
qEstimatedDelayUs: qEstimatedDelayUs,
vx: vx,
vy: vy,
vz: vz,
vEstimatedDelayUs: vEstimatedDelayUs,
feedForwardAngularVelocityZ: feedForwardAngularVelocityZ,
estimatorStatus: estimatorStatus,
targetSystem: targetSystem,
targetComponent: targetComponent,
landedState: landedState,
angularVelocityZ: angularVelocityZ);
}