I am puzzled. I am working on a vessel I have removed most everything. But when I load in a scenario no problem. But when I reload the current a CTD. Nothing in the log.
cpp
h.
I have tried different meshes but no change
scenario
TAELON5:TAELON5
STATUS Orbiting Earth
RPOS 7007601.49 -0.00 84505.99
RVEL -90.940 -0.000 7541.137
AROT 0.00 -0.00 0.00
AFCMODE 7
NAVFREQ 0 0
XPDR 0
END
cpp
Code:
// ==============================================================
// ORBITER MODULE: TAELON5
// Part of the ORBITER SDK
// Copyright (C) 2002-2004 Martin Schweiger
// All rights reserved
//
// TAELON5.cpp
// Control module for TAELON5 vessel class
//
// ==============================================================
#define ORBITER_MODULE
#include "orbitersdk.h"
#include "TAELON5.h"
#include "OrbiterSoundSDK35.h"
VISHANDLE MainExternalMeshVisual = 0;
// Constructor
TAELON5::TAELON5 (OBJHANDLE hObj, int fmodel)
: VESSEL2 (hObj, fmodel)
{
DefineAnimations();
}
//
void TAELON5::clbkSetClassCaps (FILEHANDLE cfg)
//void TAELON5::SetTransporter()
{
SetSize(3);
SetEmptyMass(8000);
SetCW(0.9, 0.9, 2, 1.4);
SetWingAspect(0.7);
SetWingEffectiveness(2.5);
SetCrossSections(_V(5.56, 7.71, 4.81));
SetRotDrag(_V(1.5, 1.5, 1.5));
if (GetFlightModel() >= 1) {
SetPitchMomentScale(0);
SetBankMomentScale(0);
}
SetPMI(_V(3.41, 4.30, 1.56));
SetTrimScale(.05);
SetCameraOffset(_V(0, 0.870, 1.790));
SetTouchdownPoints(_V(0, -1.2345, 10), _V(-5, -1.2345, -10), _V(5, -1.2345, -10));;
EnableTransponder(true);
// visual specs
MAINMESH = AddMesh(oapiLoadMeshGlobal("drone166"));
SetMeshVisibilityMode(MAINMESH, MESHVIS_EXTERNAL);
//COCKPITMESH = AddMesh(oapiLoadMeshGlobal("TAELONCOCKPIT"));
//SetMeshVisibilityMode(COCKPITMESH, MESHVIS_COCKPIT);
}
void TAELON5::clbkPostStep(double simt, double simdt, double mjd)
{
}
void TAELON5::DefineAnimations(void)
{
}
DLLCLBK VESSEL *ovcInit (OBJHANDLE hvessel, int flightmodel)
{
return new TAELON5 (hvessel, flightmodel);
}
DLLCLBK void ovcExit (VESSEL *vessel)
{
if (vessel) delete (TAELON5*)vessel;
}
// --------------------------------------------------------------
// Keyboard interface handler (buffered key events)
// --------------------------------------------------------------
int TAELON5::clbkConsumeBufferedKey(DWORD key, bool down, char *kstate)
{
// only process keydown events
if (!down)
return 0;
return 0;
}
// ====================================================================
// clbkVisualCreated used to display UMMU initialisation message
// because oapiDebugString() doesn't work in clbkSetClassCap
// ====================================================================
void TAELON5::clbkVisualCreated (VISHANDLE vis, int refcount)
{
MainExternalMeshVisual = GetMesh(vis,0);
}
// ==============================================================
// Visual destroyed
// ==============================================================
void TAELON5::clbkVisualDestroyed (VISHANDLE vis, int refcount)
{
MainExternalMeshVisual = 0;
}
// ========================================================================
// clbkLoadState function of Orbiter - Save scenario when user exit Orbiter
// ========================================================================
//------------------------------------------------------------------------------------------------------------------
// This below is not mandatory for UMmu to run.
//------------------------------------------------------------------------------------------------------------------
// ==========================================================
// USING TEXT INTERFACE FOR CREW MANAGMENT (not a good idea)
//
// This is the custom functions that send oapiDebugString() Message on screen
// it simply avoid that the message is sent if our ship don't have the focus
// and ensure that message will be reminded when we focus back on ship
// the Orbiter function below clbkFocusChanged is used to erase message when
// we lost focus.
// It's a bad idea to do an UMmu user interface only by using Debug screen message
// but if you can't do better you may use this system.
///////////////////////////////////////////////////////////////////////////////////////////
// --------------------------------------------------------------
// Orbiter's HUD callback
// used to display UMMU's message see PDF doc:
// "Example of feedback method by HUD Display"
// --------------------------------------------------------------
void TAELON5::clbkSaveState(FILEHANDLE scn)
{
char cbuf[256];
// ORBITER, default vessel parameters
SaveDefaultState(scn);
}
void TAELON5::clbkLoadStateEx(FILEHANDLE scn, void *status)
{
char *line;
while (oapiReadScenario_nextline(scn, line))
{
ParseScenarioLineEx(line, status);
}
}
h.
Code:
// ==============================================================
// ORBITER MODULE: EAGLEHANGAR2
// Part of the ORBITER SDK
// Copyright (C) 2002-2004 Martin Schweiger
// All rights reserved
//
// EAGLEHANGAR2.cpp
// Control module for EAGLEHANGAR2 vessel class
//
// Notes:
// This is an example for a "minimal" vessel implementation which
// only overloads the clbkSetClassCaps method to define vessel
// capabilities and otherwise uses the default VESSEL class
// behaviour.
// ==============================================================
const double PB_FUELMASS = 10000;
const double PB_ISP = 2.5e7;
const double ISP = 2e5;
const double MAIN_ISP = 2e5;
const double MAX_FUEL = 10000;
const double MAX_MAIN_THRUST = 200000;
//const double MAX_MAIN_THRUST = 10;
const double MAX_RCS_THRUST = 5000;
//const double SYSTEMS_THRUST = 0;
const double MAX_HOVER_THRUST = 400000;
//#include "orbitersdk.h"
// ==============================================================
// Some vessel parameters
// ==============================================================
// Interface for derived vessel class: QJBStar
// ==========================================================
class TAELON5: public VESSEL2 {
public:
TAELON5 (OBJHANDLE hObj, int fmodel);
void clbkSetClassCaps (FILEHANDLE cfg);
void clbkSaveState(FILEHANDLE scn);
void clbkLoadStateEx(FILEHANDLE scn, void *status);
int clbkConsumeBufferedKey(DWORD key, bool down, char *kstate);
void clbkVisualCreated (VISHANDLE vis, int refcount);
void DefineAnimations(void);
void clbkVisualDestroyed (VISHANDLE vis, int refcount);
void clbkPostStep (double simtt, double simdt, double mjd);
UINT MAINMESH ;
};
I have tried different meshes but no change
scenario
TAELON5:TAELON5
STATUS Orbiting Earth
RPOS 7007601.49 -0.00 84505.99
RVEL -90.940 -0.000 7541.137
AROT 0.00 -0.00 0.00
AFCMODE 7
NAVFREQ 0 0
XPDR 0
END