News:

Precision Simulator update 10.180 (14 October 2024) is now available.
Navburo update 13 (23 November 2022) is now available.
NG FMC and More is released.

Main Menu

New scenery bridge tool between PSX and MSFS

Started by CHEDHKG, Fri, 1 Apr 2022 13:17

CHEDHKG

Hi Peter,

Indeed, this is something a few of you asked and since it seems to be a popular demand, I will start workign on it.

My original goal was to have MSFS being a slave, but then, what the heck..... let's see how I can have a switch between who is the master and who is the slave.

How would you guys have this work:
Via a time out (MSFS starts as the master then after x seconds it is PSX turn) ?
Via a key that could be configured in MSFS (pressing this key in MSFS would make MSFS the slave and vice versa) ?
Other ?

-S.

PS: I fixed some nasty bugs recently and now the tool is much more stable. I would suggest to download the latest version that irons out some of those bugs

Britjet

Thanks Stephan,

For me a key would be best for the slave swap - it can take some time to get the MSFS position right before slaving PSX to it..
Thanks for all this - particularly impressed by the immediate time changes from PSX to MSFS!

Peter.

B747-400

Hi Stephan,

great job! Thanks for all your efforts!

As some of us are running a full cockpit and may have no (easy) chance to enter some keypresses in MSFS: a Keypress in PSX (perhaps a CDU command?) can trigger this as well?

Cheers
Hans

CHEDHKG

Quote from: B747-400 on Wed, 13 Apr 2022 14:56
Hi Stephan,

great job! Thanks for all your efforts!

As some of us are running a full cockpit and may have no (easy) chance to enter some keypresses in MSFS: a Keypress in PSX (perhaps a CDU command?) can trigger this as well?

Cheers
Hans

Well,
I guess both are doable. Let me see how I can do that.

-Stephan

Jeroen Hoppenbrouwers

Go for a keypress or so first. MCDU support is much more involved than may seem at first sight. You need to program a complete terminal emulator to get acceptable stuff.

Unless you really only install a <SLAVE   <MASTER   LSK on the MAIN MENU.

CHEDHKG

Quote from: Jeroen Hoppenbrouwers on Thu, 14 Apr 2022 22:35
Go for a keypress or so first. MCDU support is much more involved than may seem at first sight. You need to program a complete terminal emulator to get acceptable stuff.

Unless you really only install a <SLAVE   <MASTER   LSK on the MAIN MENU.

Jeroen,

I was also going for that approach. The only worry I have is that people can customize their MSFS setup, and thus assigning a key could potentially have some weird effects....

The other solution I thought of was to, as you mention, use the MCDU, one of the TELEX pages to trigger the fact that PSX should behave as slave

VolleyballCALVA

Quote from: JohnH on Tue, 12 Apr 2022 18:21

Thank Alex, I tried what you suggested and PSXMSFS connected to PSX however the MSFS 747 does not move with the PSX aircraft??

John

Same here, I tried to connect PSX with MSFS but sometimes the aircraft is in the middle of ocean, sometimes the aircraft in MSFS seems to be under ground, and every time the aircraft in MSFS doesn't move with PSX, same with the lights etc.

Any help would be appreciated. Thanks in advanced

CHEDHKG

Hi Volleyball,

Some more details would be helpful in trying to debug your situation.

What is your set-up ? Are PSX and MSFS on the same computer ? Are you networking ?
Do you launch PSXMSFS only once you have MSFS up and running?

By default PSXMSFS tries to position your aircraft at LFPG, then only it tries to position itself according to PSX.

-Stephan

VolleyballCALVA

Hello Stephan,

Thank you very much for the reply.
I have only one computer, so PSX and MSFS are on the same computer. I assume in this case, I can use the default IP address of 127.0.0.1?
The actions I done was like this:
1. Start MSFS
2. Set the start position ( In this case, EBBR RWY 01), Select aircraft (Default B747-8i), Press Fly on bottom right.
3. After the loading done, press fly again, and I was sit in the cockpit of MSFS' 747.
4. Start Aerowinx PSX and wait to loading complete. Set position of PSX to EBBR gate 228 or RWY07R.
5. Start PSXMSFS.exe (tried both with or without admin)
Then I got the result I described.

System is Windows 10 Professional. I have downloaded both the bin and include folder, tried to mix the 2 into 1 folder but same result.

Please tell me if you need more information. Thank you!

CHEDHKG

Looks good to me...
Just a thought, any special local settings, such as comma separator, etc ?
When you launch PSXMSFS.exe, what messages are shown in the console window?

I built another exe with some additional debug info:

https://www.dropbox.com/s/gz4exd8pbbhqimg/PSXMSFS_DEBUG.exe?dl=0


Could you try with this one? It should create a file called DEBUG.TXT with some more info.

Thanks

VolleyballCALVA

Thank you! I tried the debug one but is it normal that it only runs for about 3 to 5 seconds then disappeared by itself? And I have no idea where it create the debug.txt.
The first 4 row of text showed on the debug window is the same with the normal one. Which as follows:

opening: 127.0.0.1:10747
Connected to PSX main server on 127.0.0.1:10747
Connected to PSX boost server on 127.0.0.1:10749
Connected to MSFS

On the debug one, there are one more row
***** EXCEPTION=3 SendID=2 Index=-1 cbData=24

Thank you.

Jeroen Hoppenbrouwers

Just to avoid confusion: most people nowadays just click on .exe files in a folder browser, and therefore they lose the command window immediately after the program exits.
For most command window applications, it is technically better to run them manually in a window. Typically:

* Browse to the file in the normal Windows Explorer.
* Click in the Explorer file name bar, which then swaps into the file name of the folder you're in.
* Type cmd and enter.

You now have a command window in the correct folder.
On the command line type the whatever.exe and enter.

Now when the program ends, you don't lose its output.


Hoppie

CHEDHKG

Quote from: VolleyballCALVA on Mon, 18 Apr 2022 19:28
Thank you! I tried the debug one but is it normal that it only runs for about 3 to 5 seconds then disappeared by itself? And I have no idea where it create the debug.txt.
The first 4 row of text showed on the debug window is the same with the normal one. Which as follows:
[...]
Thank you.

Volley,
Forgot to mention, please launch the exe with the -v flag (verbose flag). And the file DEBUG.TXT should be created in the same directory as the exe

-Stephan

VolleyballCALVA

Quote from: Jeroen Hoppenbrouwers on Tue, 19 Apr 2022 09:49
Just to avoid confusion: most people nowadays just click on .exe files in a folder browser, and therefore they lose the command window immediately after the program exits.
For most command window applications, it is technically better to run them manually in a window. Typically:

* Browse to the file in the normal Windows Explorer.
* Click in the Explorer file name bar, which then swaps into the file name of the folder you're in.
* Type cmd and enter.

You now have a command window in the correct folder.
On the command line type the whatever.exe and enter.

Now when the program ends, you don't lose its output.


Hoppie

Cool! I never know this tip, I always use the cd commend that's way slower. Thank you very much for the tip!

VolleyballCALVA

Quote from: CHEDHKG on Tue, 19 Apr 2022 10:04

Volley,
Forgot to mention, please launch the exe with the -v flag (verbose flag). And the file DEBUG.TXT should be created in the same directory as the exe

-Stephan

Thank you! Both the debug one and normal one worked with the -v flag and I have done a flight from EBBR RWY25R to EBBR RWY19 with smoothness. But the problem is it seems like the PSXMSFS won't sync the terrain data from MSFS to PSX. So in MSFS I seem to be on the RWY, but in fact, I was under ground. So after I rotate and the aircraft lift off into the air mode, I jumped to under ground and gone through the runway surface into air. Same thing happened on landing that I sunk into the ground and when touch down, I jumped back to the runway surface. I think it's normal for now?

Following is the debug.txt generated by the PSXMSFS_Debug.exe
***** EXCEPTION=3  SendID=2  Index=-1  cbData=24
***** EXCEPTION=3  SendID=3  Index=-1  cbData=24
***** EXCEPTION=3  SendID=4  Index=-1  cbData=24
***** EXCEPTION=3  SendID=42  Index=1  cbData=24
***** EXCEPTION=24  SendID=43  Index=1  cbData=24
Tue Apr 19 16:26:32 2022
PSX:     Alt: 156   Lat: 50.901   Long: 4.488   Head: 154.6   Pitch: 0.00   Bank: -0.10   TAS: 0.0   IAS: 0.0   VS: 0.0   
Tue Apr 19 16:26:32 2022
MSFS:     Alt: 191   Lat: 50.901   Long: 4.488   Head: 154.6   Pitch: 0.00   Bank: -0.10   TAS: 0.0   IAS: 0.0   VS: 0.0   GearDown: 1.0   FlapsPosition: 0.0   Speedbrake: 0.0   Lights: 0000000100001   rudder: 0.0   elevator: -3120.8   ailerons: 4096.0   

Thank you.

CHEDHKG

Quote from: VolleyballCALVA on Tue, 19 Apr 2022 16:31

Thank you! Both the debug one and normal one worked with the -v flag and I have done a flight from EBBR RWY25R to EBBR RWY19 with smoothness. But the problem is it seems like the PSXMSFS won't sync the terrain data from MSFS to PSX. So in MSFS I seem to be on the RWY, but in fact, I was under ground. So after I rotate and the aircraft lift off into the air mode, I jumped to under ground and gone through the runway surface into air. Same thing happened on landing that I sunk into the ground and when touch down, I jumped back to the runway surface. I think it's normal for now?
[...]
Thank you.

Glad it worked now !
Indeed I have to think about how to handle those jumps in ground elevation... I wanted to have strictly MSFS as a slave, but seems I need to tweek a little.

On my todo list

Cheers,

-S.

VolleyballCALVA

Thank you very much for your help! It seems I have to go with -v every time? Really looking forward to the future updates. Thank you for the effort!

Best Regards,
-V.

Jeroen Hoppenbrouwers

This problem has been encountered before, of course -- there were about 8 scenery generator linkers before. At altitude the small differences don't matter but close to the ground, the scenery generator HEIGHT above ground needs to match the PSX HEIGHT above ground. There have been various solutions, ranging from "PSX dictates from its database and MSFS needs to be tweaked" to "MSFS scenery dictates and PSX needs to be tweaked". An interesting issue is for example that PSX recognizes sloped runways and MSFS does not (maybe the latest re-issue does, I don't know; X-plane does).

I think you need to look around what others did and make use of the special variables PSX has to make this problem easier to solve. Unfortunately I don't have sufficient knowledge of this particular problem to help out much.


Hoppie

CHEDHKG

Quote from: Jeroen Hoppenbrouwers on Wed, 20 Apr 2022 22:06
This problem has been encountered before, of course -- there were about 8 scenery generator linkers before. At altitude the small differences don't matter but close to the ground, the scenery generator HEIGHT above ground needs to match the PSX HEIGHT above ground. There have been various solutions, ranging from "PSX dictates from its database and MSFS needs to be tweaked" to "MSFS scenery dictates and PSX needs to be tweaked". An interesting issue is for example that PSX recognizes sloped runways and MSFS does not (maybe the latest re-issue does, I don't know; X-plane does).

I think you need to look around what others did and make use of the special variables PSX has to make this problem easier to solve. Unfortunately I don't have sufficient knowledge of this particular problem to help out much.


Hoppie

Hi Hoppie,

Absolutely. I have already tried various different approaches some of which are more interesting that others. I am still trying though to keep MSFS enslaved to PSX as much as possible. Let's see what comes out of it. I might offer two different options too, if not too complicated to implement.

-Stephan


kiek

Hi guys,

MSFS has sloped runways and taxiways. 

In PSXseeconTraffic I have solved that by monitoring 5 times per second (via SimConnect) whether the aircraft is on the ground ("SIM ON GROUND") and if so taking the groundAltitude ("Ground Altitude") +  the static altitude of the ac to the ground from center of gravity ("Static CG to Ground") for the next altitude of the aircraft in MSFS.

Works good.

Aircraft now also perfectly follow the slopes of the bridge over the motorway from runway 25R to the EDDF airport stands.

Nico