Johan2011
Active member
Hello, how i can export a file DLL?
Im Using Dev C++
// ==============================================================
// ORBITER MODULE: Atlantis
// Part of the ORBITER SDK
// Copyright (C) 2001-2003 Martin Schweiger
// All rights reserved
//
// Atlantis.cpp
// Reference implementation of Atlantis (Space Shuttle) vessel
// class module
//
// Lift and Drag Modifications to match Shuttle Cue Cards
// This should be inserted in existing shuttle modules
// ==============================================================
void VLiftCoeff (double aoa, double M, double Re, double *cl, double *cm, double *cd)
{
static const double step = RAD*15.0;
static const double istep = 1.0/step;
static const int nabsc = 25;
// -180 -165 -150 -135 -120 -105 -90 -75.0 -60.0 -45.0 -30.0 -15.0 0.0 15.0 30.0 45.0 60.0 75.0 90.0 105.0 120.0 135.0 150.0 165.0 180.0
static const double CL[nabsc] = {0.1, 0.17, 0.2, 0.2, 0.17, 0.1, 0, -0.11, -0.24, -0.38, -0.5, -0.5, -0.02, 0.6355, 0.63, 0.46, 0.28, 0.13, 0.0, -0.16, -0.26, -0.29, -0.24, -0.1, 0.1};
static const double CM[nabsc] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.002, 0.004, 0.0025,0.0012, 0,-0.0012,-0.0007, 0, 0, 0, 0, 0, 0, 0, 0, 0};
// lift and moment coefficients from -180 to 180 in 15 degree steps.
// This uses a documented lift slope of 0.0437/deg, everything else is rather ad-hoc
// change for drag increase at high Mach:
// Subsonic Equivalents
double Cl0, Cl1, Cd0, Cd1, Cd2;
if(M>=5.0) {
Cl0 = -0.207040;
Cl1 = 1.675600;
Cd0 = 0.078540;
Cd1 = -0.352900;
Cd2 = 2.039960;
*cl = Cl0 + Cl1*aoa;
*cd = Cd0 + Cd1*aoa + Cd2*aoa* aoa;
}
aoa += PI;
int idx = max (0, min (23, (int)(aoa*istep)));
double d = aoa*istep - idx;
*cm = (CM[idx] + (CM[idx+1]-CM[idx])*d);
if(M<1.25) {
*cl = CL[idx] + (CL[idx+1]-CL[idx])*d;
*cd = 0.05 + oapiGetInducedDrag (*cl, 2.266, 0.75);
}
else if(M<5.0) {
*cl = CL[idx] + (CL[idx+1]-CL[idx])*d;
*cd = 0.09 + oapiGetInducedDrag (*cl, 2.266, 0.5);
// *cd = 0.06 + oapiGetInducedDrag (*cl, 2.266, 0.6);
}
}