# OHMGeneralVehicle

#### Donamy

Donator
Beta Tester
So attachment to a SC3 vessel is not possible ?

#### fred18

Donator
So attachment to a SC3 vessel is not possible ?
Sure, why not?

I'm just having some issues with sc3 myself, not related to general vehicle, but to my orbiter setup (which i'll fix some day). Due to this i couldn't properly testing your addon, but i gave a look at the files and i think that the rot vector you specified there should be 0 0 1, that's it

#### Donamy

Donator
Beta Tester
On which vehicle ?

#### fred18

Donator
In the sc3 one: you specified the rot vector as 0 0 -1, but i think it should be 0 0 1

#### Donamy

Donator
Beta Tester
I found the issue. I had to attach the SC3 vehicle to 0:1,GV_JLG_45Ebase

I didn't realize there were two attachments on the parent.

Thanks Fred !!

#### gattispilot

Is there a way you could isolate the needed stuff to add into an existing solution so the user could make their vehicle work great like your code does?

Like in Ummu/ucgo Dan had copy this and paste,....

#### fred18

Donator
Well, most of the addon is needed. But since there are a couple of options to exploit it even from other vessels (see the outer vessel option) why don't you just use that?

#### gattispilot

Thanks. Sure but there are specific vehicles that have advanced steering like 360 steering (6 wheel). I will look into it.
I have not tried a vehicle with a trailer. I guess the trailer wheels turn also?

#### fred18

Donator
Thanks. Sure but there are specific vehicles that have advanced steering like 360 steering (6 wheel). I will look into it.
I have not tried a vehicle with a trailer. I guess the trailer wheels turn also?
no, the trailer is just towed around

#### gattispilot

I have got a question:
Always_Upright = FALSE ;if set to TRUE vehicle will always remain parallel to the ideal ground, without following terrain's inclinations

If set to TRUE the vehicle won’t
follow the terrain and will always
stay aligned with the planet’s axis

So if set to true it will not follow the hills,....
I have it set as False and the vessel is upside down in the ground?

#### fred18

Donator
So if set to true it will not follow the hills,....
I have it set as False and the vessel is upside down in the ground?
Maybe inverted coordinates for front and rear axles? just guessing

#### gattispilot

Well I fixed it. I raised the center of gravity so it is riding just above the surface. It was good on a landing pad but the sank halfway down the wheel other places.

The Molab has only a front axle I added some mesh parts for the rear wheels.

I guess the trailer can be a specific vessel with an attachment point. It would nice to see the trailer wheel move.

The other thing I want to try it it to make a GV vessel of a suited guy so they could walk around. I have this in 2010with Ummu but no ummu in 2016 yet

---------- Post added 08-29-17 at 05:45 AM ---------- Previous post was 08-28-17 at 07:20 PM ----------

So by Using GeneralVehicle you can kinda get UMMU.

---------- Post added at 07:28 PM ---------- Previous post was at 05:45 AM ----------

So following the mmu code in Atlantis. I want to create a GV_UMMu vessel and dock to the vessel then undock and walk away,........

Code:
	CreateDock(_V(-1.352, 2.40, -1.132), _V(0, 1, 0), _V(0, 0, -1));
Code:
void MOLAB::SeparateMMU(void)
{
if (HATCH_proc > .8){

// Create MMU at docking port
DOCKHANDLE hDock = GetDockHandle(0);
if (GetDockStatus(hDock)) return; // something is already attached to this docking port

int i;
char name[256];
OBJHANDLE hVessel;
for (i = 0;; i++) {
sprintf(name, "%s-MMU-%d", GetName(), i + 1);
hVessel = oapiGetVesselByName(name);
if (!hVessel) break;
}

VESSELSTATUS vs;
EVA = 1;
GetStatus(vs);
hMMU = oapiCreateVessel(name, "GV_UMMU", vs);
Dock(hMMU, 0, 0, 1);

oapiSetFocusObject(hMMU);
}
}
Then the cfg for GV_UMMU:
Code:
ClassName=GeneralVehicle
Module=GeneralVehicle

Empty_Mass = 100			;[kg] empty mass (almost unused)
Cockpit_pos = 0 .456 .254	; [m m m] Position of the cockpit camera
Acceleration = 1.15			; [G] Acceleration factor expressed in Gs
Brake = 2					; [G] Deceleration factor expressed in Gs
Max_Speed = 10				; [km/h] Max Speed
Reverse_Max_Speed = 50		; [km/h] Max Speed in Reverse
Steering_Speed = .1  		; Steering wheel velocity factor
Full_Pedal_Time = 2			; [s] seconds from the beginning of pressing of Acceleration or Brake and the full power is applied
Max_Steering_Angle = 30  	; [DEG] Max steering of the front wheels per side
Height_From_Ground = 1.9	; [m] height of the center of gravity from the ground
Always_Upright = FALSE   	;if set to TRUE vehicle will always remain parallel to the ideal ground, without following terrain's inclinations
Four_Wheels_Steering = FALSE ;if true also rear wheels will steer

;Mesh Groups - just specify using space between them

;Rear_Right_Groups = 5
;Rear_Left_Groups = 6
;Front_Right_Groups = 0 3
;Front_Left_Groups = 1 4
;Middle_Axles_N = 1
;Middle_Groups_1 = 5 7 0 10

Camber = 0							;[DEG] camber angle of the front wheels, no  camber is implemented for rear wheels.

BEGIN_DOCKLIST
0 2 0   0 -1 0   0 0 1    588
END_DOCKLIST

I need to adjust the GV_UMMU DOCK. But when I undock the guy it is ok still I apply throttle it starts to spin.

#### fred18

Donator
Maybe it s just that the steering is turned

#### gattispilot

Not sure what you mean.
Well In space it works. But if I attach to a GV_vessel for the wheels part is where the issue is. I have adjusted the dock so it is above the surface.
When I undock the guy and start to move he spins maybe along the z axis?

So I got rid of the dock and just create a vessel.

I also increased the mass of the eva guy.

This is what I get when I create the guy.
Code:
EVAGUY:GV_UMMU
STATUS Orbiting Moon
RPOS 911705.615 1175612.957 893562.399
RVEL -2.7595 -0.3875 2.1751
AROT -97.704 -54.640 65.201
AFCMODE 7
IDS 0:588 10
NAVFREQ 0 0
END
Once I switch to him and give some throttle he does good.
Code:
void MOLAB::SeparateMMU(void)
{
if (HATCH_proc > .8){

OBJHANDLE OBLIVIONBIKE;
VESSELSTATUS2 vs;
vs.version = 2;
vs.flag = 0;
GetStatusEx(&vs);
VECTOR3 ofs = _V(-1.5, 1.9, -1.5);
VECTOR3 rofs, rvel = { vs.rvel.x, vs.rvel.y, vs.rvel.z };
VECTOR3 vel = { 0, 0, 0 };
Local2Rel(ofs, vs.rpos);
GlobalRot(vel, rofs);
vs.rvel.x = rvel.x + rofs.x;
vs.rvel.y = rvel.y + rofs.y;
vs.rvel.z = rvel.z + rofs.z;
vs.vrot.x = 0.00;
vs.status = 0;

VESSEL *OBLIVIONBIKE_vessel;
OBLIVIONBIKE = oapiCreateVesselEx("EVAGUY", "GV_UMMU", &vs);
OBLIVIONBIKE_vessel = oapiGetVesselInterface(OBLIVIONBIKE);
}
}
I might need to code an eva guy so that the status is always landed?

#### emin2004

##### Member
curiosity rover's body disappears can you fix it and upload it to orbithanger?

#### jacquesmomo

Bonjour Fred

I have (once again !) another question....

I understood the use of the option "Four_Wheels_Steering"

But I would like to adapt this feature for the esa truck at Kourou :
I would like that the 4 wheels of the front could turn... but in the same direction ...

I do not know if it is possible.

explanations:

The truck (it is still a prototype mesh) whith the wheels "on line"

The truck with the 4 front wheels turned: the second set of wheels does not turn in the right direction :

What I would like (photoshop editing) :

I think that is not planned, but I would like confirmation.

#### fred18

Donator
well I went around the code and made some tests but the fact is that the reference axis are hard-coded, and there is no way I see to do it without changing that bit of code in the dll.

I do not plan to update the module soon, because I'm deeply in something else at the moment (I'm back at coding and working on the space network).

BUT

Since it was quite easy but I don't have time to update the docs etc, I made a special version of the module that fits your purpose, so you can test it. If it works in some time I'll update the full addon.

attached you may find the updated dll (is for Orbiter 2016).

to obtain the effect you want, just add the call:
Code:
Inverse_Rear_Steering = TRUE
in the cfg file. Let me know if it works!

Fred

#### Attachments

• 174.8 KB Views: 5

#### jacquesmomo

Hi Fred :hello:

well I went around the code and made some tests
I do not plan to update the module soon, because I'm deeply in something else at the moment (I'm back at coding and working on the space network).
I understand... no probleme, take all time you need... :thumbup:

And thanks for your quick response ... and for the new dll for test.

It works !!!!! BUT...

I noticed a curious thing :
it works but sometimes it does not work as if "Inverse_Rear_Steering = TRUE" was not taken into account.
I have to restart the SCN one or more times, and at some point it works.

I noticed this too :
if it does not work, I move the truck forward and then I quit Orbiter.
Then I restart Orbiter with the "(Current state) .scn" and then it works.

So, I do not understand why it works sometime and why it does not work sometime again....

But I am very happy and I will be able to continue to modelize this truck ...

I give you the files so that you can test.

One more time thank you for your indispensable modules!

Jacques

#### Attachments

• 41.2 KB Views: 2
Last edited:

#### Donamy

Donator
Beta Tester
I have that problem with Orbiter 2016 all the time. If you find a solution, please let me know.:yes: