Skip to content

dev: physics & Geometry update - janky but it works#41

Merged
philiplinden merged 5 commits into
mainfrom
dev-2025-07-26
Jul 27, 2025
Merged

dev: physics & Geometry update - janky but it works#41
philiplinden merged 5 commits into
mainfrom
dev-2025-07-26

Conversation

@philiplinden

Copy link
Copy Markdown
Owner

This pull request introduces significant changes to the physics and runtime systems of the project, with a focus on consolidating force calculations, improving aerodynamic calculations, and removing unused runtime components. The key updates include unifying force-related modules, enhancing the geometry module for accurate projected area calculations, and removing the console REPL implementation.

Physics System Updates:

  • Consolidated force calculations into a single forces.rs file, integrating buoyancy, drag, and weight computations into a unified net_force system. This replaces the modular structure previously spread across buoyancy.rs, drag.rs, and weight.rs (crates/buoy-physics/src/forces.rs, [[1]](https://github.com/philiplinden/buoy/pull/41/files#diff-f8867830103957d9a58855caa64f1670ad066d36de86f6606081056f6dd7a028L1-L22), [[2]](https://github.com/philiplinden/buoy/pull/41/files#diff-e205931c78c7f0bb802df03dec6fcebbeb1effc4865354d85ce3fae26812033fL1-L20), [[3]](https://github.com/philiplinden/buoy/pull/41/files#diff-0e1bf8554a9ae4e910ff2e0c6fcd8112168d7de396114270e1e6c3a57381806dL1-L25), [[4]](https://github.com/philiplinden/buoy/pull/41/files#diff-c44725ea27b4911ac64181e3e73ad44cfcbc69e6e2e5652d66033a197ad08da6L1-L13)).
  • Added a DragCoefficient component and implemented aerodynamic drag force calculations based on projected area and velocity (crates/buoy-physics/src/forces.rs, [crates/buoy-physics/src/forces.rsR1-R92](https://github.com/philiplinden/buoy/pull/41/files#diff-c4009bef3ffcb157a2b30ab7f1a0540877198b047b5bc59805485095a375c68aR1-R92)).
  • Introduced a helper method GasSpecies::from_species_name for creating gas species from string inputs (crates/buoy-physics/src/ideal_gas.rs, [crates/buoy-physics/src/ideal_gas.rsR85-R92](https://github.com/philiplinden/buoy/pull/41/files#diff-74818c16f61d460c5f919ed47010a5d27b07ba403f0448f11ff07421689754d2R85-R92)).

Geometry Enhancements:

  • Extended the geometry module to support projected area calculations for various shapes (e.g., spheres, cuboids, cylinders) and convex hulls, enabling precise aerodynamic drag computations (crates/buoy-physics/src/geometry.rs, [[1]](https://github.com/philiplinden/buoy/pull/41/files#diff-ee9950feae77d2adf90b011d00d62ab49db500bfd1d64e3afbd64bc8eae7554dR4-R8), [[2]](https://github.com/philiplinden/buoy/pull/41/files#diff-ee9950feae77d2adf90b011d00d62ab49db500bfd1d64e3afbd64bc8eae7554dR28-R337)).

Runtime Simplifications:

  • Removed the REPL-based console system, including the ConsolePlugin and related repl.rs implementation, as it was no longer in use (crates/buoy-runtime/src/console/mod.rs, crates/buoy-runtime/src/console/repl.rs, [[1]](https://github.com/philiplinden/buoy/pull/41/files#diff-9c85aa247927bacdaeb64c46629e7527ac433e5877d4eac0914fdb156921953dL1-L11), [[2]](https://github.com/philiplinden/buoy/pull/41/files#diff-7c90a5426c6663d39e55b60df674f0c39a45e3dad527b56e6b3d5e7ffa1a8f1eL1-L69)).
  • Cleaned up references to the removed console module from the runtime library (crates/buoy-runtime/src/lib.rs, [crates/buoy-runtime/src/lib.rsL5-L11](https://github.com/philiplinden/buoy/pull/41/files#diff-27835be099457e898e4247f389f05ea2e63c5bf955a157f9dd9856eded0149e4L5-L11)).

Configuration Adjustments:

  • Updated the scenario.ron configuration file to adjust the balloon_mass value and add a new drag_coefficient property for improved simulation accuracy (assets/configs/scenario.ron, [assets/configs/scenario.ronL2-R6](https://github.com/philiplinden/buoy/pull/41/files#diff-8f3ae18da91bbc4ecb73738c3b8eaebffc627fdcc019bdc7838bc3836d8c3414L2-R6)).

@philiplinden
philiplinden merged commit 7354de7 into main Jul 27, 2025
2 of 3 checks passed
@philiplinden
philiplinden deleted the dev-2025-07-26 branch July 27, 2025 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant