News:

Precision Simulator update 10.173 (24 February 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 14:17

CHEDHKG

Good afternoon gents,

As a hobby, I have been learning C for the last few weeks. And what better project idea could there be to write yet another scenery bridge between PSX and MSFS. I have been flying hours with the PSX+MSFSPSX combo and all seems to function properly. But then there are surely tons of bugs and many things could certainly be better written in C....


Just a few remarks:
* When loading a new situ, it might be beneficial to reload the same situ a few seconds after the first load (MSFS tends to be lazy in updating himself)
* Works fine with the standard 747 of MSFS, and did not try other models, but should be fine too, since I do not change any MSFS config file.


So here is still a very very beta version, but which seems to work quite well (at least on my Win10 environment).

It is a no-frills application, running in console mode under Win10, but who does the job.

One of the main goals was to have a tool that would work out of the box and would not require any MSFS configuration file or modification of existing setup.
Just drop the exe and you should be ready to go (OK, almost.....)

The Git repository can be found at :
https://github.com/TheChed/PSXMSFS

Please check the README.md file that contains some info on how running this tool.

The compiled binaries are now in the Release page (which can be found on the right hand side of the git Mainpage)
or directly here :

https://github.com/TheChed/PSXMSFS/releases



Just grab the simconnect.DLL if you do not have it yet and the PSXMSFS.EXE file, copy them somewhere in your Win10 and launch the exe in console.


As of today it smoothly enslaves the standard 747 to PSX. I am adding more and more features if I think of them. As of now, all lighting, flaps, spoilers, gears should be functional.





15/05/2023

Basic configuration is done via a PSXMSFS.ini file that is automatically created on first launch of the program
values of this ini file are pretty much self-explanatory:
* LOG_VERBOSITY: from 1 (very verbose + creation of a DEBUG.TXT file), to 4 (errors only)
* SLAVE: 0 MSFS is enslaved to PSX. 1 PSX enslaved to MSFS
* ELEV_INJECT: inject MSFS elevation to PSX
* INHIB_CRASH_DETECT: no crash detection for 20 seconds after loading a new situ
* ONLINE: adjust the indicated FL to fix a bug in online networks (IVAO, VATSIM, ...)

Correct indicated FL sent to online networks (IVAO, VATSIM) (adjustable via .ini variable)
Enhanced altitude handling depending on flight phase
More smooth landing + taking off
Internal code clean-up
More safe thread operations
Added some log levels via .ini file




07/05/2022

MSFS can now inject its position into PSX
This is done by pressing the P key in MSFS.
Pressing the P key toggles MSFS between slave/master



26/04/2022:

V1.0 Release
Smoothed ground <-> Air transition
Fixed minor stability bugs

Next on to do list:
make it MSFS enslaved, or the opposite


20/04/2022:
Ironed out some stability issues.
Removed the need for external Pthread DLLs


12/04/2022:
Added Altimeter synch

10/04/2022:
Added Traffic
Added TCAS + COM synchronization

03/04/2022:
Added Nose gear steering sync
Added parsing command line
Added server+ports selections

02/04/2022:
Added time synchronization with PSX
Added rudder+elevator+aileron sync. Seems that there is a bug in MSFS: when ailerons move, spoilers move too.
Added PArking brakes sync



TODO:
*Sync Tyler
*add AI traffic (useful for IVAO+VATSIM usage)
*inject weather
*provide several startup options (DEBUG, VERBOSE, etc)
* create a graphical interface if needed or requested
*provide an optional config file
*etc.

Feel free to give it a try and if you find it useful and wish to add some features, just buzz me

Cheers,

-Stephan


B747-400

Hi Stephan,

sounds interesting. But there is no exe in the repository.

Cheers
Hans

CHEDHKG

Sorry, forgot to put it.... It was in my Makefile cleaning rules
Should be there now

B747-400


B747-400

Hi,

first flight with the standard asobo 747-8i went well.

The landing lights OutBd / InBd / R / L are switchable accordingly and independently by PSX. Thats excellent!

But the Landing and RWY Turnoff are not working properly. All nosegear lights goes on / off with RWY Turnoff L.
Turnoff R and Taxi switch are without function.

Not so important to me, because I'm in a fullsize cockpit: I had no moving elevator, ailerons, rudder etc. Flaps / spoilers are OK!

Good job so far, have fun learning C   ;)

Cheers
Hans

CHEDHKG

#5
Thanks for the feedback.

Indeed I did not modelize  (yet) the elevators, ailerons, rudders, but should be fairly easy to do.
Let me check the lighting mechanism. On my side it works but it might depend on the model and config you chose.

On my side it produces the below:

https://www.dropbox.com/s/gbxtbhnffge1a02/lights.mkv?dl=0




B747-400

You're welcome! Which model are you using?

My standard MSFS (asobo) 747-8 reacts direct in MSFS (without PSX) same as with your connector and PSX.

So obviously it is my model ...

Cheers

CHEDHKG

Hans,

I am using a Cargolux model, but with any other model it seems to work.
What is your model ?

B747-400

I tested it with the standard 747-8i and a Lufthansa freeware mod.

It was a glitch on my side - now working perfect, each switch operates the correct light. Your code is OK!!

Just to confirm: PSX time is not transferred to MSFS right now, correct?

Looking forward to upcoming releases!

Cheers
Hans

CHEDHKG

Thanks Hans,

Yes, correct, I did not yet transfer the times. Will put it on the to-do list !

Cheers

CHEDHKG

Quote from: B747-400 on Fri,  1 Apr 2022 20:11

Just to confirm: PSX time is not transferred to MSFS right now, correct?


Done. MSFS now synchronizes with PSX

Will

Stephan,

Thanks for your work on this. I don't have MSFS yet, so this is a bit theoretical for me... but how easy is it in your implementation to just have the terrain displayed? (E.g. no cockpit, no aircraft, just the landscape.)
Will /Chicago /USA

B747-400


CHEDHKG

Quote from: Will on Sat,  2 Apr 2022 14:33
Stephan,

Thanks for your work on this. I don't have MSFS yet, so this is a bit theoretical for me... but how easy is it in your implementation to just have the terrain displayed? (E.g. no cockpit, no aircraft, just the landscape.)

Hi Will,
Actually I do not deal at all with that, this is all done at MSFS level. IF you want to just have the landscape you can set up a view just in front of the cockpit and you wont see the aircraft.

joergalv

Stephan,

great tool! Works quite well, and I like the smoothness. Very well done so far!

What I noticed, while testing with MSFS default B747-8
- Parking Break is not synced
- the nose wheel does not turn, i.e. is not synced with tiller movements.
- time gets not updated in MSFS when it is changed in PSX Instructor Station.
- sudden 'visual' altitude changes during take off roll / lift off. (probably due differences in reference altitudes in PSX and MSFS Scenery ??)

Tested with P3D V5.3 as well..
You'r tool seems to connect in the first place (i.e. I get the 3 connect messages) but then it issues a 'SIMCONNECT_RECVD_ID_QUIT' message, and P3D gets not synced.

One suggestion for your future development would be to allow for different IP Addresses for PSX main and boost.

Enjoy your 'C' exercise!

Regards
Joerg

CHEDHKG

Hi Joerg,

Correct, I did not sync the parking break. Will do it in the next releases. Same goes for the nose wheel.
For the time sync, I added that feature a few hours ago. Just grab the latest exe.

As for P3D, I cannot tell you what is wrong since I dont have it. But let me see if I can be a bit more verbose.
As MSFS and P3D share almost the same SDK, connections should work. I will have a look

-S.

B747-400


Toga

It works very well and works straight out of the box. Congrats and keep up the good work! If there's a possibility to sync PSX radios with MSFS so we can connect to vatsim through vpilot that would be the icing on the cake!The connection works already and the work around currently is to just use the msfs radios to tune the required vatsim frequencies.


b744erf

I am very looking forward to the weather sync function which means a lot to pilot training, and will be the biggest difference from other visual app. Thank you very much! For now it works perfectly.

CHEDHKG

Quote from: Toga on Thu,  7 Apr 2022 14:22
It works very well and works straight out of the box. Congrats and keep up the good work! If there's a possibility to sync PSX radios with MSFS so we can connect to vatsim through vpilot that would be the icing on the cake!The connection works already and the work around currently is to just use the msfs radios to tune the required vatsim frequencies.

Sure. Should be easy to do and should be in one of the next release