How would I calculate the orientation of a sensor within a JavaScript function? I saw the example in 3d Accelerometer calculate the orientation but I'm unsure how to apply the values of msg.payload.xAxis/yAxis/zAxis as such within the calculation. I'd need to apply it to the example payload below in the form of a new field if possible.
{
"device":"368640",
"deviceType":"Sigfox-Tracker",
"version":3,
"timestamp":"1535121228",
"rssi":"-113.00",
"battery":3.28,
"temp":21.5,
"soil":2107,
"xAxis":61,
"yAxis":-26,
"zAxis":994
}