Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Addons > Addon Development
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Addon Development Developers post news, updates, & discussions here about your projects in development.

Reply
 
Thread Tools
Old 02-21-2018, 12:01 PM   #331
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

I have hit a road block. I hope someone can see what is wrong.

Basically define the crew meshes and set them not to be seen.
Code:
//PILOT SEAT
	meshi_CREW[0] = AddMesh(meshhg_CREW[VC_STATION_PILOT] = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\LANDER\\LANDERCREWECM1"));// mesh0
	meshi_CREW[1] = AddMesh(meshhg_CREW[VC_STATION_PILOT] = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\LANDER\\LANDERCREWECMO1"));// mesh1
	meshi_CREW[2] = AddMesh(meshhg_CREW[VC_STATION_PILOT] = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\LANDER\\LANDERCREWECF1"));// mesh2
	meshi_CREW[3] = AddMesh(meshhg_CREW[VC_STATION_PILOT] = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\LANDER\\LANDERCREWECFO1"));// mesh3
	//COPILOT
	meshi_CREW[4] = AddMesh(meshhg_CREW[VC_STATION_COPILOT] = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\LANDER\\LANDERCREWECM2"));//mesh4
	meshi_CREW[5] = AddMesh(meshhg_CREW[VC_STATION_COPILOT] = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\LANDER\\LANDERCREWECMO2"));//mesh5
	meshi_CREW[6] = AddMesh(meshhg_CREW[VC_STATION_COPILOT] = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\LANDER\\LANDERCREWECF2"));//mesh6
	meshi_CREW[7] = AddMesh(meshhg_CREW[VC_STATION_COPILOT] = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\LANDER\\LANDERCREWECFO2"));//mesh7
	//LEFT PASS
	meshi_CREW[8] = AddMesh(meshhg_CREW[VC_STATION_PAX_LEFT] = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\LANDER\\LANDERCREWECM3"));//mesh8
	meshi_CREW[9] = AddMesh(meshhg_CREW[VC_STATION_PAX_LEFT] = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\LANDER\\LANDERCREWECMO3"));//mesh9
	meshi_CREW[10] = AddMesh(meshhg_CREW[VC_STATION_PAX_LEFT] = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\LANDER\\LANDERCREWECF3"));//mesh10
	meshi_CREW[11] = AddMesh(meshhg_CREW[VC_STATION_PAX_LEFT] = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\LANDER\\LANDERCREWECFO3"));//mesh11
	//RIGHT PASS
	meshi_CREW[12] = AddMesh(meshhg_CREW[VC_STATION_PAX_RIGHT] = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\LANDER\\LANDERCREWECM4"));//mesh12
	meshi_CREW[13] = AddMesh(meshhg_CREW[VC_STATION_PAX_RIGHT] = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\LANDER\\LANDERCREWECMO4"));//mesh13
	meshi_CREW[14] = AddMesh(meshhg_CREW[VC_STATION_PAX_RIGHT] = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\LANDER\\LANDERCREWECF4"));//mesh14
	meshi_CREW[15] = AddMesh(meshhg_CREW[VC_STATION_PAX_RIGHT] = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\LANDER\\LANDERCREWECFO4"));//mesh15

	meshi_CREW[16] = AddMesh(meshhg_CREW[VC_STATION_TARS] = oapiLoadMeshGlobal(FILENAME_CREW_TARSLANDER_ANIMATEDNEW));//mesh16
	meshi_CREW[17] = AddMesh(meshhg_CREW[VC_STATION_CASE] = oapiLoadMeshGlobal(FILENAME_CREW_CASE_ANIMATED_B));//mesh17

	for (int i = 0; i < 17; i++)
		SetMeshVisibilityMode(meshi_CREW[i], MESHVIS_NEVER);

	// visual specs
	SetMeshVisibilityMode(meshi_Vessel = AddMesh(meshhg_Vessel = oapiLoadMeshGlobal(FILENAME_LANDER16)), MESHVIS_ALWAYS); //Main ship mesh18
	SetMeshVisibilityMode(meshi_VC = AddMesh(meshhg_VC = oapiLoadMeshGlobal(FILENAME_LANDER18VC)), MESHVIS_VC);//MESH 19

then if a certain ummu enters displays the correct mesh

Code:
void LANDER6::UpdateCrew() {
	int const crewn = Crew.GetCrewTotalNumber();

	for (int i = 0; i < 17; i++) SetMeshVisibilityMode(meshi_CREW[i], MESHVIS_NEVER);// clears MESHES

	{
		int chair = 0;
		for (int i = 0; i < crewn; i++) {
			const char *pMiscID = Crew.GetCrewMiscIdBySlotNumber(0);
			const char *pMiscID1 = Crew.GetCrewMiscIdBySlotNumber(1);
			const char *pMiscID2 = Crew.GetCrewMiscIdBySlotNumber(2);
			const char *pMiscID3 = Crew.GetCrewMiscIdBySlotNumber(3);
			const char *pMiscID4 = Crew.GetCrewMiscIdBySlotNumber(4);
			const char *pMiscID5 = Crew.GetCrewMiscIdBySlotNumber(5);


			if (!_strnicmp(pMiscID, "TARS", 4))
				SetMeshVisibilityMode(meshi_CREW[16], MESHVIS_ALWAYS);

			else if (!_strnicmp(pMiscID, "CASE", 4))
				SetMeshVisibilityMode(meshi_CREW[17], MESHVIS_ALWAYS);

			if (!_strnicmp(pMiscID1, "TARS", 4))
				SetMeshVisibilityMode(meshi_CREW[16], MESHVIS_ALWAYS);

			else if (!_strnicmp(pMiscID1, "CASE", 4))
				SetMeshVisibilityMode(meshi_CREW[17], MESHVIS_ALWAYS);

			if (!_strnicmp(pMiscID2, "TARS", 4))
				SetMeshVisibilityMode(meshi_CREW[16], MESHVIS_ALWAYS);

			else if (!_strnicmp(pMiscID2, "CASE", 4))
				SetMeshVisibilityMode(meshi_CREW[17], MESHVIS_ALWAYS);

			if (!_strnicmp(pMiscID3, "TARS", 4))
				SetMeshVisibilityMode(meshi_CREW[16], MESHVIS_ALWAYS);

			else if (!_strnicmp(pMiscID3, "CASE", 4))
				SetMeshVisibilityMode(meshi_CREW[17], MESHVIS_ALWAYS);

			if (!_strnicmp(pMiscID4, "TARS", 4))
				SetMeshVisibilityMode(meshi_CREW[16], MESHVIS_ALWAYS);

			else if (!_strnicmp(pMiscID4, "CASE", 4))
				SetMeshVisibilityMode(meshi_CREW[17], MESHVIS_ALWAYS);

			if (!_strnicmp(pMiscID5, "TARS", 4))
				SetMeshVisibilityMode(meshi_CREW[16], MESHVIS_ALWAYS);

			else if (!_strnicmp(pMiscID5, "CASE", 4))
				SetMeshVisibilityMode(meshi_CREW[17], MESHVIS_ALWAYS);
So if the ummu is CASE it shows no mesh [17]. I have changed the number 17 to another mesh and it shows. No idea why mesh#17 will not be seen. Both meshes 16 and 17 are set in the correct spot.
gattispilot is online now   Reply With Quote
Old 02-21-2018, 12:28 PM   #332
martins
Orbiter Founder
Default

Quote:
Originally Posted by gattispilot View Post
 
Code:
	for (int i = 0; i < 17; i++)
		SetMeshVisibilityMode(meshi_CREW[i], MESHVIS_NEVER);
Typo.
martins is offline   Reply With Quote
Thanked by:
Old 02-21-2018, 12:44 PM   #333
Urwumpe
Certain Super User
 
Urwumpe's Avatar

Default

To be more specific: If you want to have the for-loop run from 0 to 17, you need i < 18 as condition for the loop.
Urwumpe is offline   Reply With Quote
Thanked by:
Old 02-22-2018, 11:49 AM   #334
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Thanks.
Code:
	meshi_CREW[16] = AddMesh(meshhg_CREW[VC_STATION_TARS] = oapiLoadMeshGlobal(FILENAME_CREW_TARSLANDER_ANIMATEDNEW));//mesh16
	meshi_CREW[17] = AddMesh(meshhg_CREW[VC_STATION_CASE] = oapiLoadMeshGlobal(FILENAME_CREW_CASE_ANIMATED_B));//mesh17

	for (int i = 0; i < 18; i++)
		SetMeshVisibilityMode(meshi_CREW[i], MESHVIS_NEVER);

Code:
void LANDER6::UpdateCrew() {
	int const crewn = Crew.GetCrewTotalNumber();

	for (int i = 0; i < 18; i++) SetMeshVisibilityMode(meshi_CREW[i], MESHVIS_NEVER);// clears MESHES

	{
		int chair = 0;
		for (int i = 0; i < crewn; i++) {
			const char *pMiscID = Crew.GetCrewMiscIdBySlotNumber(0);
			const char *pMiscID1 = Crew.GetCrewMiscIdBySlotNumber(1);
			const char *pMiscID2 = Crew.GetCrewMiscIdBySlotNumber(2);
			const char *pMiscID3 = Crew.GetCrewMiscIdBySlotNumber(3);
			const char *pMiscID4 = Crew.GetCrewMiscIdBySlotNumber(4);
			const char *pMiscID5 = Crew.GetCrewMiscIdBySlotNumber(5);


			if (!_strnicmp(pMiscID, "TARS", 4))
				SetMeshVisibilityMode(meshi_CREW[16], MESHVIS_ALWAYS);

			else if (!_strnicmp(pMiscID, "CASE", 4))
				SetMeshVisibilityMode(meshi_CREW[17], MESHVIS_ALWAYS);
Still no CASE is showing up.

So if I exit I get this:
LANDER2:LANDER
STATUS Landed Earth
POS -80.6798960 28.5997140
HEADING 77.55
AFCMODE 7
PRPLEVEL 0:1.000000 1:1.000000 2:1.000000
IDS 0:588 100 1:589 100
NAVFREQ 0 0
XPDR 0
DOOR 1 1.0000
DOOR1 0 0.0000
BLAST 0 0.0000
UPDOOR 0 0.0000
LODOOR 0 0.0000
SMOKE 1
ORBIT 0
TRIMLEVEL 0.00
DOORSELECTED 1
UMMUCREW CASE-CASE-22-69-70
END

When I restart CASE is seen.

---------- Post added 02-22-18 at 05:49 AM ---------- Previous post was 02-21-18 at 07:48 PM ----------

FIXED For some reason I had this set to this to 17 rather than 18
UINT meshi_Vessel, meshi_VC, meshi_CREW[18];

Last edited by gattispilot; 02-22-2018 at 02:02 AM.
gattispilot is online now   Reply With Quote
Old 02-24-2018, 09:58 PM   #335
kuddel
Donator
Default

Quote:
Originally Posted by gattispilot View Post
 For some reason I had this set to this to 17 rather than 18
It's not for some reason!
It's either for a reason or it isn't. You should be able to answer this kind of questions by yourself already. C++ is very deterministic!
Keep learning, that usually helps preventing such uncertainties in future code.
kuddel is offline   Reply With Quote
Thanked by:
Old 03-14-2018, 05:14 PM   #336
jgrillo2002
Conservative Pioneer
 
jgrillo2002's Avatar
Default

Sorry for bumping this, The addon is released but no topic has been made automatically. Heres my question. wasnt there supposed to be documentation on how to operate it?
jgrillo2002 is offline   Reply With Quote
Thanked by:
Old 03-14-2018, 05:38 PM   #337
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Quote:
Originally Posted by jgrillo2002 View Post
  Heres my question. wasnt there supposed to be documentation on how to operate it?
Not sure what you are asking. Yes released on OH but no thread was started. No idea why?
gattispilot is online now   Reply With Quote
Old 03-14-2018, 06:01 PM   #338
jgrillo2002
Conservative Pioneer
 
jgrillo2002's Avatar
Default

All addons have a PDF manual containing instructions and key binds used for the addon. The addon doesnt have this present. You must have forgotten to pack it in the zip.
jgrillo2002 is offline   Reply With Quote
Old 03-14-2018, 07:03 PM   #339
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Oh. I have updated it. Yes I uploaded the wrong zip
gattispilot is online now   Reply With Quote
Old 03-14-2018, 07:42 PM   #340
Interceptor
Orbinaut
 
Interceptor's Avatar
Lightbulb

Thanks John,and all who helped make this for your hard work,I know you have worked on it a long time.
Interceptor is offline   Reply With Quote
Thanked by:
Old 03-14-2018, 08:02 PM   #341
BenSisko
Donator
 
BenSisko's Avatar
Default

Quote:
Originally Posted by gattispilot View Post
 Oh. I have updated it. Yes I uploaded the wrong zip
Whew, the manual is 73 pages long!

I hope Orbit Hangar and the Forum generate a thread for it
BenSisko is offline   Reply With Quote
Thanked by:
Old 03-14-2018, 10:09 PM   #342
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Me too. Then there be the challenge of getting the touchdown points right in the Ranger and Lander.

---------- Post added at 05:09 PM ---------- Previous post was at 03:19 PM ----------

So on the Lander I have this for 2016:
Code:
static const int ntdvtx = 3;
static TOUCHDOWNVTX tdvtx[ntdvtx] = {
	{ _V(0, -0.005, 5), 147872, 102004, 3.2, 0.8 },
	{ _V(-2, -0.005, -5), 107872, 62004, 3.2, 0.4 },
	{ _V(2, -0.005, -5), 107872, 62004, 3.2, 0.4 },//,

	
	//	{ _V(-2, 1.6, 1.5), 1e6, 1e5, 3.2, 0 },
	//	{ _V(2, 1.6, 1.5), 1e6, 1e5, 3.2, 0 }
};
Code:
void LANDER6::clbkSetClassCaps(FILEHANDLE cfg)
{
	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));;
	SetTouchdownPoints(tdvtx, ntdvtx);
But it slides off the pad.

The ranger is another thing. The nose is in the ground and the rear gear is in the air.
gattispilot is online now   Reply With Quote
Thanked by:
Old 03-15-2018, 12:20 AM   #343
BenSisko
Donator
 
BenSisko's Avatar
Default

To all,
We're aware of the 160828 issues with the Lander and the Ranger and we're working on a fix. We're also anxious to implement Woo482's oMMU to allow us to place a crew in our vessels in lieu of a functioning UMmu. Rest assured the Endurance Space Exploration System for 160828 is being actively developed!
BenSisko is offline   Reply With Quote
Old 03-15-2018, 06:09 PM   #344
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Also I parked a LAnder on a pad at KSC. Applied Horizon level and slid off the pad into the grass and then to the sun

Put a dg there. set the gear and did the Level and slid off.

So for mass like a parking brake? or more friction?

---------- Post added at 01:09 PM ---------- Previous post was at 08:06 AM ----------

So here is the Ranger You can see she is about nose is in the ground.


Code:
static const int ntdvtx = 3;
static TOUCHDOWNVTX tdvtx[ntdvtx] = {
	{ _V(0, -1.31835, 5), 107872, 62004, 3.2, 0.8 },
	{ _V(-2, -1.31835, -5), 107872, 62004, 3.2, 0.4 },
	{ _V(2, -1.31835, -5), 107872, 62004, 3.2, 0.4 },//,
};
The model is level also.

ScN:
Code:
RANGER:RANGER
  STATUS Orbiting Earth
  RPOS 5552550.177 2506948.230 1863950.267
  RVEL -52.6413 -161.6943 369.4192
  AROT 24.515 53.761 155.323
  VROT -16.5267 -2.7942 53.1994
  AFCMODE 7
  PRPLEVEL 0:1.000000 1:0.999999 2:0.999996
  IDS 0:588 100 1:589 100 2:589 100
  NAVFREQ 0 0
  XPDR 0
  DOCK 0
  AIRLOCK 0
  GEAR 0 0.0000
  DOOR 0 0.0000
  CHAIR 1 0.0000
  TARS 1 0.0000
  DOOR1 0 0.0000
  DOCKRING 0 0.0000
  DOCKHATCH 0 0.0000
  BOTTOMCOVER 0 0.0000
END
END_SHIPS
I thought I would have been landed rather than orbiting?
gattispilot is online now   Reply With Quote
Old 03-16-2018, 05:30 PM   #345
BenSisko
Donator
 
BenSisko's Avatar
Default

I've tried landing both the Lander and Ranger in the pad area of KSC using pads 1 & 2 running Orbiter 160828. Both landings fail. The Lander remains upright but slides off the pad and through an adjacent building. The Ranger also slides off the pad but is pitches nose-down to end up inverted and underground. The Rangers action is likely influenced by the compliance of its landing gear but both ships are affected by the fact that the KSC pad area is not flat. Is there a way to flatten the 160828 KSC pad area? Is this planned for an update to 160828?
BenSisko is offline   Reply With Quote
Thanked by:
Reply

  Orbiter-Forum > Orbiter Addons > Addon Development


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 06:02 PM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.