From f2ad9b249ac06a5aef938986650ba7e04cb6e41d Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Sat, 14 May 2022 10:16:59 -0400 Subject: [PATCH] add time of flight info to gooey --- src/gooey.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gooey.cpp b/src/gooey.cpp index cfbeb23..3051ad1 100644 --- a/src/gooey.cpp +++ b/src/gooey.cpp @@ -152,6 +152,12 @@ void drawSystemWindow(system_2body& sys) ImGui::Text("h, angular momentum: %f", sys.h); ImGui::Text("r_apoapsis: %f", sys.r_apoapsis); ImGui::Text("r_periapsis: %f", sys.r_periapsis); + // FIXME: not ideal to call into orbit interface from the gooey + double tof_apoapse = orbitGetTimeOfFlight(sys, sys.sat.theta, M_PI); + ImGui::Text("time to apoapsis: %.2f seconds", tof_apoapse); + double tof_periapse = + orbitGetTimeOfFlight(sys, sys.sat.theta, 2 * M_PI); + ImGui::Text("time to periapsis: %.2f seconds", tof_periapse); ImGui::Dummy(V_SPACER); } }