Browse Source

add time of flight info to gooey

main
cinnaboot 4 years ago
parent
commit
f2ad9b249a
  1. 6
      src/gooey.cpp

6
src/gooey.cpp

@ -152,6 +152,12 @@ void drawSystemWindow(system_2body& sys)
ImGui::Text("h, angular momentum: %f", sys.h); ImGui::Text("h, angular momentum: %f", sys.h);
ImGui::Text("r_apoapsis: %f", sys.r_apoapsis); ImGui::Text("r_apoapsis: %f", sys.r_apoapsis);
ImGui::Text("r_periapsis: %f", sys.r_periapsis); 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); ImGui::Dummy(V_SPACER);
} }
} }

Loading…
Cancel
Save