Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move craft capabilities into PhysicsState #101

Open
pmelanson opened this issue Jun 30, 2020 · 0 comments
Open

Move craft capabilities into PhysicsState #101

pmelanson opened this issue Jun 30, 2020 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@pmelanson
Copy link
Member

This issue is probably medium difficulty but is a good intro to the dark heart of the physics engine

Currently, the habitat engine's maximum thrust is defined in common.craft_capabilities. This is a bit hacky, because there is no clean way to transmit this info over the network as there is for every other piece of data in a PhysicsState (e.g. fuel is easily sent, but not the hab's max thrust).

Usually it doesn't matter because the hab's max thrust doesn't change, but when the compat client is running, the state of OrbitV engineering will change the habitat's max thrust. Currently, only the physics_server will know about this change in max thrust, but we also want to easily let the hab_flight client know about the change.

To do this, we should add something like hab_max_thrust and ayse_max_thrust to orbitx/orbitx.proto. Then, update all uses of craft_capabilities to use the PhysicsState. Probably also have to set default values of max_thrust somewhere, which will probably have to happen somewhere in the savefile loading code. Definitely we'll also have to change some stuff in physics/engine.py, for example using self._last_physical_state.hab_max_thrust. Also in data_structures.py, to expose hab_max_thrust.

If you want to take this issue on to get a better understanding of the physics engine, I foresee many questions and debugging, so don't hesitate to ask.

@pmelanson pmelanson added enhancement New feature or request good first issue Good for newcomers labels Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant