/** * Decode a rangefinder message into this class fields * * @param payload The message to decode */ public void unpack(MAVLinkPayload payload) { payload.resetIndex(); this.distance = payload.getFloat(); this.voltage = payload.getFloat(); }
/** * Decode a wind message into this class fields * * @param payload The message to decode */ public void unpack(MAVLinkPayload payload) { payload.resetIndex(); this.direction = payload.getFloat(); this.speed = payload.getFloat(); this.speed_z = payload.getFloat(); }
/** * Decode a mission_item message into this class fields * * @param payload The message to decode */ public void unpack(MAVLinkPayload payload) { payload.resetIndex(); this.param1 = payload.getFloat(); this.param2 = payload.getFloat(); this.param3 = payload.getFloat(); this.param4 = payload.getFloat(); this.x = payload.getFloat(); this.y = payload.getFloat(); this.z = payload.getFloat(); this.seq = payload.getUnsignedShort(); this.command = payload.getUnsignedShort(); this.target_system = payload.getUnsignedByte(); this.target_component = payload.getUnsignedByte(); this.frame = payload.getUnsignedByte(); this.current = payload.getUnsignedByte(); this.autocontinue = payload.getUnsignedByte(); }
/** * Decode a home_position message into this class fields * * @param payload The message to decode */ public void unpack(MAVLinkPayload payload) { payload.resetIndex(); this.latitude = payload.getInt(); this.longitude = payload.getInt(); this.altitude = payload.getInt(); this.x = payload.getFloat(); this.y = payload.getFloat(); this.z = payload.getFloat(); for (int i = 0; i < this.q.length; i++) { this.q[i] = payload.getFloat(); } this.approach_x = payload.getFloat(); this.approach_y = payload.getFloat(); this.approach_z = payload.getFloat(); }
/** * Decode a landing_target message into this class fields * * @param payload The message to decode */ public void unpack(MAVLinkPayload payload) { payload.resetIndex(); this.time_usec = payload.getUnsignedLong(); this.angle_x = payload.getFloat(); this.angle_y = payload.getFloat(); this.distance = payload.getFloat(); this.size_x = payload.getFloat(); this.size_y = payload.getFloat(); this.target_num = payload.getUnsignedByte(); this.frame = payload.getUnsignedByte(); }
/** * Decode a param_value message into this class fields * * @param payload The message to decode */ public void unpack(MAVLinkPayload payload) { payload.resetIndex(); param_value = payload.getFloat(); param_count = payload.getShort(); param_index = payload.getShort(); for (int i = 0; i < param_id.length; i++) { param_id[i] = payload.getByte(); } param_type = payload.getByte(); }
/** * Decode a vision_position_estimate message into this class fields * * @param payload The message to decode */ public void unpack(MAVLinkPayload payload) { payload.resetIndex(); this.usec = payload.getUnsignedLong(); this.x = payload.getFloat(); this.y = payload.getFloat(); this.z = payload.getFloat(); this.roll = payload.getFloat(); this.pitch = payload.getFloat(); this.yaw = payload.getFloat(); }