Repository navigation
Thrust_Disturbance: a body-fixed force at a point, with its torque (fourth of the force stack) - #248
Merged
Merged
Conversation
Disturbance gains force(), force_qjac() and force_qqhess() that return zeros, mirroring the torque trio, so torque-only disturbances need no change. Satellite.dist_forces() sums the body-frame forces over the registered disturbances using the same sat/no-sat call convention as dist_torques(). The attitude dynamics are untouched; the force is for orbit propagation and inspection. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The analytic *_qjac/*_qqhess methods differentiate with respect to the four raw quaternion components. The existing fd_quat_jac/fd_quat_hess renormalise the perturbed quaternion, which drops the radial part of the derivative and only agrees when the output is small enough to hide inside the tolerance. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Taken from 2_2/disturbance_forces_clean (#240), drag portion only.
…rences Adds fd_quat_jac_raw/fd_quat_hess_raw helpers that do not renormalise the perturbed quaternion; the analytic Jacobians differentiate with respect to the raw components, so the renormalising helpers only agree when the output is small enough to hide inside the tolerance. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…rbance Taken from 2_2/disturbance_forces_clean (#240), SRP portion only.
…ences Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A thrust vector applied at a body-frame location gives both the force on the centre of mass and the torque (location - COM) x F from one model. Prop_Disturbance stays as the torque-only model. Attitude derivatives are zero because the force is body-fixed; noise is drawn once per plant step in update(), as for the other disturbances. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
Prop_Disturbancemodels propulsion as a torque with no force. For a thruster, a leak or an outgassing vent the physical quantity is a force at a point, and the torque follows from where it acts. Keeping those consistent by hand is error-prone, and there is no way to give the orbit the thrust.What this adds
A new class,
Thrust_Disturbance(force_nominal, location=None, noise=None), rather than more options onProp_Disturbance:force()returns the body-fixed thrust F₀ plus one noise sample per plant step (drawn inupdate(), the same pattern as the other disturbances, so nothing is drawn inside the integrator);torque()returns (location − COM) × F, or zero whenlocationisNone, meaning the thrust acts through the centre of mass;Prop_Disturbanceis unchanged and stays the right choice when only a torque is known.Tests
testing/test_disturbances/test_thrust_disturbance.py: force equals the nominal thrust and a through-COM thrust gives no torque; torque equals the lever arm about the COM crossed with the force; nothing depends on attitude; noise is drawn onupdate()and held between updates;Satellite.update_errorsdrives the draw; the force and torque reachdist_forces,dist_torquesanddynamics_core.🤖 Generated with Claude Code