-
Notifications
You must be signed in to change notification settings - Fork 0
Add weathercocking model to 3-DOF flight simulation for improved lateral motion #4
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
base: enh/3-dof-simulation
Are you sure you want to change the base?
Add weathercocking model to 3-DOF flight simulation for improved lateral motion #4
Conversation
…otion Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>
Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>
|
@copilot add a bella lui based 3 dof example file to test out and compare 6 dof and 3 dof parameters |
Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>
Added |
|
@copilot can this comparison .py file be replaced with .ipynb file so that you can run it and save to github to view from github? |
Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>
Replaced the |
|
@copilot The 3 dof simulations should use point mass rocket and point mass motors please! |
Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>
Updated the notebook in commit e7af937. The 3-DOF simulations now use |
|
@copilot I want the simulation results comparison to compare apogee, apogee time, max speed, max acceleration, impact/landing point x and impact/landing point y. Why is the out of rail velocity different in every case? |
Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>
Updated the comparison table in commit 18ed788 to show: Apogee, Apogee Time, Max Speed, Max Acceleration, Impact X, and Impact Y. Also added parachutes to both rockets for proper landing simulation. Regarding the out of rail velocity differences: This occurred because the 6-DOF uses the full Bella Lui rocket (with SolidMotor, full inertia, and aerodynamic surfaces) while the 3-DOF simulations use PointMassRocket (with PointMassMotor, no inertia). The different mass properties and aerodynamic characteristics result in different rail exit velocities. I've removed Out of Rail Velocity from the comparison as requested. |
|
@copilot add run time of flight simulations to all 4 cases - one 6 dof and three 3 dof sims so we can compare which is fatster. |
Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>
Added simulation runtime measurements for all 4 flight cases in commit fdfd56e. The comparison table now shows:
|
|
@copilot can we also add a .rst file to users documents folder to show case 3 dof vs 6 dof results and waether cocking effects from the above created ipynb file? |
Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>
Updated
|
|
@copilot i do not want to add comparison ipynb file to rst file. instead i want to show results from it directly over there. can we show the comparison table and 3d trajectory plot directly? |
Co-authored-by: aZira371 <99824864+aZira371@users.noreply.github.com>
Updated
Both are generated directly using |
Pull request type
Checklist
black rocketpy/ tests/) has passed locallypytest tests -m slow --runslow) have passed locallyCHANGELOG.mdhas been updated (if relevant)Current behavior
The 3-DOF flight simulation keeps a fixed attitude throughout the flight. The quaternion derivatives are always zero, meaning the body axis direction never evolves despite changes in the relative wind direction.
New behavior
Introduces an evolving unit direction vector for the body axis using a quasi-static weathercocking model. The rocket's attitude gradually aligns toward the relative wind direction.
Changes:
weathercock_coeffparameter inFlight.__init__(default: 1.0)u_dot_generalized_3dofto compute quaternion derivatives proportional to misalignment with relative windweathercock_coeff * sin(misalignment_angle)docs/examples/bella_lui_3dof_vs_6dof_comparison.ipynbcomparing 6-DOF and 3-DOF simulationsdocs/user/three_dof_simulation.rstwith embedded comparison resultsUsage:
Set
weathercock_coeff=0to disable weathercocking (original fixed-attitude behavior).Breaking change
Additional information
The model computes the rotation needed to align the body z-axis with the negative freestream velocity vector, then applies proportional angular velocity to evolve the quaternions. This keeps 3-DOF translational dynamics while adding simple attitude evolution for improved lateral motion fidelity.
New Example Notebook:
Added
docs/examples/bella_lui_3dof_vs_6dof_comparison.ipynbthat:PointMassRocketandPointMassMotor)Documentation Updates:
Updated
docs/user/three_dof_simulation.rstwith:weathercock_coeffparameterjupyter-executeblocksOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.