From b626224c3041bad255a5f859f384a03833fbc202 Mon Sep 17 00:00:00 2001 From: John Ericksen Date: Thu, 15 Feb 2024 09:34:27 -0700 Subject: [PATCH] Don't allow drones to go underground --- src/main/java/edu/unm/dragonfly/Drone.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/edu/unm/dragonfly/Drone.java b/src/main/java/edu/unm/dragonfly/Drone.java index 98af7c6..dda930b 100644 --- a/src/main/java/edu/unm/dragonfly/Drone.java +++ b/src/main/java/edu/unm/dragonfly/Drone.java @@ -233,7 +233,7 @@ public static class LatLonRelativeAltitude { public LatLonRelativeAltitude(double latitude, double longitude, double relativeAltitude) { this.latitude = latitude; this.longitude = longitude; - this.relativeAltitude = relativeAltitude; + this.relativeAltitude = relativeAltitude > 0 ? relativeAltitude : 0; } public double getLatitude() {