Skip to content

[AV-330] implement simple parachute simulation#23

Open
kenneth-tochihara wants to merge 14 commits into
masterfrom
feature/AV-330-implement-simple-parachute-simulation
Open

[AV-330] implement simple parachute simulation#23
kenneth-tochihara wants to merge 14 commits into
masterfrom
feature/AV-330-implement-simple-parachute-simulation

Conversation

@kenneth-tochihara
Copy link
Copy Markdown
Contributor

Basic parachute simulations. Some issues rebasing from Eigen commit so some changes are carried over from those commits. Verified with differing altitudes and parachute areas. Works good for now.

Copy link
Copy Markdown
Contributor

@NPIPHI NPIPHI left a comment

Choose a reason for hiding this comment

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

Core logic and graphs look good. I think organizationally most of the parachute logic should be moved to rocket.cpp or into a class called Parachute.

Physics engine is also only setup for a rocket flying straight through the air, so there needs to be some modifications past just increasing the coefficient of drag. I would extract the component of forwardeuler that calculates drag forces into a member function of rocket, then that function on rocket could decide how to calculate drag based on parachute status.

Comment thread src/Simulation.cpp Outdated
Comment thread src/Simulation.cpp Outdated

// simulation completion criteria
if ((r_dot.z() < -3.0) && !drogue_deploy) {
std::cout << "Drogue: " << std::to_string(tStamp_) << " s"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This info should be logged with the sim_log->info function, see the logging near the bottom of the function for how it works

Comment thread src/Simulation.cpp Outdated
Comment thread src/Simulation.cpp Outdated
Comment thread src/Simulation.cpp Outdated
Copy link
Copy Markdown
Contributor

@AyberkY AyberkY left a comment

Choose a reason for hiding this comment

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

I feel that the current approach of just increasing CD isn't quite right. You can see in the plots that it does some weird stuff soon after apogee. It also starts spinning uncontrollably which is fun to watch in the animation lol.

image

I think a better approach would be to have a march_step_descent() function that just treats the rocket as a point mass during the descent phase. The Simulation class would then decide to switch between _ascent() and _descent(). At this point, we could just freeze the rockets orientation and treat the physics as a point mass with a parachute.

@kenneth-tochihara
Copy link
Copy Markdown
Contributor Author

I think creating ascent/descent functions is a good idea. I think I'll incorporate Nick's changes and then create a new ticket to tackle that issue

@AyberkY AyberkY added the work-in-progress *furious coding* label Jan 31, 2022
@AyberkY AyberkY changed the title Feature/av 330 implement simple parachute simulation [AV-330] implement simple parachute simulation Jan 31, 2022
@NPIPHI
Copy link
Copy Markdown
Contributor

NPIPHI commented Jan 31, 2022

Still a WIP, I moved most logic into a new parachute class and the rocket class, some changes need to be made to runge-kutta to properly change the physics at different differentiation points

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

work-in-progress *furious coding*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants