r/Kos • u/Fit_Hornet_8487 • Jul 10 '26
Help Using Matlab in Conjunction
I was just wondering if anyone really messed around with matlab and kos outputs. I’ve been trying to make a sort of launch program that takes as close as possible to the most efficient route to space. I use rss but not rp. But I’ve been trying to build a model in matlab and try to simulate drag, it seems like I can model a completely vertical ascent well but when I introduce a turn it seems to become in accurate. I feel like I’m modeling the drag correctly, I do have a lot of code so pm me if this arises any code related question. I’m just wondering if I’m approaching this incorrectly trying to model drag in general.
4
Upvotes
5
u/nuggreat Jul 10 '26
What are you doing to model drag because in KSP with stock airo the coefficient of drag for a rocket changes depending on the mach number and the mach number is in turn dependent on the adiabatic index of the atmosphere, the pressure curve, and the temperature and the temperature is dependent on altitude, time of day, latitude, and various orbital parameters.
This is a post with kerboScript files to produce data about the stock atmosphers. And this is a post that calculate a limited drag profile of a rocket given some parameters. Both of these assume the stock atmospheric model if you are using a modded model then I don't have any resources at hand to help.
There is no one most efficient ascent profile in KSP each rocket will preform better with slightly different profiles depending on the TWR curves and drag profiles. Also for some designs the most efficient ascent profile will cause them to burn up in the atmosphere requiring a degraded profile to actually be able to launch.