OCESS/orbitx

Fill in placeholder gui fields

Closed this issue ยท 10 comments

The periapsis, apoapsis, horizontal speed, and vertical speeds in the GUI are just placeholder "100" values right now. Someone who knows physics n stuff should change the relevant functions in flight_gui.py (like _periapsis, _h_speed) so that they give correct information.

Hey @pmelanson! I could help with calculating the periapsis and apoapsis of the celestial bodies. I would have to do a little more research and look into the mathematics around obtaining the centripetal and tangential speed w.r.t. the habitat. May I work on this issue?

Hey @schezfaz! That would be amazing!

Someone else has already merged code that sort of deals with this, on this repository's gui_fields branch. However, I've noticed that their code gives incorrect results.

I think what I'll do is make a test case in test.py that checks the four functions of interest (_periapsis, _apoapsis, etc) give correct results.

In the next couple days, I'll add this test case, and then I'll reply to this thread again. Then, all you need to do is modify the existing code to make the tests pass!

Does this sound good? The wikipedia article on apoapsis/periapsis will be helpful.

Sure thing! Meanwhile, I'll go through the codebase and get myself familiar with it. Sounds perfect. Do let me know when! ๐Ÿ˜Š

Hello again! I just pushed a commit to the gui_fields branch that makes your life easier. Basically, the only files you'll have to worry about are calculate.py (a new file) and test.py, specifically the test case at the bottom.

The test case is currently failing, and it uses functions from calculate.py. We use numpy for our vector algebra, and the protos.Entity object definition is defined in orbitx.proto.

Once you run the setup instructions in README.md, you can run test.py using the command I wrote in a comment at the bottom of test.py.

The apoapsis, periapsis, eccentricity, and semimajor_axis functions in calculate.py can all be researched from their Wikipedia articles, and the radial_speed and tangent_speed functions are explained here: https://physics.stackexchange.com/questions/349811/orbital-velocity-orbital-speed-tangential-velocity

Hey Patrick! I'll begin working on this issue in the next 24 hours. Setting up the environment for now. Thankyou so much for the references, will keep you posted if any doubts arise!

Great! Good luck, and feel free to comment with any questions (e.g. setup issues, so that I can modify README.md with better instructions)

Currently working on the ubuntu OS, had no issues while setting the environment up! However, for contributors working with windows, it would be ideal to have an equivalent of the make command for cmd, as the windows command line does not recognise this command. All good otherwise!

Also, loving the documentation and the refactoring. Thankyou for making this project so easy to work with!

Hey @schezfaz, hopefully it's going well! Is there anything you would like help with?

Hey @pmelanson! I'd like to apologise, I am so sorry for the delay. With internal exams and presentation week, I could not find the time to properly sit and work on the issue I had taken up. I did spend a good amount hours on it, however I was not able to make any headway and get ALL the tests to pass correctly. I am genuinely genuinely very sorry and apologise for the inconvience and delay I may have caused. Been following the Orbitx project closely, looking forward to working with you and making some meaningful contributions in the near future! Apologies once again.

Totally alright @schezfaz ! If you want, you could submit any work you have so we can merge this branch, but if you don't have time to push what you have that's alright.

Good luck on exams!