Skip to content

Thrust_Disturbance: a body-fixed force at a point, with its torque (fourth of the force stack) - #248

Merged
nscheuer merged 8 commits into
2_2/updatefrom
feat/thrust-disturbance
Oct 26, 2026
Merged

nscheuer merged 8 commits into
2_2/updatefrom
feat/thrust-disturbance

Conversation

@patrickmckeen

Copy link
Copy Markdown
Collaborator

The problem

Prop_Disturbance models 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 on Prop_Disturbance:

  • force() returns the body-fixed thrust F₀ plus one noise sample per plant step (drawn in update(), the same pattern as the other disturbances, so nothing is drawn inside the integrator);
  • torque() returns (location − COM) × F, or zero when location is None, meaning the thrust acts through the centre of mass;
  • all attitude Jacobians and Hessians are zero because the force is body-fixed.

Prop_Disturbance is 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 on update() and held between updates; Satellite.update_errors drives the draw; the force and torque reach dist_forces, dist_torques and dynamics_core.

🤖 Generated with Claude Code

t and others added 7 commits October 26, 2026 15:49
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>
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Test Results

1 605 tests  +6   1 603 ✅ +6   2m 36s ⏱️ +51s
    1 suites ±0       2 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit e5a7740. ± Comparison against base commit f3b2a1e.

♻️ This comment has been updated with latest results.

Base automatically changed from feat/srp-force to 2_2/update October 26, 2026 22:00

@nscheuer nscheuer left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

lgtm!

@nscheuer
nscheuer merged commit ea0eeaf into 2_2/update Oct 26, 2026
3 checks passed
@nscheuer
nscheuer deleted the feat/thrust-disturbance branch October 26, 2026 22:07
@nscheuer nscheuer mentioned this pull request Oct 27, 2026
7 of 10 tasks
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.

2 participants