waterloo-rocketry / or-airbrake-plugin

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

Update TrajectoryPrediction.java #2

Closed ManavToor closed 3 months ago

ManavToor commented 4 months ago

Adding better drag calculations by looking up Ansys results


This change is Reviewable

Joe-Joe-Joe-Joe commented 4 months ago

does this mean that drag is linear with air density?

it is approximately linear within our flight regime

Joe-Joe-Joe-Joe commented 3 months ago

if we're doing this then shouldn't everything be offset?

The reason I did that was for cases where a floating point error could cause undefined behaviour. Hope this will be addressed in the interpolation rewrite. Unfortunately representing extension amt as a float and then doing comparison necessitates this sort of thing.

can we maybe add a doc comment about this

Sure. Can you do that? You seem to know what you want.

this is in^2?

Nope. Fixed.

Joe-Joe-Joe-Joe commented 3 months ago

Re: discussions on changing arrays to objects - I 100% agree. I assume that is fairly trivial for one of you to do?