Skip to content

Conversation

@juan-g-bonilla
Copy link
Contributor

@juan-g-bonilla juan-g-bonilla commented Dec 11, 2025

Description

This PR adds a reusable aerodynamic drag model for MuJoCo-based dynamics and a dedicated geometry payload to describe cannonball drag parameters.

  • DragGeometryMsgPayload

    • New C payload DragGeometryMsgPayload that packages basic drag geometry:
      • projectedArea [m^2] projected area in the flow direction.
      • dragCoeff [-] nondimensional drag coefficient.
      • r_CP_S[3] [m] center of pressure position relative to the site frame origin, expressed in the site frame.
  • AerodynamicDrag model

    • New AerodynamicDrag SysModel that computes drag force and torque at a MuJoCo site.
    • Inputs:
      • dragGeometryInMsg (DragGeometryMsgPayload) for geometry and coefficient.
      • atmoDensInMsg (AtmoPropsMsgPayload) for local atmospheric density.
      • referenceFrameStateInMsg (SCStatesMsgPayload) for the kinematics of the site reference frame.
    • Outputs:
      • forceOutMsg (ForceAtSiteMsgPayload) drag force in the site frame.
      • torqueOutMsg (TorqueAtSiteMsgPayload) drag torque in the site frame.
    • Implementation details:
      • Uses the center of pressure offset r_CP_S and the site velocity in the site frame to compute:
        • F_S = -0.5 * rho * v^2 * C_D * A * v_hat_S
        • T_S = r_CP_S × F_S
      • If the site speed is numerically near zero, publishes zero force and torque and returns early.
      • Logs and throws descriptive errors in Reset if any required input message is not linked.

Verification

Added two tests: one, simple verification that the drag equation is right. Second, a test that replicates a test for the existign drag dynamic effector on an Earth orbit.

Documentation

Updated release notes and all methods have extensive doxygen comments. A scenario using this new model will be added through #1195.

Future work

Potentially add lift and torque coefficients. Include scenario using this model.

@juan-g-bonilla juan-g-bonilla self-assigned this Dec 11, 2025
@juan-g-bonilla juan-g-bonilla added the enhancement New feature or request label Dec 11, 2025
@juan-g-bonilla juan-g-bonilla moved this to 🏗 In progress in Basilisk Dec 11, 2025
@juan-g-bonilla juan-g-bonilla force-pushed the feature/1192-aerodrag branch 2 times, most recently from e75874c to 28d381b Compare December 11, 2025 07:11
@juan-g-bonilla juan-g-bonilla marked this pull request as ready for review December 11, 2025 15:41
@juan-g-bonilla juan-g-bonilla requested a review from a team as a code owner December 11, 2025 15:41
@juan-g-bonilla juan-g-bonilla moved this from 🏗 In progress to 👀 In review in Basilisk Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

Add aerodynamic drag model for MuJoCo dynamics

2 participants