Key_tug_speed

Now I’m working on TUG SPEED … calling with int32

TransmitEvent(EventEnum.KEY_TUG_SPEED, ispeed); //ft /second

I’m not getting any effect ? Can anyone help?

What does this mean? That ispeed is an int32 datatype?

I read your earlier post about using KEY_TUG_HEADING. Are you transmitting the KEY_TUG_SPEED event after transmitting KEY_TUG_HEADING? According to the documentation, it seems like both events “trigger tug” (I don’t know what “trigger tug” even means). I haven’t done anything relating to tug in MSFS but you might be running into issues if you call KEY_TUG_HEADING then call KEY_TUG_SPEED, but I’m not sure as I haven’t done any experimenting of this myself.

What are you trying to accomplish? If you’re just looking to set the aircraft heading / speed, this can be achieved by setting the PLANE HEADING DEGREES TRUE and VELOCITY BODY Z simulation variables (respectively) using SetDataOnSimObject.

Let me know if any of this need further explanation, but I tried to be as thorough as possible given the information that you’ve provided above!

-Canthev

1 Like

thanks for the reply, I’ll look into these things … I have the TUG HEADING working perfectly now

I’m working on setting the TUG SPEED but not successful (iValue is int32 datatype)
I’ve seen some reference to VELOCITY BODY Z
also
VELOCITY BODY X
VELOCITY BODY Y

I thought this was related to the sound effects

but I’ll research it

I just used Simvars to quickly modify VELOCITY BODY Z and VELOCITY BODY X. They seem to provide me with the correct velocities* for the aircraft when setting these variables to a specific value.

*note: These velocities will be Ground Speed (not IAS or TAS). If you want to set the Indicated Airspeed or True Airspeed, use the simulation variables AIRSPEED INDICATED or AIRSPEED TRUE (respectively) instead. I also tested these in Simvars, and setting AIRSPEED INDICATED to a certain value will give you the correct aircraft speed such that your indicated airspeed matches what you set it to using Simvars.

If you’re only setting these values once and are using the built-in physics, your aircraft might not stay at that speed/heading. This is because the powerplant might not be set to sustain that airspeed (read: your throttle might not be aligned with whatever airspeed you want to hold). If you’re setting the speed and heading every simulation frame, this isn’t an issue.

Finally, IS ALTITUDE FREEZE ON, IS ATTITUDE FREEZE ON, IS LATITUDE LONGITUDE FREEZE ON are all simulation variables that you can set to 1 to lock your aircraft position and attitude. This allows you to then manually set the position and attitude every simulation frame to have the aircraft fly however you’d like. This effectively eliminates the physics engine (in tandem with the SimConnect function SimConnect_AIReleaseControl()), but you’ll need your own physics engine to then update the position and attitude every simulation frame.

It’s unclear what you’re trying to accomplish but all the above variables should be able to get you there.

1 Like