Jump to content
The simFlight Network Forums

Movement left/right - Front/back


Recommended Posts

Hello everyone, it is my first post and I hope we get along very well.
I am doing an implementation where I use an interface in arduino for which I need to move my aircraft (a helicopter, anyone who selects the user of my application) forward, back and sides, I have made different queries in the forums and check a lot of documentation but I do not miss my purpose and it is to move my aircraft slowly in these four directions in slew mode, I must use slew mode to give control to my arduino.
I use the following offsets.

private Offset<byte> move_fb = new Offset<byte>(0x05EB);
private Offset<byte> move_lr = new Offset<byte>(0x05ED);

It works properly to move, but the change intervals are very high, it goes from 4.13 to 18 and a little more than 1 to 2 as input to FSUIPC, I want to increase the speed in these axes in a more controlled way, this problem does not I am presented by moving up and down with the following code:

private Offset<short> mover_ud = new Offset<short>(0x05E8);

I already reviewed from my beginner knowledge all the possible offsets that could be useful, but I have not achieved anything that comes close to my need, I think that maybe I require the use of a combination of accelerators (that can be controlled in slew mode) to be able better control the movement, but I can't find the right combination.

I am waiting for your comments and help, in advance thank you very much

Link to comment
Share on other sites

1 hour ago, Armandmar said:

but the change intervals are very high, it goes from 4.13 to 18 and a little more than 1 to 2 as input to FSUIPC

Sorry, but I don't understand this... What values are you actually writing to offsets 05EB and 05ED?

As the documentation states, the speed is controlled by the values that you write there, from -127 (fast forward/left) to +127 (fast backward/right) for offsets 05EB and 05ED (vertical & forward/backward) and 0-32767 for 05E8 (vertical rate).

John

P.S. Try logging offsets 05EB, 05ED and 05E8 from the FSUIPC logging tab to see what they contain.

Link to comment
Share on other sites

Thanks John.

Correct, they advance faster or slower from 1 to 127, but I need even smaller fractions, sending a value of 1 gives me an average speed of 4 and when sending 2, it throws me over 17, I need to be able to set a speed of 10.

Link to comment
Share on other sites

14 hours ago, Armandmar said:

Correct, they advance faster or slower from 1 to 127, but I need even smaller fractions, sending a value of 1 gives me an average speed of 4 and when sending 2, it throws me over 17, I need to be able to set a speed of 10.

This is  not possible via those offsets. You could try looking at the additional slew axes provided by FSUIPC: SlewAhead, SlewAlt, SlewHeading & SlewSide. However, I do not know how you would use these via the .net client dll. Or maybe even the provided key events/controls for slewing, starting with KEY_AXIS_SLEW_....

John

Link to comment
Share on other sites

Quote

You could try looking at the additional slew axes provided by FSUIPC: SlewAhead, SlewAlt, SlewHeading & SlewSide. However, I do not know how you would use these via the .net client dll

How would you send data to axes using the FSUIPC C SDK? Are there FSUIPC offsets or controls for this, or would you need to use something like DirectX or DirectInput?

Paul

Link to comment
Share on other sites

40 minutes ago, Paul Henty said:

How would you send data to axes using the FSUIPC C SDK? Are there FSUIPC offsets or controls for this,

You'd use the facility at offset 3110 to send any control. You need the Control number (from the list we provide) and whatever parameter you want for the axis value.

Pete

 

Link to comment
Share on other sites

Thanks Pete, I've found the controls.

@Armandmar I've tested this here and it it gives me very fine control over the speed of the forward movement in slew:

FSUIPCConnection.SendControlToFS(FsControl.AXIS_SLEW_AHEAD_SET, x);

Where x is the position of the axis which translates to the speed of movement. The range seems to be -16380 to +16380 with negative values moving backwards.

Other slew controls are available in the FsControl enum - e.g. AXIS_SLEW_SIDEWAYS_SET.

Paul

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.