Is there a way to determine the orientation of a sensor using a JavaScript function? I came across an example on 3D Accelerometer calculate the orientation, but I'm struggling to understand how to utilize the values of msg.payload.xAxis/yAxis/zAxis for the calculation. If possible, I would like to incorporate this into the sample payload below by creating a new field.
{
"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
}