Jump to content
The simFlight Network Forums

Recommended Posts

Posted

I'm involved in a free 6-degrees-of-freedom webcam-based headtracking program called Freetrack, http://www.free-track.org, and due to popular request I'm implementing FS2004 support. I've managed to get FSUIPC to control yaw, pitch and roll in FS2004 using the AXIS_PAN_HEADING, AXIS_PAN_PITCH and AXIS_PAN_TILT controls respectively (very easily). I also want to get an additional 3 degrees of freedom (translation), I tried using the eyepoint controls, specifically EYEPOINT_UP, EYEPOINT_DOWN, EYEPOINT_RIGHT, EYEPOINT_LEFT, EYEPOINT_FORWARD, EYEPOINT_BACK but these are simple on/off keys and the results are, as you would expect, poor.

According to FSUIPC docs the viewpoint offset cannot be written to, which I tested and confirmed. But it is possible to write to the tower (and to a less extent the spot view), which is a bit odd.

I've searched for other FS2004 view control programs, like ActiveCamera, but none appear to be able to write the viewpoint position in virtual cockpit mode (ActiveCamera just uses the eyepoint keys).

However the TrackIR FS2004 module, under the company name GoFlight Inc. is able to do it, so it IS possible...

Posted

According to FSUIPC docs the viewpoint offset cannot be written to, which I tested and confirmed. But it is possible to write to the tower (and to a less extent the spot view), which is a bit odd.

Yes, it is. But I believe the tower view has been used in programs to provide automatic fly-by facilities.

However the TrackIR FS2004 module, under the company name GoFlight Inc. is able to do it, so it IS possible...

I don't think GoFlight has anything to do with TrackIR -- TrackIR is made by a company called Natural Point, I think ...

... and of course they don't publish details of their methods. I'm not going to hack into such third party programs to find out, sorry.

If you do find a way to do it please let me know. You might also want to look at FSX as it is completely different. There are ways of setting up cameras (via SimConnect, not FSUIPC), but oddly, as yet, no way of reading existing camera details.

Regards

Pete

Posted
Yes, it is. But I believe the tower view has been used in programs to provide automatic fly-by facilities.

Intuitively, I can't see why writing to the virtual cockpit viewpoint should be any differently from writing to the tower viewpoint.

I don't think GoFlight has anything to do with TrackIR -- TrackIR is made by a company called Natural Point, I think ...

Correct, TrackIR is made by NaturalPoint, but the module company name is GoFlight Inc.

... and of course they don't publish details of their methods. I'm not going to hack into such third party programs to find out, sorry.

Of course, I just wanted to indicate that it has been done and is not impossible.

If you do find a way to do it please let me know. You might also want to look at FSX as it is completely different. There are ways of setting up cameras (via SimConnect, not FSUIPC), but oddly, as yet, no way of reading existing camera details.

To go from only reading to only writing, seems like two steps forward and one step back but I guess there must be a logical reason.

Freetrack already uses the SimConnect interface for full 6dof head tracking in FSX, but there's a strong FS2004 following that desire, nay, demand 6dof head tracking support.

Also of interest, the aircraft.cfg file has an eyepoint setting that allows you to use convenient relative coordinates (instead of lat/long/alt) to locate the eyepoint relative to the aircraft, it can even be changed while fs9 is running but is only applied when the aircraft is loaded.

Posted

Correct, TrackIR is made by NaturalPoint, but the module company name is GoFlight Inc.

Really? GoFlight make NaturalPoint's software for them? Is the DLL the 'module' you mean? Else I'm confused.

Also of interest, the aircraft.cfg file has an eyepoint setting that allows you to use convenient relative coordinates (instead of lat/long/alt) to locate the eyepoint relative to the aircraft, it can even be changed while fs9 is running but is only applied when the aircraft is loaded.

Yes, I know. It's also settable in the FS menus, isn't it? Presumably NaturalPoint (or GoFlight?) have found a way to do it on-the-fly. It would be a matter of tracing the code from the menu changes to find out where to hook.

Regards

Pete

Posted

Really? GoFlight make NaturalPoint's software for them? Is the DLL the 'module' you mean? Else I'm confused.

TrackIR3 comes with 2 dlls, one for fs2002 and the other for fs2004 that need to placed in the modules directory, they're both the same size down to the last byte.

FS2002 dll:

Company Name: GoFlight Inc.

Product Name: Eye Control Tech TrackIR

FS2004 dll:

Company Name: EyeControl Technologies - Naturalpoint TrackIR

The NaturalPoint website states: "NaturalPoint would like to thank the following for their assistance in bringing TrackIR Enhanced support to these great titles: (1) Sam Jessup for FS 2004, Combat Flight Simulator 3, Richard Burns Rally, and F1 Challenge; (2) Ken Finney for the Torque Game Engine; and (3) Ron Erickson for Arvoch Conflict, and the DarkBasic Engine."

Yes, I know. It's also settable in the FS menus, isn't it? Presumably NaturalPoint (or GoFlight?) have found a way to do it on-the-fly. It would be a matter of tracing the code from the menu changes to find out where to hook.

I haven't been able find any virtual cockpit eyepoint setting in the menus, all the websites I've found related to the matter involve editing an aircraft cfg file (actually panel.cfg for the vc, aircraft.cfg is for the 2d panel).

Posted

TrackIR3 comes with 2 dlls, one for fs2002 and the other for fs2004 that need to placed in the modules directory, they're both the same size down to the last byte.

FS2002 dll:

Company Name: GoFlight Inc.

Product Name: Eye Control Tech TrackIR

Ah, FS2002not seen one for that. I have a TrackIR4 running on FSX only. Its software uses SimConnect and I'm pretty sure it's nothing to do with GoFlight.

Seems like GoFlight and TrackIR had some commonality years ago (FS2002 now being, what, 6 years old?)

I haven't been able find any virtual cockpit eyepoint setting in the menus

Ah, I'm probably confusing it with the viewpoint setting.

Without an on-line method of setting it, tracking it through the code in a debugger/disassembler is a bit of a nightmare!

Regards

Pete

Posted

I've found the addresses in FS2004 for writing the position of the virtual cockpit eyepoint.

Three 2-byte signed short types:

05D2AD66 Left: (-ve) Right: (+ve)

05D2AD68 Up: (+ve) Down: (-ve)

05D2AD6A Forward: (+ve) Back: (-ve)

Would you be able to put them in FSUIPC?

Posted
I've found the addresses in FS2004 for writing the position of the virtual cockpit eyepoint.

Three 2-byte signed short types:

05D2AD66 Left: (-ve) Right: (+ve)

05D2AD68 Up: (+ve) Down: (-ve)

05D2AD6A Forward: (+ve) Back: (-ve)

Would you be able to put them in FSUIPC?

I don't know. I never use fixed virtual addresses -- are you sure they are truly Globals? Most stuff in FS2004, it being written in C++, is allocated on the heap or stack as objects are created, so a lot depends on the timing and order of initialisation. I'd need to find links to them. I'll certainly take a look.

Additionally, if I do support them in FS2004 I'd like to be able to in FSX -- forward compatibility being the paramount raison d'etre of FSUIPC. Having done so well in FS2004, do you think you can do the same in FSX?

Regards

Pete

Posted
I've found the addresses in FS2004 for writing the position of the virtual cockpit eyepoint.

Three 2-byte signed short types:

05D2AD66 Left: (-ve) Right: (+ve)

05D2AD68 Up: (+ve) Down: (-ve)

05D2AD6A Forward: (+ve) Back: (-ve)

Would you be able to put them in FSUIPC?

I've checked these, and they are not fixed. On my system I don't know where they are -- not those addresses for sure -- and I suspect even on yours they aren't necessarily consistently where you've found them. Those addresses are outside any actual module, in heap-space land, which means they are in structures allocated dynamically.

I don't know how you found them, but you need to go further -- find out how they are reached through object pointers and so on. You need to find somewhere in the FS code which refers to them, probably via a handle/pointer -- which may, again, be in dynamic space. And so it goes. In many parts of FSUIPC I have to track through one pointer to one object in order to get a pointer to another, and so on and so on.

One other thought. You aren't using TrackIR are you? If so, are you sure those addresses aren't within the TrackIR DLL rather than FS?

Regards

Pete

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.