Skip to content

Commit 9815917

Browse files
console/plugins/planning/PlanExecutionPreview: Fix processing depth on StateReport message.
1 parent 04e91e8 commit 9815917

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/java/pt/lsts/neptus/console/plugins/planning/PlanExecutionPreview.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ public synchronized void consume(StateReport msg) {
387387
EstimatedState current = sim.getState().toEstimatedState();
388388
current.setLat(Math.toRadians(msg.getLatitude()));
389389
current.setLon(Math.toRadians(msg.getLongitude()));
390-
current.setDepth(msg.getDepth()/10.0);
390+
current.setDepth(msg.getDepth() == 0xFFFF ? -1 : msg.getDepth()/10.0);
391391
double ellapsedTime = Math.abs(System.currentTimeMillis()/1000.0 - msg.getStime()) * 3;
392392
sim.setPositionEstimation(current, ellapsedTime);
393393
}

0 commit comments

Comments
 (0)