Request UMMU Compatible Helicopter?

Yeah, this one. I always wanted to produce a simple "SAR Dynamic Mission generator", a nice set of such helicopters could be helpful for this... I would also need a Coastguard C130 for this...

From just wildly brainstorming with my coworker, who is also firefighter here, I also made a funny concept for a lunar SAR vehicle, would still need to mesh it.
 
Last edited:
I found a couple of C130 in Sketchup but I can't convert them. Found one as a .obj. But it doesn't look it has a interior



OK I have run into an issue. The Chinook has 2 hook. So I want 456 to operate 1 and then ALT 4 5 6 to operate the other. So I can press 4 56 and it works HOOK1 good but if I press ALT 4,5,6 it also works Hook1. If I Press Shift 4 56 it works the hook, CTRL 4 5 6 works the same hook


Code:
int CHINOOK::clbkConsumeBufferedKey(DWORD key, bool down, char *kstate)
{
	// only process keydown events
	if (!down) 
		return 0; 

if(key==OAPI_KEY_1&&!KEYMOD_SHIFT(kstate)&&!KEYMOD_CONTROL (kstate))
	{
		// we test there is someone aboard
		if(Crew.GetCrewTotalNumber()==0)
		{
			strcpy(SendHudMessage(),"Sorry no one aboard unable to select");	
			return 1;
		}

		// we test that we select existing member
		if(SelectedUmmuMember<Crew.GetCrewTotalNumber()-1)
			SelectedUmmuMember++;
		char * Name=Crew.GetCrewNameBySlotNumber(SelectedUmmuMember);
		sprintf(SendHudMessage(),"Slot %i  %s \"%s\" aged %i Selected for EVA or Transfer, please press \"E\" to EVA",
		SelectedUmmuMember,Crew.GetCrewMiscIdBySlotNumber(SelectedUmmuMember),
		Name,Crew.GetCrewAgeBySlotNumber(SelectedUmmuMember));
		return 1;
	}

	//---------------------------------------------------------------------------
	// Ummu Key "2" Select previous member This is just internal to the demo
	// you may do your own selection system by panel button
	if(key==OAPI_KEY_2&&!KEYMOD_SHIFT(kstate)&&!KEYMOD_CONTROL (kstate))
	{
		// we test there is someone aboard
		if(Crew.GetCrewTotalNumber()==0)
		{
			strcpy(SendHudMessage(),"Sorry no one aboard unable to select");	
			return 1;
		}
		if(SelectedUmmuMember>0)
			SelectedUmmuMember--;
		char * Name=Crew.GetCrewNameBySlotNumber(SelectedUmmuMember);
		sprintf(SendHudMessage(),"Slot %i %s \"%s\" aged %i Selected for EVA or Transfer"
			", please press \"E\" to EVA",SelectedUmmuMember,
			Crew.GetCrewMiscIdBySlotNumber(SelectedUmmuMember),Name,
			Crew.GetCrewAgeBySlotNumber(SelectedUmmuMember));
		return 1;
	}

//---------------------------------------------------------------------------
	// Ummu Key "E" perform the EVA of the selected member
	//
	// ADD REALISM: It's your responsabilities also to set ship's control accordingly to crew aboard.
	//				If you want to disable control if no one is aboard have a look at "SetADCtrlMode()"
	//				and "SetAttitudeMode()" functions of Orbiter. To disable thrusters set their fuel 
	//				ressource to NULL.
	if(key==OAPI_KEY_E&&!KEYMOD_SHIFT(kstate)&&!KEYMOD_CONTROL (kstate))
	{
		// PERFORM THE EVA, first we get is name with "GetCrewNameBySlotNumber" then we perform EVA with "EvaCrewMember"
		int Returned=Crew.EvaCrewMember(Crew.GetCrewNameBySlotNumber(SelectedUmmuMember));
		// we provide feedback to user (You can display a message on panel or wathewer)
		// here below all the return code possible:
		switch(Returned)
		{
		case TRANSFER_TO_DOCKED_SHIP_OK:
			sprintf(SendHudMessage(),"Transfer to docked ship Ok - %s transfered",
			Crew.GetLastEvaedCrewName());SelectedUmmuMember=0;
			break;
		case EVA_OK:
			sprintf(SendHudMessage(),"EVA OK - %s left the ship",
			Crew.GetLastEvaedCrewName());SelectedUmmuMember=0;
			break;
		case ERROR_NO_ONE_ON_BOARD:
			strcpy(SendHudMessage(),"Error, no one on board, unable to EVA");
			break;
		case ERROR_AIRLOCK_CLOSED:
			strcpy(SendHudMessage(),"Error, airlock is closed, unable to EVA");
			break;
		case ERROR_DOCKED_SHIP_HAVE_AIRLOCK_CLOSED:
			strcpy(SendHudMessage(),"Error, docked ship's airlock is closed, unable to transfer");
			break;
		case ERROR_DOCKED_SHIP_IS_FULL:
			strcpy(SendHudMessage(),"Error, docked ship is already full transfer failed");
			break;
		case ERROR_CREW_MEMBER_NOT_FOUND:
			strcpy(SendHudMessage(),"Error, no crew by this name in ship");
			break;
		case ERROR_DOCKEDSHIP_DONOT_USE_UMMU:
			strcpy(SendHudMessage(),"Error, docked ship do not use UMmu 2.0, ask author to add it");
			break;
		case ERROR_MISC_ERROR_EVAFAILED:
			strcpy(SendHudMessage(),"Misc error with UMMU install it again");
			break;
		}
		return TRUE;
	}

	//---------------------------------------------------------------------------
	// Ummu Key "1" Select next member This is just internal to the demo
	// you may do your own selection system by panel button, name etc etc
	//---------------------------------------------------------------------------
	if(key==OAPI_KEY_D&&!KEYMOD_SHIFT(kstate)&&!KEYMOD_CONTROL (kstate))
	{		
	//
		Crew.SetAirlockDoorState(!Crew.GetAirlockDoorState());
		// display state
		if (doorselected==0)
			{RevertLDOOR ();
		if(Crew.GetAirlockDoorState()==TRUE)
			strcpy(SendHudMessage(),"Left Airlock is now open");	
		else
			strcpy(SendHudMessage(),"Left Airlock is now closed");
		}

	
if (doorselected==1)
{RevertRDOOR();
if(Crew.GetAirlockDoorState()==TRUE)
			strcpy(SendHudMessage(),"Right Airlock is now open");	
		else
			strcpy(SendHudMessage(),"Right Airlock is now closed");

	}
if (doorselected==2)
{
if(Crew.GetAirlockDoorState()==TRUE)
			strcpy(SendHudMessage(),"Rear Airlock is now open");	
		else
			strcpy(SendHudMessage(),"Rear Airlock is now closed");

}	}

	//---------------------------------------------------------------------------
	// Get some infos Name of ship and total soul aboard
	if(key==OAPI_KEY_S)
	{
		sprintf(SendHudMessage(),"%i souls aboard ship %s, %i seats available",
			Crew.GetCrewTotalNumber(),GetName(),6-Crew.GetCrewTotalNumber());
		return 1;
	}

	//---------------------------------------------------------------------------
	// ADD some Fun, Eject the guy, No check of all return code here to keep listing small and clear.
	// Notice eject function doesn't check airlock state at all.
	// GOOD IDEA: Get the Object's handle after ejection with function "GetObjHandleOfLastEVACrew"
	// and add to it one very small tank, thruster and smoke, then fire thruster (see pilot ejection of DGIV)
	// BAD IDEA: Not testing the handle returned by "GetObjHandleOfLastEVACrew" before using may
	// cause a CTD if by any bad luck the pointer is invalid (handle==NULL)
	if(key==OAPI_KEY_ESCAPE&&!KEYMOD_SHIFT(kstate)&&!KEYMOD_CONTROL (kstate))
	{
		if(Crew.EjectCrewMember(Crew.GetCrewNameBySlotNumber(SelectedUmmuMember))==EVA_OK)
			sprintf(SendHudMessage(),"%s EJECTED",Crew.GetLastEvaedCrewName());
		SelectedUmmuMember=0;
		return 1;
	}
if(key==OAPI_KEY_9)
    {
        if(iActiveDockNumber>0)
        iActiveDockNumber--;
     //   sprintf(SendHudMessage(),"Active dock number changed to: %i",iActiveDockNumber);
		if(iActiveDockNumber==0) sprintf(SendHudMessage(),"Left Airlock Selected");
		if(iActiveDockNumber==1) sprintf(SendHudMessage(),"Right Airlock Selected");
		if(iActiveDockNumber==2) sprintf(SendHudMessage(),"Rear Airlock Selected");
		

        SetUMMUAirlockPos();
        return 1;
    }
    //---------------------------------------------------------------------------
    // change active dock
    if(key==OAPI_KEY_0)
    {
        if(iActiveDockNumber<3)
        iActiveDockNumber++;
 //   sprintf(SendHudMessage(),"Active dock number changed to: %i",iActiveDockNumber);
		if(iActiveDockNumber==0) sprintf(SendHudMessage(),"Left Airlock Selected");
		if(iActiveDockNumber==1) sprintf(SendHudMessage(),"Right Airlock Selected");
		if(iActiveDockNumber==2) sprintf(SendHudMessage(),"Rear Airlock Selected");
		

        SetUMMUAirlockPos();
        return 1;
    }







	//---------------------------------------------------------------------------
	// Use a different Mesh (type "C" then EVA someone)
	// better idea is to use the new UMMU Id definition
	// look readme.txt in folder "config/UMMUIdConfig"
	if(key==OAPI_KEY_C)
	{
		Crew.SetAlternateMeshToUseForEVASpacesuit("mmu");	// the stock mmu of orbiter located in "meshes/mmu.msh"
		strcpy(SendHudMessage(),"Mesh changed");
		return 1;
	}

	// THIS IS FOR ADDING CREW SEE PDF doc "Allow user to add crew to your ship 
	// without scenery editor"
	if(key==OAPI_KEY_M&&!KEYMOD_SHIFT(kstate)&&!KEYMOD_CONTROL (kstate))
	{
		AddUMmuToVessel(TRUE);
	}
	//---------------------------------------------------------------------------


if(key==OAPI_KEY_J)
{
RevertDOOR();
}



if(key==OAPI_KEY_K)
{
    if(IGNITION_check == NO_START)	IGNITION_check=YES_START; // started
	else	
		if(IGNITION_check == YES_START)	IGNITION_check=NO_START;
      return 1;
}

if(key==OAPI_KEY_7)
{
    if(SPEED == 1)	SPEED=0; // started
	else	
		if(SPEED == 0)	SPEED=1;
      return 1;
}



if(key==OAPI_KEY_4)
{
      (CRANE_check == CRANE_STOP) ;
        return 1;
}   

if(key==OAPI_KEY_5){
		if (CRANE_check == CRANE_STOP) CRANE_check = CRANE_UP;
        else if (CRANE_check == CRANE_UP) CRANE_check = CRANE_STOP;
        else if (CRANE_check == CRANE_DOWN) CRANE_check = CRANE_UP;
			return 1;}
if(key==OAPI_KEY_6){
	if (CRANE_check == CRANE_STOP) CRANE_check = CRANE_DOWN;
        else if (CRANE_check == CRANE_DOWN) CRANE_check = CRANE_STOP;
        else if (CRANE_check == CRANE_UP) CRANE_check = CRANE_DOWN;
			return 1;}
if(key==OAPI_KEY_V)
{

    CAM = CAM + 1;
    if(CAM > 5) CAM = 0;
	
        SelectCockpitView(CAM);
        return 1;
}  

if(key==OAPI_KEY_B)
{
do_attach = 1;
             AttachCargo();
             return 1;
}
if(key==OAPI_KEY_N)
{
DetachCargo();
             return 1;
}

if (KEYMOD_ALT (kstate)) { 

		if (KEYDOWN (kstate, OAPI_KEY_4)) { // operate dish
      CRANE2_check = CRANE_STOP;
	  return 1;}

		if (KEYDOWN (kstate, OAPI_KEY_5)) { // operate dish
     if (CRANE2_check == CRANE_STOP) CRANE2_check = CRANE_UP;
        else if (CRANE2_check == CRANE_UP) CRANE2_check = CRANE_STOP;
        else if (CRANE2_check == CRANE_DOWN) CRANE2_check = CRANE_UP;
			return 1;}
if (KEYDOWN (kstate, OAPI_KEY_6)) { // operate dish
		 if (CRANE2_check == CRANE_STOP) CRANE2_check = CRANE_DOWN;
        else if (CRANE2_check == CRANE_DOWN) CRANE2_check = CRANE_STOP;
        else if (CRANE2_check == CRANE_UP) CRANE2_check = CRANE_DOWN;
			return 1;}

 }




if (!down)
		return 0;

	if (KEYMOD_SHIFT (kstate)) {
	} else if (KEYMOD_CONTROL (kstate)) {
		switch (key) {
		// Pressing keys from [Ctrl]+[1] to [Ctrl]+[9] to jettison payloads number from 0 to 10
		case OAPI_KEY_1:
			PM_DetachPayloadByIndex(0);
			return 1;
		case OAPI_KEY_2:
			PM_DetachPayloadByIndex(1);
			return 1;
		case OAPI_KEY_3:
			PM_DetachPayloadByIndex(2);
			return 1;
		case OAPI_KEY_4:
			PM_DetachPayloadByIndex(3);
			return 1;
		case OAPI_KEY_5:
			PM_DetachPayloadByIndex(4);
			return 1;
		case OAPI_KEY_6:
			PM_DetachPayloadByIndex(5);
			return 1;
		case OAPI_KEY_7:
			PM_DetachPayloadByIndex(6);
			return 1;
		case OAPI_KEY_8:
			PM_DetachPayloadByIndex(7);
			return 1;
		case OAPI_KEY_9:
			PM_DetachPayloadByIndex(8);
			return 1;
		case OAPI_KEY_0:
			PM_DetachPayloadByIndex(9);
			return 1;
		}
	} else {
		switch (key) {
		case OAPI_KEY_J:
			// Pressing J-key will starting payloads jettisoning sequence
			PM_BeginDetachPayloads();
			return 1;
		}
	}
	
 

		

return 0;
}


also here is the panel and it is carrying 2 Ummu on the sides
 

Attachments

  • BELL475.jpg
    BELL475.jpg
    76.9 KB · Views: 19
  • BELL476.jpg
    BELL476.jpg
    131.4 KB · Views: 21
Last edited:
Working on NH90. Attached the chinook. I hope some one can look at the code to see what the issue with keys are. Also I need to figure out how to save/load airlock state. The reason is the airlock state is tied to the animations

On the Bell47 I need to figure out how to read the id of the Ummu. SO that if you pick up a VIP ummu you see a VIP in the side.
 

Attachments

  • CHINOOK1.zip
    CHINOOK1.zip
    2.9 MB · Views: 12
  • NH901.jpg
    NH901.jpg
    145.3 KB · Views: 23
The picture of the panel is to be reworked in different points, and notably in its inferior part, but not only. I began to rework on it yesterday and I think to finish tonight. The final one, will can be also a little higher ( 10/20 px ? ).
 
Last edited:
Thanks. I think on the animation of the rotors. I think if hover thrust is set at 0-40% the animation is at one rate and then 40-70% another rate and then 70-100% another rate.

On the Bell I have it coded so if the number on board is 3 then show the mesh of a Ummu on the side and if 4 then 2 Ummus on the side.

But I need to be able to read the id (VIP, SCI, ... )so that I can make you different side meshes.
 
Last edited:
Try this Chinook. Jon before he withdrew helped me get the keys working. So to work one hoist use 4 stop, 5 up 6 down and the other is shift 4,5,6 same for attach/dettach b/n and shift b/n.

I like the sound/rotor animations. I still think I might just go with a constant rate. I have found if it is based on hover thrust then if you are at a constant altitude the hover cut off and thus the animation and sound.

Still haven't gotten the load/save airlock state working as yet.

Let me know what you like /dis like and I will see about changing that.

image of the nh90
 

Attachments

  • NH903.jpg
    NH903.jpg
    124.9 KB · Views: 19
  • CHINOOK5.zip
    CHINOOK5.zip
    3 MB · Views: 13
A big cold the latter days but I finish the picture tonight.
 
Thanks. The nh90 is almost ready for testing. One thing odd. I noticed on the Chinook and NH90 is when I apply hover the ship sunk into the floor and the mesh got dark and when it lifted it when back. Not sure why . The fix was to raise the touchdown points though.
 
Hello gattispilot,

Voila. I wanted, at least, touch up the low party (perspective and horizon line) and can be to reduce a little the reflections.

Modify the degree of definition, contrast, etc , as you wish it. If you need some others changes,(and for example if you want to incline, resize, the panel, without loss of - to much - details) says it to me.

good day.
 

Attachments

Last edited:
Try the UH90. Same keys J lowers/raises ramp.

On this It may have that when the hover is applied it lowers the mesh into the ground. Not sure why?

includes source


on the saving airlock state

I think this is right but I get an error. If door is open then airlock is open

Code:
if (DOOR_proc>.9)SetAirlockDoorState(TRUE);

this is the error I get:
.\NH90.CPP(1558) : error C3861: 'SetAirlockDoorState': identifier not found

from SDK
//ADVANCED FUNCTIONS - CONFIGURATION
BOOL SetAirlockDoorState(BOOL AirlockState);

but I have more than 1 airlock.
 

Attachments

  • NH901.zip
    NH901.zip
    4.6 MB · Views: 9
  • NH905.jpg
    NH905.jpg
    51.7 KB · Views: 15
It already remind me to have done this bad experience of a vessel that I had conceived, sinking in the ground at the the take-off in hover with nevertheless touchdownpoints well calculated, and can be in spacecraft (I am unaware of all of the C++). But I do not remember more with what.

I will look for.

With regards to the mesh that, in this circumstance, becomes black, this would it be an effect of the undershadow device in Orbiter and the landed vertical position of a vehicle on the ground ? I had read something as that at the moment of the release of Orbiter 2010 in the bug reports. Not sure, but...
 
Last edited:
UMMU SDK... remember... it is "object".SetAirlockDoorState
 
UMMU SDK... remember... it is "object".SetAirlockDoorState


Thanks. I'll try it. Not sure how to set more than 1 airlock though. Both the Chinook and NH90 have airlocks in the rear. So I guess you could parachute out. But the side doors are tied to the airlocks.


Not sure about the touchdown points. I would think that they are too high. So when thrust is applied Orbiter thinks it is in flight so gravity comes in and drops it.

Working on the Bell 47G
 
You have to first assign a key for selecting which airlock you want to use as the active one (previous/next airlock, for example), then assign a key for open/close. I don't have the docs in front of me as I'm at work, but the functionality is detailed in the UMMU SDK.

I included the source for the EAS Cortez in the OH download, so you're welcome to grab it and have a look at how I managed its 24 airlocks.

**Edit** I have the following code commented out in the Cortez because I wanted crew to enter and leave 'airlocks' (read: landing bays) freely, but you get the idea...

Code:
/*
Current configuration sets the airlock door state to always be open when the dock is active.  
This is to simulate that the bay is 'open' and crew enter and leave ships freely.  

So this section currently commented out.  
		//---------------------------------------------------------------------------
		// Ummu Key "A" Switch the virtual UMMU airlock door on/off
		if(key==OAPI_KEY_A&&!KEYMOD_SHIFT(kstate)&&!KEYMOD_CONTROL (kstate))
		{
			// switch state
			Crew.SetAirlockDoorState(!Crew.GetAirlockDoorState());
			// display state
			if(Crew.GetAirlockDoorState()==TRUE)
				strcpy(SendHudMessage(),"Airlock is now open");
			else
				strcpy(SendHudMessage(),"Airlock is now closed");
			return 1;
		}

*/
 
Last edited:
Thanks. This works. But for only 1 airlock.
Code:
void NH90::clbkLoadStateEx (FILEHANDLE scn, void *status)
{
	char *line;
	while (oapiReadScenario_nextline (scn, line)) 
	{
		// call this method to let PayloadManager to load its internal parameters
		PM_LoadState(line);

		// UMMU, Load all saved member from scenario. 
		// Return TRUE when a "UMMUCREW" line is encountered 
		// FALSE when it must pass this line to you or default parser
		if(Crew.LoadAllMembersFromOrbiterScenario(line)==TRUE)
			continue;
		if(hUcgo.LoadCargoFromScenario(line)==TRUE) // UCGO load cargo 
			continue;	


	      if (!_strnicmp (line, "GEAR", 4)) {
   sscanf (line+4, "%d%lf", &GEAR_status, &GEAR_proc);
			}

		  if (!_strnicmp (line, "RAMP", 4)) {
   sscanf (line+4, "%d%lf", &RAMP_status, &RAMP_proc);
			}
	      
		      if (!_strnicmp (line, "CABLE", 5)) {
   sscanf (line+5, "%lf",  &CABLE_proc);
			}
			  if (!_strnicmp (line, "DOOR", 4)) {
   sscanf (line+4, "%d%lf", &DOOR_status, &DOOR_proc);
			}
	
 

  if (!_strnicmp (line, "IGNITION", 8)) {
   sscanf (line+8, "%d%lf", &IGNITION_check);
			}
 if (!_strnicmp (line, "HOVER", 5)) {
   sscanf (line+5, "%lf",  &ROTOR1);
			}

		// ORBITER, unrecognised option - pass to Orbiter's generic parser
	
		        
		// ORBITER, unrecognised option - pass to Orbiter's generic parser
		ParseScenarioLineEx (line, status);
	}
SetAnimation (anim_GEAR, GEAR_proc);	
SetAnimation (anim_RAMP, RAMP_proc);
SetAnimation (anim_DOOR, DOOR_proc);		

SetAnimation (anim_CABLE, CABLE_proc);
SetAnimation (anim_CABLE1, CABLE_proc);
			

if (DOOR_proc<.1)Crew.SetAirlockDoorState(TRUE);

Code:
		if(key==OAPI_KEY_D&&!KEYMOD_SHIFT(kstate)&&!KEYMOD_CONTROL (kstate))
	{		
	//
		Crew.SetAirlockDoorState(!Crew.GetAirlockDoorState());
		// display state
		if (doorselected==0)
			{RevertDOOR ();
		if(Crew.GetAirlockDoorState()==TRUE)
			strcpy(SendHudMessage(),"Left Airlock is now open");	
		else
			strcpy(SendHudMessage(),"Left Airlock is now closed");
		}

	

if (doorselected==1)
{
if(Crew.GetAirlockDoorState()==TRUE)
			strcpy(SendHudMessage(),"Rear Airlock is now open");	
		else
			strcpy(SendHudMessage(),"Rear Airlock is now closed");

}	}

...
if(key==OAPI_KEY_MINUS)
    {
        if(iActiveDockNumber>0)
        iActiveDockNumber--;
     //   sprintf(SendHudMessage(),"Active dock number changed to: %i",iActiveDockNumber);
		if(iActiveDockNumber==0) sprintf(SendHudMessage(),"Left Airlock Selected");
		if(iActiveDockNumber==1) sprintf(SendHudMessage(),"Rear Airlock Selected");
		

        SetUMMUAirlockPos();
        return 1;
    }
    //---------------------------------------------------------------------------
    // change active dock
    if(key==OAPI_KEY_0)
    {
        if(iActiveDockNumber<2)
        iActiveDockNumber++;
 //   sprintf(SendHudMessage(),"Active dock number changed to: %i",iActiveDockNumber);
		if(iActiveDockNumber==0) sprintf(SendHudMessage(),"Left Airlock Selected");
		if(iActiveDockNumber==1) sprintf(SendHudMessage(),"Rear Airlock Selected");
		

        SetUMMUAirlockPos();
        return 1;
    }

I can exit/enter thru both. But I since the airlock state is tied to the animation. If the door or ramp is down then the airlock is open.

That one code works for 1 airlock not sure how to make it save the airlock state for more than 1 airlocks.
 
I believe only the active airlock state is set to open. IE, if I get a UMMU close to any of my other 23 'airlocks,' they can't enter the ship. All the other airlocks are set to 'closed' as it were, until made the active one. And I believe only one airlock can be the active airlock at a time. This is my understanding, anyway.

Should have clarified, by my UMMUs entering/leaving the ship 'freely,' I meant without having to go through any other procedure besides choosing the correct active airlock. Just make the one I want to enter the active one, and I can use it for EVA or transfer.
 
Ok since I have the animation tied to the airlock you could only have 1 open at at time?
 
try this new mesh and dll I centered the mesh on the y axis and it fixed it. With those frames in the rear no room for UCGO cargo.
 

Attachments

Why not reverse it, have the animation state control the airlock state? For example,
(pseudocode)
Code:
IF(door_open_animation_value = 1.0) 
THEN
crew.setairlockdoorstate(TRUE)
ELSE
crew.setairlockdoorstate(FALSE)
END IF


Honestly not sure if you could have an airlock's state be open but not active, I've never tried it.
 
Back
Top