diff --git a/RocketGuidanceSystem.java b/RocketGuidanceSystem.java new file mode 100644 index 0000000..9bc83dd --- /dev/null +++ b/RocketGuidanceSystem.java @@ -0,0 +1,17 @@ +public class RocketGuidanceSystem { + public static void processVelocity(double horizontalVelocity) { + short velocityData = (short) horizontalVelocity; + + System.out.println("Horizontal velocity (converted): " + velocityData); + + try { + if (velocityData < 0) { + throw new Exception("Invalid velocity data received!"); + } + // Proceed with guidance logic... + System.out.println("Guidance calculations proceed."); + } catch (Exception e) { + System.out.println("Guidance system shutdown: " + e.getMessage()); + } + } +}