API Question ShiftCG

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,756
Reaction score
2,738
Points
203
Location
Dallas, TX
Do you know where you saw the aerodynamics lift/drag mentioned. I think for now if I can get the aerodynamics then the user can land the craft. Of course there is another shift cg

Thanks
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,662
Reaction score
2,382
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Do you know where you saw the aerodynamics lift/drag mentioned. I think for now if I can get the aerodynamics then the user can land the craft. Of course there is another shift cg

Thanks

Would need to look at my home computer, I have saved the interesting MSL documents on my NAS there.

The re-entry guidance algorithm is also not that complicated, there is a nice technical report about it and its performance until parachute deployment.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,756
Reaction score
2,738
Points
203
Location
Dallas, TX
Thanks
The re-entry guidance algorithm is also not that complicated, there is a nice technical report about it and its performance until parachute deployment.
For you for maybe not complicated for me YES!!!!:lol:

Any way We may put a beta of her out
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,662
Reaction score
2,382
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
For you for maybe not complicated for me YES!!!!:lol:

Of course. :lol:

But then, I also have it much simpler because the C++ language and the general software engineering tasks are absolutely no challenge for me anymore and I can dedicate more brain time to such problems... you'll get there as well.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,756
Reaction score
2,738
Points
203
Location
Dallas, TX
Looker forward to the document. Been adjusted the meshes/textures
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,295
Reaction score
3,266
Points
203
Location
Toulouse
He is eventually going to drive you into that : [ame="http://en.wikipedia.org/wiki/PID_controller"]http://en.wikipedia.org/wiki/PID_controller[/ame]

Have fun. ;)
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,756
Reaction score
2,738
Points
203
Location
Dallas, TX
Interesting. I guess. So how much the aerodynamics be set for the aoa?
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,756
Reaction score
2,738
Points
203
Location
Dallas, TX
ok. I have redone the airfoils. matching the orion re-entry. But I get no lift.
Code:
void VLiftCoeff(double aoa, double M, double Re, double *cl, double *cm, double *cd)
{
    static const double step = RAD*30.0;
    static const double istep = 1.0 / step;
    static const int nabsc = 13;
    //    Angle of attack                     -180    -150    -120    -90        -60        -30        0        30     60        90        120        150      180
    //    static const double CL[nabsc] = {    0,    -0.12,    -0.1,      0,      0,      0,    0,        0,      0,     0,        0.1,    0.12,    0};
    //    static const double CM[nabsc] = {    0,    0.0002,    0.0004,    0.0004,    0.0003,    0.0002,    0, -0.0002,-0.0003,-0.0004,-0.0004,-0.0002,    0};
    static const double CL[nabsc] = { 0, -0.12, -0.1, 0, 0, 0, 0, 0, 0, 0, 0.1, 0.12, 0 };
    static const double CM[nabsc] = { 0, -0.0002, -0.0004, -0.0004, -0.0003, -0.0002, 0, 0.0002, 0.0003, 0.0004, 0.0004, 0.0002, 0 };
    // lift and moment coefficients from -180 to 180 in 30 degree steps.

    aoa += PI;
    int idx = max(0, min(11, (int)(aoa*istep)));
    double d = aoa*istep - idx;
    *cl = CL[idx] + (CL[idx + 1] - CL[idx])*d;
    *cm = (CM[idx] + (CM[idx + 1] - CM[idx])*d) / 10;
    *cd = 0.25 + oapiGetInducedDrag(*cl, 1.27, 0.3);
}

// 2. horizontal lift component (vertical stabiliser and body)

void HLiftCoeff(double beta, double M, double Re, double *cl, double *cm, double *cd)
{
    static const double step = RAD * 30;
    static const double istep = 1.0 / step;
    static const int nabsc = 13;
    static const double CL[nabsc] = { 0, -0.1, -0.1, 0, 0, 0, 0, 0, 0, 0, 0.1, 0.1, 0 };

    beta += PI;
    int idx = max(0, min(11, (int)(beta*istep)));
    double d = beta*istep - idx;
    *cl = CL[idx] + (CL[idx + 1] - CL[idx])*d;
    *cm = 0.0;
    *cd = 0.25 + oapiGetInducedDrag(*cl, 1.27, 0.3);
}
Code:
CreateAirfoil(LIFT_VERTICAL, _V(0, -0.01, -0.1), VLiftCoeff, 5.5, 0, 1.27);
CreateAirfoil(LIFT_HORIZONTAL, _V(0, 0, 0.01), HLiftCoeff, 5.5, 0, 1.27);
 
Last edited:
Top