Hardware Hardware interface of Orbiter

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,712
Reaction score
2,683
Points
203
Location
Dallas, TX
Hi, I am checking out how to interface orbiter with a physical cockpit setup? So when you fire thruster with your controller the spacecraft moves as the thrusters are firing on orbiter?
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,617
Reaction score
2,337
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Hi, I am checking out how to interface orbiter with a physical cockpit setup? So when you fire thruster with your controller the spacecraft moves as the thrusters are firing on orbiter?

Well, you can always map this to a Human Interface Device via USB, creating just a fancy game controller.

But more complex things require add-ons.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,712
Reaction score
2,683
Points
203
Location
Dallas, TX
Thanks. Above my pay about mapping. Would it be done the vessel code? I wonder what the limits are?
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,617
Reaction score
2,337
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Thanks. Above my pay about mapping. Would it be done the vessel code? I wonder what the limits are?

Well, you know the old wisdom, that my arts teacher told me once? She said: Better well stolen than badly made yourself. ;)

Just buy a fitting stick and blend it into the cockpit.

Sadly, you can't by CAN bus components for SimPits from the shelf. Then it would be easy.
 

n72.75

Move slow and try not to break too much.
Orbiter Contributor
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 21, 2008
Messages
2,696
Reaction score
1,353
Points
128
Location
Saco, ME
Website
mwhume.space
Preferred Pronouns
he/him
Some generalized USB controller input is possible as long as you can find a C++ library for it. For general controller input @ggalfi wrote some awesome code for NASSP.

If you're trying to go a bit further afield (not just controllers), still I would start with the input/output device and then try tind a C++ library for it.

That's the beauty of the OrbiterAPI being in C++, if you can write a console app to display numbers from your input device, or output to blink an LED, you can interface those with API calls.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,712
Reaction score
2,683
Points
203
Location
Dallas, TX
Sadly right now it looks like the will work for only NASSP.

What I what is one joystick to operate rotation thrusters and one to operate the translation
 

n72.75

Move slow and try not to break too much.
Orbiter Contributor
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 21, 2008
Messages
2,696
Reaction score
1,353
Points
128
Location
Saco, ME
Website
mwhume.space
Preferred Pronouns
he/him

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,712
Reaction score
2,683
Points
203
Location
Dallas, TX
@gattispilot you should be able to get joystick input from something like DirectInput https://learn.microsoft.com/en-us/previous-versions/windows/desktop/ee416842(v=vs.85)

Iirc Orbiter does something similar under the hood. There are probably some alternative FOSS APIs on GitHub if you look around.

You really just need an API that has functions you can call so you can check input levels on two controllers, and then apply those values to thruster output in clbkPreStep
Thanks. It maybe above my pay grade:)
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,712
Reaction score
2,683
Points
203
Location
Dallas, TX
So one could not plug the joystick 1 and select the tranlsation and plug in joystick 2 and select roational?
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,712
Reaction score
2,683
Points
203
Location
Dallas, TX
I am asking for someone else:"
I’m curious as to how Orbiter distinguishes Translational from Rotational joystick inputs. ???



I have our two Translational Hand Controllers (THCs) act as a single 3-axis joystick, requiring an either/or hardware input, and a null/neutral command if the two inputs conflict. The Rotational Hand Controllers (RHCs) are fighter aircraft style joysticks, mounted as sidesticks for the Commander and Pilot. If I had to, I could do some circuit and microcontroller surgery to get them to likewise behave as a single joystick."

I don't know how hard it would be to select 1 joystick for Rotational and another for translation? I guess they would be mapped. No idea how though
 

E69shango

Member
Joined
Apr 1, 2009
Messages
18
Reaction score
9
Points
18
Location
Spain
Why just don't map the different hardware to different axes through fly by wire? It allows a lot of granularity when it comes to RCS axis:
1704831145332.png
 
Top