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

Task/orbits and trajectories #32

Merged
merged 73 commits into from
Nov 17, 2024
Merged

Conversation

Katniss218
Copy link
Owner

Objects follow 'trajectories', and the changes to the objects (e.g. engines thrusting) can also be back-fed into the trajectories, updating them.

"Reference frame transforms" and "physics transforms" now fully encapsulate the unity rigidbody/transform components and work seamlessly with scene reference frame switches, so that mod writers don't have to worry about that.
There's several different flavors/types of them, and they are all 'combined' into a single component that contains both the reference frame and physics parts.

Lots of API changes and tweaks to make the code clearer.

Moved some stuff around to better align with the structure of the project

…added a proper manager for the controlframe as well. Inertial reference frames (scene linear velocity) appear to work now
…mething is pinned to them. Not fixed yet though.
…s that are pinned to some other object to follow the target without desyncing).
…pace even for a second because that loses precision.
…ges. FIxed KinematicPhysicsTransform's scene position/rotation/etc being wrong. Kinematic physics transforms are now simulated in absolute space exclusively, because they don't respond to collisions.
…erence frame transform on demand. The setter is now private. Just replace the component and it'll work
…ms and their scene and absolute values, but something is still broken
…ausing its position to move in certain update orders
…ation. Fixed fast moving active scene object appearing offset from scene origin by `velocity * deltatime`. Fixed pinned reference fransform appearing in the wrong place when celestialbody is moving very fast.
…orbital elements from state vectors. Fixed tests comparing acceleration that had unwanted zero as expected value
… (like a dropped tank), fixed another part of keplerian from state vector calculation (seems to be fully working now in all quadrants?)
…turned AbsolutePosition of kinematic transform not being correct if the frmae movement matches the transform movement, although, it's a bit of a hack.
…s, but doesn't work at the start due to the vessel being sent far away and its position being clamped
…oth in scene and absolute space, depending on if current scene pos/vel is precise enough for simulation in scene space (prevents vessels far away from scene origin from truncating their absolute positions). Fixed objects pinned to rotating planets not calculating their velocities correctly.
…ybrid transform, added more precise values of 1 radian to hybrid and kinematic transforms (in case there is available precision beyond 12 sig digits). clight code cleanup
…AtUT for non-inertial frames, cleanup, added a getter for the current non-inertial frame of a celestialbody
…o an extension class for the reference frame transform itself. Vessels now use the tangential velocity when separating (likely physically incorrectly still, but it's better than not using it)
…e origin ('physics range'). Reworked the moments of inertia API of physicstransform
Copy link
Collaborator

@Epacik Epacik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

…de, comment cleanup, clarified a couple things
@Katniss218 Katniss218 merged commit 417c402 into master Nov 17, 2024
@Katniss218 Katniss218 deleted the task/orbits_and_trajectories branch November 17, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants