张世豪
昨天 0803b041d32a284ee8585914618219ecae82b21f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package gecaoji;
import Mqttmessage.Entity.GPSData.IMUData;
 
public class Getgecaojiimu_data {
    public static void parseStatus(IMUData status) {
        if (status != null) {
            Device device = Device.getGecaoji();
            if (device == null) {
                return;
            }
            
            if (status.getPitch() != null) {
                device.setPitch(String.valueOf(status.getPitch()));
            }
            if (status.getRoll() != null) {
                device.setRoll(String.valueOf(status.getRoll()));
            }
            if (status.getYaw() != null) {//偏航角(-180到180度,0度表示正北)
                device.setYaw(String.valueOf(status.getYaw()));
            }
        } 
    }
}