KWB
-
Posts
9 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Gallery
Downloads
Posts posted by KWB
-
-
Question: What is the scope of an FSUIPC_Open?
Hint: Using the C version of FSUIPC SDK with FSX: FSUIPC 4.9.7.3 (FSX) 32 bit, my full code is attached as file.
I have a small class wrapping my FSUIPC functionality. The FSUIPC_Open itself works (returns true, DWORD result is 0)
I can also FSUIPC_READ in the same function, so far so good.bool CFsuipc::connect(bool force) { .... DWORD result; ... if (FSUIPC_Open(SIM_ANY, &result)) ...
Now in another function (read) I rely on that opened FSUIPC connection. Still the same object in memory.
bool CFsuipc::read(CSimulatedAircraft &aircraft, bool cockpit, bool situation, bool aircraftParts) { if ( FSUIPC_Read(0x0238, 3, localFsTimeRaw, &dwResult) &&
Now the read fails with "FSUIPC read error 'Call cannot execute, link not Open'` So somehow my open connection got lost. I can say for sure, the object is still the same. So where is the info of the open connection stored?
Of course I could always open in the same step as I read, but I wonder why the state of the connection does not persist?
-
Cool. Just to confirm the above, we are using also just a single point grid.
-
I can not exactly say, but there are already question about the function back in 2012: http://prepar3d.com/forum/viewtopic.php?t=7290
-
On P3D there is a function for that (SimConnect_RequestGroundInfo, not compatible with FSX), new P3D API. For FSX I create a bogus AI object and query the position at its position (kind of hack but working). For the later I still search a way to create an invisible AI object https://www.fsdeveloper.com/forum/threads/invisible-or-very-small-ai-object.442575/
- 1
-
Moved to Main Forum. Please ask questions related to FSUIPC always in Main Forum!
Is there a way to get the ground elevation for a given latitude/longitude position. I need to get the current ground elevation (representing the scenery) at a given position, which is NOT my own aircraft's position and NOT the position of another AI aircraft.
I know how to do it with FSX and P3d/simConnect, but need a similar function for FS9.
Any hint how I can do it (if possible)? -
Excellent, that's it. Thanks a lot!
Klaus
-
Hi Volker,
I want to set it to an arbitrary path, not to C:\Users\my name\Documents\Flight Simulator X Files
When setting it in the path window the changed path settings gets lost - this is my problem.
Klaus
-
I have a very similar problem with FSC 9.2. I get the message "FSX flight plan folder unspecified! Choose <Flight Simulator X Files> manually." as well. Under load/save I do set it to the correct folder (path tab). Once I switch back to the "LOAD" tab and go back to "Paths" -> same issue. The path will always be reverted to c:\users\my name\Documents.
This is how it looks in the .ini
FPPATH09=
FPPATH10=C:\Users\my name\Documents\
FPPATH11=
FSCPLANPATH=P:\FlightSimulatorAddOns\FSC9\Flightplan\FSC
SQUAWKBOXPATH=P:\FlightSimulatorAddOns\FSC9\flightplan\SquawkBox
IVAOPATH=P:\FlightSimulatorAddOns\FSC9\flightplan\IVAO
FSINNPATH=P:\FlightSimulatorAddOns\FSC9\flightplan\FSInn
I have changed it in the ini directly (P:\FlightSimulatorAddOns\FSC9\Flightplan\FSX) -> no effect. Whatever I do, after I close FSC it is always back to FPPATH10=C:\Users\my name\Documents\
The want-have-path exists, checked several times. FSC runs on a secondary LAPTOP with no FSX on it. But there is a symbolic link to FSX, which is also set in the PATHs tab. I am not talking about a shortcut, is is a real symbolic link making the FSX folder appearing as it was locally installed.
FSUIPC read error 'Call cannot execute, link not Open'
in FSUIPC Support Pete Dowson Modules
Posted
First of all thanks for the hints.
Just to make sure, for my test I use a connection via "WideFS Client", for the code I use the SDK from here: http://www.schiratti.com/dowson.html
The info is just to avoid that I use some wrong version or code base
Here is where it fails in read, I have just placed a single line for test purposes in my read function. I open in my object's connect function, then I call my read function:
FSUIPC_Read(0x0238, 3, localFsTimeRaw, &dwResult); ==> calls if (!m_pView) { *pdwResult = FSUIPC_ERR_NOTOPEN; <-- returns this value return FALSE; }
Now I did a second test and try to open just before, then failing with FSUIPC_ERR_MAP, so this means m_pView is 0, but the connection still exists. No idea how I can get into that status.
3rd version, I just close before I reopen and read. Everything works, even with my
FSUIPC_Close(); FSUIPC_Open(SIM_ANY, &dwResult); FSUIPC_Read(0x0238, 3, localFsTimeRaw, &dwResult);
Now my naive conclusion, my connection seems to get broken somewhere. If it was closed somewhere, example 2 would work. So somehow m_piew is 0, but still something is open. I am using an "all compiled" version, no libs. Compiling with VS2017, in this very case 32bit.
Maybe there is any hint, but however expect this is some odd detail.