JED quaternion needs different conversion
JosephBowkett opened this issue · 1 comments
JosephBowkett commented
jsd_jed.c converts the quaternion from the device as:
w = (double)w_raw / 1000.0;
x = (double)x_raw / 1000.0;
y = (double)y_raw / 1000.0;
z = (double)z_raw / 1000.0;
but it appears the value coming across is actually an int16_t, not the uint32 listed in the PDO map, such that the conversion should be:
int16_t w_tmp = (int16_t)w_raw;
int16_t x_tmp = (int16_t)x_raw;
int16_t y_tmp = (int16_t)y_raw;
int16_t z_tmp = (int16_t)z_raw;
w = (double)w / 1000.0;
x = (double)x / 1000.0;
y = (double)y / 1000.0;
z = (double)z / 1000.0;
Should add this change when splitting out the JED device types.
alex-brinkman commented
I believe this issue no longer applies with the refactor of JED0200 and JED0101. If you can confirm that please close this issue.