Closed tomvanwouwe1992 closed 6 years ago
May i have a question that how to get pneumatic parameters using Interpolation in GPOPS2? Like I have original data points of pneumatic parameters but i want to get specific pneumatic parameter with specific angle of attack and mach number~thank you
Hi @areusiriuses, you may want to use spline interpolations? See example here. Does that help?
@antoinefalisse thank you for your example, however i still have a question that how to use the result of the Interpolation?For example here is an equation of state: fx=cxqs. cx is given in the attachment. Then how can i get cx like when Ma is 0.7 and aoa is 1.5.
Becausse in GPOPS2 the state variables are column vectors and I cannot use this syntax to get cx : cx=interp2(x1,y1,z1,aoa,ma,'lineraest'); (where x1 y1 z1 are origin data points and are already given)
@antoinefalisse thank you for your example, however i still have a question that how to use the result of the Interpolation?For example here is an equation of state: fx=cx_q_s. cx is given in the attachment. Then how can i get cx like when Ma is 0.7 and aoa is 1.5.
Becausse in GPOPS2 the state variables are column vectors and I cannot use this syntax to get cx : cx=interp2(x1,y1,z1,aoa,ma,'lineraest'); (where x1 y1 z1 are origin data points and are already given)
supplementry explanation: if aoa and ma are column vectors then if I use cx=interp2(x1,y1,z1,aoa,ma,'lineraest');, cx is a matrix. Therefore I cannot use cx to get fx.
@areusiriuses, could you give me more detail about what you are trying to do exactly? Is your question related to using GPOPS in general or are you trying to use our piece of software for your own application?
@antoinefalisse Of course. I am working on my graduation project. And I want to use GPOPS to solve a trajectory optimization problem. The code is here and the problem lies in line 38 of the program named'biyeshejiContinuoustest' . In addition, the Aerodynamic parameters ( cx cy cm) are related to aoa and ma.
Ok, you should try to follow the example we provide in which we use a spline approximation and call the results within our continuous function. It worked for us.
@antoinefalisse thank you for examples~