Skip to content

Commit

Permalink
Display raw tracker data in degrees not in quats
Browse files Browse the repository at this point in the history
  • Loading branch information
Eirenliel committed Jul 25, 2021
1 parent 1c5167b commit 8d1886d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/io/eiren/gui/TrackersList.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public void actionPerformed(ActionEvent e) {
add(new JLabel("Battery:"), c(2, 4, 0, GridBagConstraints.FIRST_LINE_START));
add(bat = new JLabel("0"), c(3, 4, 0, GridBagConstraints.FIRST_LINE_START));
add(new JLabel("Raw:"), c(0, 5, 0, GridBagConstraints.FIRST_LINE_START));
add(raw = new JLabel("0 0 0 0"), s(c(1, 5, 0, GridBagConstraints.FIRST_LINE_START), 3, 1));
add(raw = new JLabel("0 0 0"), s(c(1, 5, 0, GridBagConstraints.FIRST_LINE_START), 3, 1));

if(t instanceof ReferenceAdjustedTracker) {
add(new JLabel("Adj:"), c(0, 6, 0, GridBagConstraints.FIRST_LINE_START));
Expand Down Expand Up @@ -230,10 +230,10 @@ public void update() {
if(t2 instanceof IMUTracker)
ping.setText(String.valueOf(((IMUTracker) t2).ping));
t2.getRotation(q);
raw.setText(StringUtils.prettyNumber(q.getX(), 4)
+ " " + StringUtils.prettyNumber(q.getY(), 4)
+ " " + StringUtils.prettyNumber(q.getZ(), 4)
+ " " + StringUtils.prettyNumber(q.getW(), 4));
q.toAngles(angles);
raw.setText(StringUtils.prettyNumber(angles[0] * FastMath.RAD_TO_DEG, 0)
+ " " + StringUtils.prettyNumber(angles[1] * FastMath.RAD_TO_DEG, 0)
+ " " + StringUtils.prettyNumber(angles[2] * FastMath.RAD_TO_DEG, 0));
}
}

Expand Down

0 comments on commit 8d1886d

Please sign in to comment.