• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Reading EYEPOINT DYNAMIC OFFSET struct

Messages
516
I've been trying to read EYEPOINT DYNAMIC OFFSET data from FSX using SimConnect and not having any luck. It just doesn't generate any events. (Other things do so I know my code and SimConnect is working.)

After connecting I do:

hr = SimConnect_AddToDataDefinition(mhSimConnect, DEFINITION_1, "EYEPOINT DYNAMIC OFFSET", "");

To request it I do:

hr = SimConnect_RequestDataOnSimObject(mhSimConnect, REQUEST_1, DEFINITION_1, SIMCONNECT_OBJECT_ID_USER,
SIMCONNECT_PERIOD_SIM_FRAME, 0, 0, 0, 0);

Then to receive it in my callback:

switch(pObjData->dwRequestID)
{
case REQUEST_1:
{
struct SIMCONNECT_DATA_XYZ *pS = (struct SIMCONNECT_DATA_XYZ*)&pObjData->dwData;
...
...
break;
}
...
...

Yet this event never gets called. Any idea what's wrong?

All I really want to do is run a check every frame to try and determine whether the currently focused window is inside or outside the aircraft or not, so I can direct SetCamera6Dof commands to the VC only and suspend them if the user changes the view.

Thanks,

Si
 
Update:
It appears that "EYEPOINT DYNAMIC OFFSET" throws SIMCONNECT_EXCEPTION_NAME_UNRECOGNIZED.

Si

Edit: Of course it does. It should be "STRUCT EYEPOINT DYNAMIC OFFSET"...

Edit 2: All working now. One of those things where I went randomly changing things when it didn't work initially and broke something that was ok.

For anyone that wants to know an easy way of determining whether the user is in the 2D cockpit, VC or external views, you can read this structure and then analyse the results. If they're all < +/1 approx 1 ft then you're in the VC (to take account of G induced head position movement.) All stable at 0 (or stable away from that if the user has moved the chair) then you're in 2D, other than that you're outside.
 
Last edited:
Scrub that. Looks like it doesn't work after all. It just seems to return the VC eyepoint regardless of which view you're actually using. Darn...

Si
 
I discovered that I can trap the "View" event, which initially tells me whether the current view is VC or not and then sends another event everytime the user changes the view. This works, but only if you have one sim window open. If I have two or more views open then it doesn't send an event when the user changes focus to a different window. (Which is a shame.)

Si
 
Spam?! Thanks a lot.

I posted here looking for help, and thought I was being helpful posting updates so that anyone else who's looking at the same problem might follow my progress and either not fall into the same traps or spot what I've done wrong and find a solution.

Perhaps I shouldn't have bothered.

Si
 
Spam?! Thanks a lot.

I posted here looking for help, and thought I was being helpful posting updates so that anyone else who's looking at the same problem might follow my progress and either not fall into the same traps or spot what I've done wrong and find a solution.

Perhaps I shouldn't have bothered.

Si

Simon

You mis understand. There is a new spamming method that adds spam messages to existing threads. This was done on your thread. I removed it so that you will not be able to see it. You thread is just fine. Apologies for the mis understanding. I have deleted the original posts mentioning spam
 
Last edited:
Simon,

Please accept my appologies. I did not mean to imply your post was SPAM. There was a reply in the thread that had nothing to do with your post. I was leary of including the message in quotes. I should have at least indicated the authors name.

Again very sorry.
 
Back
Top