waterloo-rocketry / or-airbrake-plugin

Rocket airbrakes simulation using OpenRocket and Ansys CFD
1 stars 0 forks source link

Generalize linear interpolator to compute values based on an arbitrary function and context #7

Closed patrick-gu closed 2 months ago

patrick-gu commented 4 months ago

The idea here is that we can compute drag values for each airbrake extension amount based on the context, then use linear interpolation to compute the drag amount for some specific airbrake extension.

It's not particularly good to have excessive abstraction, but I think this is reasonable for this case, so that the linear interpolation code can be logically separated from the code for computing drag force as a function of velocity and altitude.

Closes #3.


This change is Reviewable

celery6 commented 4 months ago

Seems like Armaan and Richard are looking into making a 3-var eq that would remove the need for linear interpolation. https://waterloorocketry.slack.com/archives/C05EUQLFP4J/p1709656065814399

How about we put this pr on hold till they look into that?

Joe-Joe-Joe-Joe commented 3 months ago

No comments on the class structure. You guys go wild.

How about we put this pr on hold till they look into that?

If it wasn't clear, we did look into that, and the drag model that was merged from #2 is the one we are planning to use for the rest of this design cycle. Which is to say, interpolate drag from velocity and fixed extension, then correction factors for true area and altitude. So yes, 3 vars, but no, no analytical model (just velocity-drag level curves)