package com.imdroid.sideslope.message;

import com.imdroid.sideslope.bd.Tilt;
import com.imdroid.sideslope.bd.UBXUtil;
import com.imdroid.common.util.WrongMessageRecorder;
import io.netty.buffer.ByteBuf;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author Layton
 * @date 2023/2/2 20:50
 */
@Data
@EqualsAndHashCode(callSuper=true)
public class D341LocationMessage extends BaseMessage {
    Tilt tilt;
    double[] b562_loc;
    @Override
    public void decodeBody(ByteBuf src) {
        // 读到pitch了，readable不不含pitch之前
        tilt = new Tilt(src.readFloat(), src.readFloat(),src.readFloat(),src.readFloat());
        // b562
        b562_loc = UBXUtil.getLocation(src);
    }

}
