Skip to content

Commit

Permalink
console/plugins/planning/PlanExecutionPreview: Fix processing depth o…
Browse files Browse the repository at this point in the history
…n StateReport message.
  • Loading branch information
paulosousadias committed Oct 3, 2024
1 parent 04e91e8 commit 9815917
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ public synchronized void consume(StateReport msg) {
EstimatedState current = sim.getState().toEstimatedState();
current.setLat(Math.toRadians(msg.getLatitude()));
current.setLon(Math.toRadians(msg.getLongitude()));
current.setDepth(msg.getDepth()/10.0);
current.setDepth(msg.getDepth() == 0xFFFF ? -1 : msg.getDepth()/10.0);
double ellapsedTime = Math.abs(System.currentTimeMillis()/1000.0 - msg.getStime()) * 3;
sim.setPositionEstimation(current, ellapsedTime);
}
Expand Down

0 comments on commit 9815917

Please sign in to comment.