From fa4d13c9bc60fd864747628bc6d50c924bc512ec Mon Sep 17 00:00:00 2001 From: vivek-kumar-2024 Date: Tue, 10 Jun 2025 00:27:11 -0700 Subject: [PATCH] Create RocketGuidanceSystem.java --- RocketGuidanceSystem.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 RocketGuidanceSystem.java 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()); + } + } +}