The Computer is 2 years old. using visual studio 2013 for coding
I got screen Hunter and got some more images of missing mesh parts.
Orbiter is most of the time a classic "garbage in - crash out" application (though it tends to garbage in-garbage out). bad alloc could also suggest a rapid memory leak in your application. You constantly request new entities, without freeing them then. Orbiter is still a 32 bit application, so you can't expect it to have more than 4GB flat memory.
Another tester gets a runtime error referencing transXVSOP87(B) Neptune: Precision 1e-006, Terms 391/2024
Finished initialising world
Module LANDER100C.dll ........ [Build 160609, API 100830]
---------------------------------------------------------------
>>> WARNING: Obsolete API function used: VESSEL::SetBankMomentScale
At least one active module is accessing an obsolete interface function.
Addons which rely on obsolete functions may not be compatible with
future versions of Orbiter.
---------------------------------------------------------------
Module UMmu.dll .............. [Build 140111, API 100830]
Finished initialising status
Finished initialising camera
Finished initialising panels
Finished setting up render state
SetSize(11);
SetEmptyMass(11000.0);
SetCW(0.3, 0.3, 0.6, 0.9);
SetWingAspect(1.7);
SetWingEffectiveness(2.5);
SetCrossSections(_V(71.59, 206.57, 50.58));
SetRotDrag(_V(3.5, 3.5, 3.5));
if (GetFlightModel() >= 1) {
SetPitchMomentScale(1e-4);
SetBankMomentScale(1e-4);
}
SetPMI(_V(32.49, 38.14, 23.67));
SetTrimScale(0.08);
SetCameraOffset(_V(0, 3, 10.1));
SetTouchdownPoints(_V(0, -.003, 5.7), _V(-3.448, -.003, -5.0), _V(3.448, -.003, -5.0));;
CreateAirfoil(LIFT_VERTICAL, _V(0, 0, 0), Lander_MomentCoeff, 8, 140, 0.1);
void Lander_MomentCoeff(double aoa, double M, double Re, double *cl, double *cm, double *cd)
{
int i;
const int nabsc = 7;
static const double AOA[nabsc] = { -180 * RAD, -90 * RAD, -30 * RAD, 0 * RAD, 60 * RAD, 90 * RAD, 180 * RAD };
static const double CL[nabsc] = { 0, 0, -0.004, 0, 0.008, 0, 0 };
static const double CM[nabsc] = { 0, 0, 0.0014, 0, -0.0012, 0, 0 };
for (i = 0; i < nabsc - 1 && AOA[i + 1] < aoa; i++);
double f = (aoa - AOA[i]) / (AOA[i + 1] - AOA[i]);
*cl = CL[i] + (CL[i + 1] - CL[i]) * f; // aoa-dependent lift coefficient
*cm = CM[i] + (CM[i + 1] - CM[i]) * f; // aoa-dependent moment coefficient
double saoa = sin(aoa);
double pd = 0.045 + 0.4*saoa*saoa; // profile drag
*cd = pd + oapiGetInducedDrag(*cl, 0.1, 0.7) + oapiGetWaveDrag(M, 0.75, 1.0, 1.1, 0.04);
// profile drag + (lift-)induced drag + transonic/supersonic wave (compressibility) drag
}
CARGO1 = CreateAttachment(false, _V(0, -20.2, 1.12), _V(0, -1, 0), _V(0, 0, -1), "CARGO1");
CARGO2 = CreateAttachment(false, _V(0, -21.75, 1.12), _V(0, -1, 0), _V(0, 0, -1), "CARGO2");
CARGO3 = CreateAttachment(false, _V(-17.7, -10.15, 1.12), _V(-.866, -.5, 0), _V(0, 0, -1), "CARGO3");//-17.7 -10.15 1.12 -.866 -.5 0
CARGO4 = CreateAttachment(false, _V(-19.2, -11.0, 1.12), _V(-.866, -.5, 0), _V(0, 0, -1), "CARGO4");//-19.2 -11.0 1.12
CARGO5 = CreateAttachment(false, _V(-20.3, 0, 1.12), _V(-1, 0, 0), _V(0, 0, -1), "CARGO5");
CARGO6 = CreateAttachment(false, _V(-21.8, 0, 1.12), _V(-1, 0, 0), _V(0, 0, -1), "CARGO6");
CARGO7 = CreateAttachment(false, _V(-17.7, 10.15, 1.12), _V(-.866, .5, 0), _V(0, 0, -1), "CARGO7");
CARGO8 = CreateAttachment(false, _V(-19.2, 11.0, 1.12), _V(-.866, .5, 0), _V(0, 0, -1), "CARGO8");
CARGO9 = CreateAttachment(false, _V(0, 20.2, 1.12), _V(0, 1, 0), _V(0, 0, -1), "CARGO9");
CARGO10 = CreateAttachment(false, _V(0, 21.75, 1.12), _V(0, 1, 0), _V(0, 0, -1), "CARGO10");
CARGO11 = CreateAttachment(false, _V(17.7, 10.15, 1.12), _V(.866, .5, 0), _V(0, 0, -1), "CARGO11");
CARGO12 = CreateAttachment(false, _V(19.2, 11.0, 1.12), _V(.866, .5, 0), _V(0, 0, -1), "CARGO12");
CARGO13 = CreateAttachment(false, _V(20.3, 0, 1.12), _V(1, 0, 0), _V(0, 0, -1), "CARGO13");
CARGO14 = CreateAttachment(false, _V(21.8, 0, 1.12), _V(1, 0, 0), _V(0, 0, -1), "CARGO14");
CARGO15 = CreateAttachment(false, _V(17.7, -10.15, 1.12), _V(.866, -.5, 0), _V(0, 0, -1), "CARGO15");
CARGO16 = CreateAttachment(false, _V(19.2, -11.0, 1.12), _V(.866, -.5, 0), _V(0, 0, -1), "CARGO16");
P 0 -1.67 0 0 0 -1 0 1 0 POD
if (PODSel != PODSel_last_drawn){
PODSel_last_drawn = PODSel;
oapiVCTriggerRedrawArea(0, AID_FUELSTATUS);
}
void TESTVC::RedrawPanel_Fuelstatus(SURFHANDLE surf, int part)
{
//SURFHANDLE const tex3 = oapiGetTextureHandle(meshhg_VC,5 );
char cbuf[20];
HDC hDC = oapiGetDC(surf);
level2 = GetPropellantMass(tank);
SelectObject(hDC, g_Param.hBrush[3]);//green box
level3 = ((level2 / FUELMASS)*237);
Rectangle(hDC, 110, 34, (int)(110.0 + level3), 75); //fuel
//THRUST
level = GetThrusterLevel(th_main[0]);
//double level2 = GetPropellantMass(tank);
SelectObject(hDC, g_Param.hBrush[3]);//green box
Rectangle(hDC, 114, 111, (int)(114 + level * (346 - 114)), 160);//thrust
//POD
SetTextColor(hDC, RGB(0, 153, 0));
SetTextAlign(hDC, TA_LEFT);
SetBkMode(hDC, TRANSPARENT);
SelectObject(hDC, g_Param.hFont[2]);
if (PODSel == 1) {
sprintf(cbuf, "POD 1 Selected", 14);
TextOut(hDC, 144, 400, cbuf, strlen(cbuf));
}
now if I can fix the retrigger vc issue
/**
* \brief Triggers a redraw notification for a virtual cockpit area.
* \param vc_id virtual cockpit identifier
* \param area_id area identifier (as specified during area registration)
* \note This function triggers a call to the VESSEL2::ovcVCRedrawEvent() callback function in the vessel module.
* \note The redraw notification is normally only sent if vc_id is equal to the currently
* active virtual cockpit position (>=0). To invoke the redraw notification
* independent of the currently active position, set vc_id to -1.
*/
OAPIFUNC void oapiVCTriggerRedrawArea (int vc_id, int area_id);
vc fixed. Now i am bit confused on the attachments. the the cargoes are at 12,2,3,4,6,8,9,10 o'clock. So the cargo at 2 would be at 60 degrees, with 0 at the top.
then you get the sin and cosine, right?
that make it cos -.9524 and sin -.30481
Well That is what I have the sin part is rounded.
_V(.866, .5, 0), _V(0, 0, -1), "CARGO11");
I wonder if it is the issue that the pods is:
P 0 -1.67 0 0 0 -1 0 1 0 POD
CARGO3 = CreateAttachment(false, _V(-17.7, -10.15, 1.12), _V(-.866, -.5, 0), _V(0, 0, -1), "CARGO3");
CARGO3_pos.x = -17.7;
CARGO3_pos.y = -10.15;
CARGO3_pos.z = 1.12;
CARGO3_INT_POS = 1.12;
if (PODSel == 3){
//SendHudMessage("Rack 3 Selected");
if (CARGO3_status >= RACK_RAISING) {
double da = simdt * .1;
if (CARGO3_status == RACK_RAISING) {
if (CARGO3_proc > 0.0) CARGO3_proc = max(0.0, CARGO3_proc - da);
else CARGO3_status = RACK_UP;
}
else {
if (CARGO3_proc < 1.0) CARGO3_proc = min(1.0, CARGO3_proc + da);
else CARGO3_status = RACK_DOWN;
}
if (CARGO3_status == RACK_UP)SendHudMessage("Rack 1 Retracted");
if (CARGO3_status == RACK_DOWN)SendHudMessage("Rack 1 Extended");
}
CARGO3_pos.z = CARGO3_INT_POS - (CARGO3_proc * 5);
SetAttachmentParams(CARGO3, CARGO3_pos, _V(-.866, -.5, 0), _V(0, 0, -1));
}