Code Monkey home page Code Monkey logo

freesharedcockpit's Introduction

FreeSharedCockpit

An open source free XPlane 11 Shared cockpit plugin development

Hi Guys,

Iโ€™m trying to develop a free and open source shared cockpit software that works with XP11. I have written my own python script to synchronise Xplane Datarefs across 2 computers over UDP protocol.

I know that there are alternatives out there for shared cockpit already, and the reason why I am doing this is because:

  1. JoinFS doesn't work for shared cockpit on XPlane 11, trust me, I've tried everything to make it work...
  2. Smartcopilot is way too expensive for single license
  3. Teamviewer and Discord Screenshare does not provide a shared cockpit experience
  4. An open source, free for all shared cockpit software that allows customisation would allow much more people to benefit from it, without paying a single cent.

The main target group of people that this program would potentially benefit are:

  1. Folks who play XPlane offline, but are too scared to go on VATSIM online. Flying shared cockpit where the instructor and student are in the same plane will allow splitting of the workload, making it a less daunting task - I would certainly love to have an instructor with me on my first VATSIM flight!
  2. Folks who are training for their VATSIM P ratings - discord screenshare or teamviewer is just inferior to a shared cockpit environment
  3. Folks who just want to have fun flying together in a crew

An XPlane shared cockpit software is essentially a piece of software that syncs Xplane datarefs between 2 computers, such that moving the controls/switches on one computer causes a synchronised change on the other.

As can be seen in the video below:

https://youtu.be/luqvsnya1GA

A big step forward now compared to the previous, aircraft attitude, heading and position are now synced exactly from master to slave. Again, the same setup, the laptop on the left is the slave computer, having the plane mirrored to the master Desktop on the right. Both sceneries look different because my laptop can only run on minimal settings while my desktop is running on high and you can see the ground features much better.

Next steps would be to:

  1. Create a single common script file for both master and slave computers
  2. Allow toggle of control inputs between master and slave, the toggle button (on the master computer) should:
  • Slave: Enable the physics model
  • Master: Disable the physics model
  • Slave: Stop setting aircraft position, attitude, velocities from the master
  • Master: Set aircraft position, attitude, velocities from the slave
  1. Untoggling the switch should perform the above but in reverse
  2. Create a GUI for the toggle button, Slave/Master IP address and Ports input box, connect button
  3. Sync the engine on/off state
  4. Sync the cockpit/autopilot switches
  5. Optimise for speed - cut down precision of variables, code cleanup
  6. Write an instruction manual - required dependencies etc...

Once we reach this stage, it will be time to publish an early beta of the software!

How to use:

  1. Edit both files FreeSharedCockpitUDPSenderMaster.py and FreeSharedCockpitUDPSenderSlave.py and change the ip address of the "host" variable to the IP address of the other computer you are trying to connect to. (i.e: Master should input the slave's IP and Slave should input the Master's IP)
  2. The PI_FreeSharedCockpit_pluginMaster.py script is to be placed in the PythonScripts folder under Xplane plugins folder on the Master computer, and the corresponding PI_FreeSharedCockpit_pluginSlave.py in the Xplane plugins folder on the Slave computer.
  3. Run the FreeSharedCockpitUDPSenderMaster.py script using the command line on the master computer and FreeSharedCockpitUDPSenderSlave.py on the slave computer.
  4. Load up Xplane on both master and slave at same airport (does not need to be the exact same location at the airport) and make sure that both have the exact same scenery
  5. On the slave computer, click on the dialog box once to start syncing the position of the slave to the master computer, the state of the aircraft on the slave computer will snap to reflect that on the master computer. Click the dialog box again to unsync.
  6. Start flying on the master computer, the aircraft on the slave computer will be synced!

Anyone keen to help me in this project please feel free to contribute! Thanks for viewing!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.