Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ core
!/Script
/Script/*
!/Script/ProjectApollo
/Textures/
!/Textures/
/Textures/*
!/Textures/ProjectApollo/
/Scenarios
!/Scenarios/Project Apollo - NASSP/
Expand Down
22 changes: 22 additions & 0 deletions Meshes/ProjectApollo/CueCards/A15LM_CDR_LMP_BUS_LOST.msh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MSHX1
GROUPS 1
LABEL A15LM_CDR_LMP_BUS_LOST
MATERIAL 1
TEXTURE 1
FLAG 0
GEOM 4 2
0.0444 0.1079 1.5333 0.0000 0.5771 -0.8167 0.0000 1.0000
0.1937 0.1079 1.5333 0.0000 0.5771 -0.8167 1.0000 1.0000
0.0444 0.1420 1.5573 0.0000 0.5771 -0.8167
0.1937 0.1420 1.5573 0.0000 0.5771 -0.8167 1.0000 0.0000
0 3 1
0 2 3
MATERIALS 1
A15LM_CDR_LMP_BUS_LOST
MATERIAL A15LM_CDR_LMP_BUS_LOST
0.800 0.800 0.800 1.000
1.000 1.000 1.000 1.000
0.000 0.000 0.000 1.000 0.000
0.700 0.700 0.700 1.000
TEXTURES 1
ProjectApollo\VC\CueCards\A15LM_CDR_LMP_BUS_LOST.dds
22 changes: 22 additions & 0 deletions Meshes/ProjectApollo/CueCards/A15LM_DPS_APS_RCS.msh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MSHX1
GROUPS 1
LABEL A15LM_DPS_APS_RCS
MATERIAL 1
TEXTURE 1
FLAG 0
GEOM 4 2
-0.0895 0.2765 1.6558 0.0000 0.2157 -0.9764 0.0000 1.0000
0.1974 0.2765 1.6558 0.0000 0.2157 -0.9764 1.0000 1.0000
-0.0895 0.3300 1.6676 0.0000 0.2157 -0.9764
0.1974 0.3300 1.6676 0.0000 0.2157 -0.9764 1.0000 0.0000
0 3 1
0 2 3
MATERIALS 1
A15LM_DPS_APS_RCS
MATERIAL A15LM_DPS_APS_RCS
0.800 0.800 0.800 1.000
1.000 1.000 1.000 1.000
0.000 0.000 0.000 1.000 0.000
0.700 0.700 0.700 1.000
TEXTURES 1
ProjectApollo\VC\CueCards\A15LM_DPS_APS_RCS.dds
68 changes: 68 additions & 0 deletions Meshes/ProjectApollo/CueCards/A15LM_DPS_ASCENT.msh
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
MSHX1
GROUPS 1
LABEL A15LM_DPS_ASCENT
MATERIAL 1
TEXTURE 1
FLAG 0
GEOM 24 28
-0.2568 0.1831 1.5806 0.0000 0.7649 -0.6441 0.0000 1.0000
-0.1160 0.1831 1.5806 0.0000 0.7649 -0.6441 1.0000 1.0000
-0.2568 0.2986 1.6643 -0.0003 0.4376 -0.8992
-0.1160 0.2986 1.6643 -0.0054 0.4420 -0.8970 1.0000 0.0000
-0.2568 0.2637 1.6456 -0.0055 0.5517 -0.8340 0.0000 0.2760
-0.2568 0.2813 1.6559 -0.0021 0.4823 -0.8760 0.0000 0.1341
-0.1160 0.2814 1.6558 -0.0160 0.4968 -0.8677 1.0000 0.1341
-0.1160 0.2645 1.6445 -0.0343 0.5631 -0.8257 1.0000 0.2760
-0.1160 0.2084 1.6065 -0.0105 0.5971 -0.8021 1.0000 0.7468
-0.1160 0.1926 1.5920 0.0000 0.7404 -0.6722 1.0000 0.8968
-0.1160 0.2001 1.5997 0.0000 0.6765 -0.7364 1.0000 0.8218
-0.2568 0.1926 1.5920 0.0000 0.7404 -0.6722 0.0000 0.8968
-0.2568 0.2084 1.6065 -0.0018 0.6031 -0.7977 0.0000 0.7468
-0.2568 0.2001 1.5997 0.0000 0.6765 -0.7364 0.0000 0.8218
-0.1259 0.1831 1.5806 0.0000 0.7649 -0.6441 0.9298 1.0000
-0.1259 0.2986 1.6643 -0.0029 0.4398 -0.8981 0.9298 0.0000
-0.1259 0.2813 1.6559 -0.0090 0.4896 -0.8719 0.9298 0.1341
-0.1259 0.2643 1.6448 -0.0199 0.5575 -0.8299 0.9298 0.2760
-0.1259 0.2084 1.6065 -0.0062 0.6001 -0.7999 0.9298 0.7468
-0.1259 0.2001 1.5997 0.0000 0.6765 -0.7364 0.9298 0.8218
-0.1259 0.1926 1.5920 0.0000 0.7404 -0.6722 0.9298 0.8968
-0.2568 0.2455 1.6327 -0.0053 0.5729 -0.8196 0.0000 0.4314
-0.1160 0.2462 1.6316 -0.0316 0.5665 -0.8235 1.0000 0.4314
-0.1259 0.2460 1.6319 -0.0185 0.5697 -0.8216 0.9298 0.4314
23 7 22
23 17 7
16 3 6
16 15 3
16 4 5
16 17 4
18 13 12
18 19 13
19 11 13
19 20 11
14 9 1
14 20 9
0 20 14
0 11 20
10 20 19
10 9 20
8 19 18
8 10 19
6 17 16
6 7 17
5 15 16
5 2 15
21 17 23
21 4 17
12 23 18
12 21 23
18 22 8
18 23 22
MATERIALS 1
A15LM_DPS_ASCENT
MATERIAL A15LM_DPS_ASCENT
0.800 0.800 0.800 1.000
1.000 1.000 1.000 1.000
0.000 0.000 0.000 1.000 0.000
0.700 0.700 0.700 1.000
TEXTURES 1
ProjectApollo\VC\CueCards\A15LM_DPS_ASCENT.dds
22 changes: 22 additions & 0 deletions Meshes/ProjectApollo/CueCards/A15LM_DPS_PROCEDURE.msh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MSHX1
GROUPS 1
LABEL A15LM_DPS_PROCEDURE
MATERIAL 1
TEXTURE 1
FLAG 0
GEOM 4 2
-0.4230 0.6215 1.7027 0.0000 0.1442 -0.9895 0.0000 1.0000
-0.1948 0.6215 1.7027 0.0000 0.1442 -0.9895 1.0000 1.0000
-0.4230 0.7983 1.7284 0.0000 0.1442 -0.9895
-0.1948 0.7983 1.7284 0.0000 0.1442 -0.9895 1.0000 0.0000
0 3 1
0 2 3
MATERIALS 1
A15LM_DPS_PROCEDURE
MATERIAL A15LM_DPS_PROCEDURE
0.800 0.800 0.800 1.000
1.000 1.000 1.000 1.000
0.000 0.000 0.000 1.000 0.000
0.700 0.700 0.700 1.000
TEXTURES 1
ProjectApollo\VC\CueCards\A15LM_DPS_PROCEDURE.dds
22 changes: 22 additions & 0 deletions Meshes/ProjectApollo/CueCards/A15LM_FT_NM.msh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MSHX1
GROUPS 1
LABEL A15LM_FT_NM
MATERIAL 1
TEXTURE 1
FLAG 0
GEOM 4 2
0.1941 0.1166 1.5425 0.0000 0.5771 -0.8167 0.0000 1.0000
0.2347 0.1166 1.5425 0.0000 0.5771 -0.8167 1.0000 1.0000
0.1941 0.2129 1.6105 0.0000 0.5771 -0.8167
0.2347 0.2129 1.6105 0.0000 0.5771 -0.8167 1.0000 0.0000
0 3 1
0 2 3
MATERIALS 1
A15LM_FT_NM
MATERIAL A15LM_FT_NM
0.800 0.800 0.800 1.000
1.000 1.000 1.000 1.000
0.000 0.000 0.000 1.000 0.000
0.700 0.700 0.700 1.000
TEXTURES 1
ProjectApollo\VC\CueCards\A15LM_FT_NM.dds
6 changes: 6 additions & 0 deletions Orbitersdk/samples/ProjectApollo/Build/VC2017/LEM.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@
<ClCompile Include="..\..\src_aux\CDK.cpp">
<DebugInformationFormat Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ProgramDatabase</DebugInformationFormat>
</ClCompile>
<ClCompile Include="..\..\src_aux\CueCard.cpp" />
<ClCompile Include="..\..\src_aux\CueCardLocation.cpp" />
<ClCompile Include="..\..\src_aux\CueCardManager.cpp" />
<ClCompile Include="..\..\src_aux\Mission.cpp" />
<ClCompile Include="..\..\src_aux\OrbiterMath.cpp">
<DebugInformationFormat Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ProgramDatabase</DebugInformationFormat>
Expand Down Expand Up @@ -371,6 +374,9 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src_aux\animations.h" />
<ClInclude Include="..\..\src_aux\CueCard.h" />
<ClInclude Include="..\..\src_aux\CueCardLocation.h" />
<ClInclude Include="..\..\src_aux\CueCardManager.h" />
<ClInclude Include="..\..\src_aux\Mission.h" />
<ClInclude Include="..\..\src_aux\RF_calc.h" />
<ClInclude Include="..\..\src_aux\vesim.h" />
Expand Down
18 changes: 18 additions & 0 deletions Orbitersdk/samples/ProjectApollo/Build/VC2017/LEM.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,15 @@
<ClCompile Include="..\..\src_lm\LMMalfunctionSimulation.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src_aux\CueCard.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src_aux\CueCardLocation.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src_aux\CueCardManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src_sys\apolloguidance.h">
Expand Down Expand Up @@ -455,6 +464,15 @@
<ClInclude Include="..\..\src_lm\LMMalfunctionSimulation.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src_aux\CueCard.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src_aux\CueCardLocation.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src_aux\CueCardManager.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\Abort.bmp">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ See http://nassp.sourceforge.net/license/ for more details.

#include "CueCardManager.h"

CueCardManager::CueCardManager(int &vcidx, VESSEL *v, unsigned num) : vc(vcidx)
CueCardManager::CueCardManager(UINT &vcidx, VESSEL *v, unsigned num) : vc(vcidx)
{
vessel = v;
CueCardLocations.resize(num, CueCardLocation(this));
Expand Down
4 changes: 2 additions & 2 deletions Orbitersdk/samples/ProjectApollo/src_aux/CueCardManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ See http://nassp.sourceforge.net/license/ for more details.
class CueCardManager
{
public:
CueCardManager(int &vcidx, VESSEL *v, unsigned num);
CueCardManager(UINT &vcidx, VESSEL *v, unsigned num);

//Creates cue card, should be called in vessel constructor or clbkPostStep
void CreateCueCard(unsigned location, std::string name, VECTOR3 offs = _V(0, 0, 0));
Expand All @@ -49,7 +49,7 @@ class CueCardManager
VESSEL *V() { return vessel; }
VECTOR3 GetVCOffset();
protected:
int &vc;
UINT &vc;
VESSEL *vessel;
std::vector<CueCardLocation> CueCardLocations;
};
Expand Down
12 changes: 11 additions & 1 deletion Orbitersdk/samples/ProjectApollo/src_aux/Mission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ namespace mission {
AddCSMCueCard(8, "LMP_BOOST-ABORTS");
AddCSMCueCard(9, "LOI_LIMITS");
AddCSMCueCard(10, "CSM_ANTENNA_LOCATIONS");
AddLMCueCard(0, "A15LM_DPS_PROCEDURE");
AddLMCueCard(1, "A15LM_CDR_LMP_BUS_LOST");
AddLMCueCard(2, "A15LM_DPS_APS_RCS");
AddLMCueCard(3, "A15LM_DPS_ASCENT");
AddLMCueCard(4, "A15LM_FT_NM");
}

bool Mission::LoadMission(const int iMission)
Expand Down Expand Up @@ -630,9 +635,14 @@ namespace mission {
return GetCueCards(CSMCueCards, counter, loc, meshname, ofs);
}

bool Mission::GetLMCueCards(unsigned &counter, unsigned &loc, std::string &meshname, VECTOR3 &ofs)
{
return GetCueCards(LMCueCards, counter, loc, meshname, ofs);
}

bool Mission::GetCueCards(const std::vector<CueCardConfig> &cue, unsigned &counter, unsigned &loc, std::string &meshname, VECTOR3 &ofs)
{
while (counter < CSMCueCards.size())
while (counter < cue.size())
{
if (cue[counter].meshname != "" && cue[counter].meshname != "None")
{
Expand Down
1 change: 1 addition & 0 deletions Orbitersdk/samples/ProjectApollo/src_aux/Mission.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ namespace mission
int GetLMNumber() const;
//Get cue cards
bool GetCSMCueCards(unsigned &counter, unsigned &loc, std::string &meshname, VECTOR3 &ofs);
bool GetLMCueCards(unsigned &counter, unsigned &loc, std::string &meshname, VECTOR3 &ofs);
//Name of CDR
virtual const std::string& GetCDRName() const;
//Name of CMP
Expand Down
2 changes: 1 addition & 1 deletion Orbitersdk/samples/ProjectApollo/src_csm/saturn.h
Original file line number Diff line number Diff line change
Expand Up @@ -4014,7 +4014,7 @@ class Saturn: public ProjectApolloConnectorVessel, public PanelSwitchListener {
int opticscoveridx;
int cmdocktgtidx;
int simbaypanelidx;
int vcidx;
UINT vcidx;
int seatsfoldedidx;
int seatsunfoldedidx;
int coascdridx;
Expand Down
10 changes: 7 additions & 3 deletions Orbitersdk/samples/ProjectApollo/src_lm/LEM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,8 @@ LEM::LEM(OBJHANDLE hObj, int fmodel) : Payload (hObj, fmodel),
AscentECAMainFeeder("Ascent-ECA-Main-Feeder", Panelsdk),
AscentECAContFeeder("Ascent-ECA-Cont-Feeder", Panelsdk),
vesim(&cbLMVesim, this),
Failures(this)

Failures(this),
CueCards(vcidx, this, 5)
{
dllhandle = g_Param.hDLL; // DS20060413 Save for later
InitLEMCalled = false;
Expand Down Expand Up @@ -1999,7 +1999,10 @@ void LEM::GetScenarioState(FILEHANDLE scn, void *vs)
// the simulation is started in pause mode.

}
}
}
else if (!strnicmp(line, CUECARDS_START_STRING, sizeof(CUECARDS_START_STRING))) {
CueCards.LoadState(scn);
}
else if (!strnicmp(line, "<INTERNALS>", 11)) { //INTERNALS signals the PanelSDK part of the scenario
Panelsdk.Load(scn); //send the loading to the Panelsdk
}
Expand Down Expand Up @@ -2362,6 +2365,7 @@ void LEM::clbkSaveState (FILEHANDLE scn)
aea.SaveState(scn, "AEA_START", "AEA_END");
asa.SaveState(scn, "ASA_START", "ASA_END");
}
CueCards.SaveState(scn);

//
// Save the Panel SDK state.
Expand Down
2 changes: 2 additions & 0 deletions Orbitersdk/samples/ProjectApollo/src_lm/LEM.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
#include "checklistController.h"
#include "payload.h"
#include "LMMalfunctionSimulation.h"
#include "CueCardManager.h"

enum LMRCSThrusters
{
Expand Down Expand Up @@ -780,6 +781,7 @@ class LEM : public Payload, public PanelSwitchListener {
PanelSwitches MainPanel;
PanelSwitchesVC MainPanelVC;
PanelSwitchScenarioHandler PSH;
CueCardManager CueCards;

SwitchRow AbortSwitchesRow;

Expand Down
9 changes: 9 additions & 0 deletions Orbitersdk/samples/ProjectApollo/src_lm/lemsystems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2478,6 +2478,15 @@ void LEM::CreateMissionSpecificSystems()
aeaa = new LEM_AEAA();
}
EventTimerDisplay.SetReverseAtZero(pMission->IsLMEventTimerReversingAtZero());

//Create cue cards
unsigned loc, counter = 0;
std::string meshname;
VECTOR3 ofs;
while (pMission->GetLMCueCards(counter, loc, meshname, ofs) == false)
{
CueCards.CreateCueCard(loc, meshname, ofs);
}
}

// SYSTEMS COMPONENTS
Expand Down
Loading