Virtual Cockpit / Remote Cockpit

Thanks for the moral support @ecdcrew, as a minor update, I have implemented 2 of the outstanding points mentioned in my previous post:

  • Move up/down/left/right now works
  • Descriptions of SimVars now shown in the Instrument designer

I wonder if anyone has a list of all the available instrument types you might find in any cockpit?

That would save me a bit of time researching them, I only need a common name for each (like Altimeter, Attitude Indicator, Airspeed Indicator, etc.). I can then add these to the Enum list used as a drop-down for designing new instruments.

Deciding which item I should tackle next, I will probably add the ability to remove Variable Requests from the server.

Dragonlaird

Weekly update.

Not much to report this week, I’ve been working hard at the day job but I’ve still been able to make a bit of progress.

As mentioned above, I have implemented the Move up/down/left/right animation actions, which seem to work well in the Generic Attitude Indicator I created to test with.

Descriptions of each SimVar (Client Request) is displayed in the Instrument Designer, a minor tweak but helpful when trying to decide which of the many SimVars you want to use.

I have refactored the custom (self-contained) plugins, placing each into their own project for a couple of reasons.

  1. Each custom plugin now compiles into its own DLL, confirming that other custom plugins designed by others will be useable by the cockpit display.
  2. Custom plugins are now in a “Samples” folder, provided as examples for others to review if they are building their own.

In addition, I have started developing the code to connect to remote services, to retrieve maps (initially) for a GPS plugin.

This also requires changes to the Instrument Designer, to allow users to edit their own remote services.

Quick update, seems whilst developing the remote services code, I also need to write the code for processing mouse clicks to make it interactive, exciting turn of events.

This is so the GPS Instrument can be zoomed in/out.

Weekly update.

I’m still working on developing the remote services feature - I can now download remote maps and display them, although I’m trying to cache the images and scale them appropriately, to negate/remove any costs for users, as the service I’m currently using allows 50k images per month for free, which sounds a lot, but in truth, if an updated image was retrieved every few seconds, an avid FS user would probably hit that limit in a few days, when they’re only retrieving the same map, that’s only moved a few pixels.

The service has many other features that might be useful as future enhancements, such as overlays for route planning or displaying waypoints, etc. It also allows overlays for landmarks and other objects and can display may different types of map, such as roadmaps, terrain, satellite images and more.

Over the next few weeks I will be very busy with real-life work, due to a new project rollout I’m heavily involved in, over Xmas. so I’m not sure how much I will be able to do on this before the New year, however, my aim is to tidy up the code a little and push it to GitHub for others to start reviewing and using.

I’m conscious that, once I release this, I could be inundated with requests, bugs and ideas, which I’m not currently able to handle due to real work, but I don’t want to disappoint people by ignoring their messages.

This is one of the main reasons I asked if anyone was wanting to collaborate on this project right at the start of this post. I’m also aware that any time spent on fielding such requests will take time away from the actual development of new features.

I guess it’s just one of those things I’ll need to deal with when the time comes.

In short, it’s getting close to the first beta release, however, it is likely to very incomplete and contain lots of bugs. I will need to add an installer for the compiled code (I doubt many readers will want to compile it and copy files themselves).

I’ll keep you all updated on the progress of that when I’ve completed the remote service code.

A little late in my weekly update due to the festive season.

Well, I’ve paused the development of the Remote Image feature for now.

This feature is proving a little more complex than expected, as the Paint event of controls requires the image to immediately available. Obviously, it isn’t available at that time, as it still has to be fetched, so I’ll need to pre-fetch it before the Paint event can be triggered.

That said, I have added an Installer to the project, in preparation for publishing it to GitHub. My aim is to provide an installable application for the cockpit display, some shortcuts to allow users to install the remote server as a windows service (and obviously uninstall it), and a draft copy of the Instrument Designer.

There will be some samples of instruments included, otherwise, there would be little point in providing it.

I’ve checked the results of the instruments against the actual cockpit instruments to confirm they do display the same results (see image below, both sets of instruments are visible for comparison), these are likely to be the initial instruments provided by the installer.

At present, the cockpit is hard-coded to look for the server component on the same PC, I’ll modify the cockpit to provide users with the ability to enter the address/port of the server component, then it can be released.

Be aware, this is an ALPHA test, not even good enough to be considered a BETA yet, the Instrument Designer doesn’t include all the options for editing instruments, and is likely the files will be read-only anyway (The Visual Studio Installer project is very limited in its capabilities).

I should also point to, the Remote Server shortcuts will require a user to use the “Run As Administrator” option, as a Windows Service installation requires elevated permissions. This isn’t something I can build into the shortcut itself, due to a limitation of the Visual Studio Installer Project (it really is very limited in its capabilities).

Should be released for you to test very soon, watch this space.

Dragonlaird

Guess what I managed to get working…

GPS image now displays correctly - I’m going to add the code to zoom in/out, then I’ll be releasing the alpha version for people to test.

I’ve been a bit busy over the holidays, hope you all enjoyed them and are keeping safe, personally, I was working (real-life) throughout, and today is the launch of a major project at work, something I’ve been working towards for over 3 years, hence I’ve not been able to spend much time on this project.

Fingers crossed things will settle down to a dull roar at work so I can actually spend more time doing my own thing.

Dragonlaird

Apologies for the delay in providing an update this week. I’m under a lot of pressure with work after the recent launch of a major project.

But you’re not interested in that, you want to see progress right?

OK, so this week I’ve added a new instrument - a bearing indicator. Also modified the generic layout of the cockpit to make room for more instruments.

In case anyone was wondering if instruments can be moved anywhere or only displayed in a line, as all the images you’ve seen so far, always show them in a straight line, the answer is, you can move them wherever you want. You can also make them any size you want, independent of each other.

So here’s another screenshot, where I’ve moved the instruments (slightly) and add the new Bearing Indicator.

But wait, there’s more… Some of the observant amongst you will have noticed there’s now an aircraft outline on the GPS, and yes, it does rotate when the heading changes.

As if that wasn’t enough, the Installer now auto-installs the Server service component, there are several shortcuts in a Program Menu, a shortcut to which is also placed on the desktop. There’s also some initial documentation (text files) to explain each main component and finally, you can start, stop, install and uninstall the service.

image

The next change will be to add the zoom buttons to the GPS, not a vital change I’ll admit, but I need to confirm it works (the zoom, not the GPS - that’s obviously working already).

Then finally, revise the Instrument Designer application, so everyone can build their own instruments and maybe start a community-driven collection for everyone to share.

Then, I’ll release the Installer so you can try it yourself. Maybe as soon as a couple of weeks!

I’m expecting a fair amount of feedback after the Installer release, once I’ve made any changes based on that feedback, I’ll finally release the source code.

Hope you’re all staying safe - not long to wait now.

Here it is running on my laptop, with MSFS 2020 running in the background, remember, the cockpit can be displayed on another screen or a remote PC. It can be resized or displayed fullscreen, and the companion window showing the latest values (it also shows debug messages and is used to update and launch the cockpit) doesn’t have to be visible with the cockpit window.

1 Like

This is looking awesome! Any chance this is open source / any plans to make it open source?

Hi @HigherFlyer1282 ,

Yes, it will be fully OpenSource once it’s stable enough for release, that was always my intention.

I plan to release a compiled copy first to allow people to try it and provide feedback, once the initial kinks are sorted (and any new features added), I will then be releasing the Source Code.

The very first thing I asked in my original post was for people willing to collaborate on this project, so it could be pushed out to people quickly. Sadly none were forthcoming.

Who knows, maybe once it’s released, other developers will jump on board and make it a truly community-driven project.

Dragonlaird

Hey, Dragonlaird. I’ve been following the development of your project since your first post. I’m a retired pilot of the Brazilian Air Force and my hobby is and has always been flight simulation, not to mention my direct contact with professional simulators. I’ve been using X-Plane since version 10 but like many I was attracted by the beauty of the FS. The thing is that I’m a home cockpit builder and as we know, so far FS is not making our lives easier. I use Air Manager v3.7 for X-Plane 11.51 and also the version 4, free for testing and functional on FS. I discovered another app called SimVim and this one is free. It provides, like Air Manager, an excellent interface between Arduino boards (and others) and the simulator. SimVim also provides commands for keys that FS does not have. I believe that the FS, in this respect, covers 25% of what we need, being optimistic. My programming experience is limited to the old XML and LUA. I can say that I’m skilled with the graphic part of the instruments and with the heavy work, that is, the physical part of the construction of the HC. Well, speaking of the simulator, currently I already can remove the 3d panel from any FS plane without distorting the image of the scene. I’m currently using MS PowerToys to have saved “screens”, with pre-defined size and position where I drag those instruments that allow “popout”. This helps but does not solve it. Your project is a hope, a beautiful promise. I don’t know what I can do to help you but I would love to be able to. I realize that there’s a certain disappointment on your part as there are not many interested parties, if I may say. What I can say for sure is that here in Brazil we’ve a large community of HC builders and I’m already in contact with many friends and talking about this project of yours. What I can say are words of support and, moreover, put myself at your disposal for anything you need, if I can help. Graphic part, research, I can also solve any doubts regarding technical details about the instruments… It’s not much and maybe none of this really helps you. Anyway, know that I’m here if you need. Luck, health and success.

Hello, this looks great. Looking forward to the release.

I am the developer of Find My Plane which is a free web tool which allows live tracking of simulator flights through a web interface.

It is all free and open source. It has its own client but I also plan to make it available to other developers so that they can easily add flight tracking functionality on another device to their projects. I have already integrated it with the Fly By Wire A320nx project.

Would you consider collaborating to add this functionality to your project? All that is required is a simple API post over HTTP to update the location of your user’s plane on a regular basis and my server takes care of the rest. I’d be happy to talk you through the documentation and demonstrate how it works if you’d be interested?

Thanks
Mark

2 Likes

Firstly, thank you to everyone who has followed this project, and don’t worry, I’m not about to ditch it or stop working on it, in any way.

In fact, that leads me to the second point I wanted to make…

I’ve decided to open the project source for people to start looking at and experiment with.

To be clear, this isn’t a full release, not even a Beta release, this is an Alpha Code release, allowing access to the project for others to start looking at and even compile a copy for themselves if they have the necessary skills.

Be kind, this is the first time anyone but me has had access to this, so it’s far from perfect. There are still features missing and undoubtedly a lot of bugs.

At some point, I’ll probably move the project to GitHub (or at least a fork of the master branch) and add in a pre-compiled copy of the code for people to download, but for now - here’s the raw, unvanrnished code:

https://dragonlaird.visualstudio.com/RemoteCockpit

Dragonlaird

Slight addendum to the above, I’ve also included a compiled copy of the project, so non-developers can install it and experiment.

Remember, this is an ALPHA Release, there’s likely to be bugs.

The Installer can be found here.

It will install the Server component as a Windows Service but it will not start it for you. It will also add a shortcut on your desktop to access the various applications in this project, including shortcuts to start and stop the server.

The installed project can also be uninstalled via the the normal Add/Remove Programs feature in your Windows Control Panel.

Hi Mark,

Sorry for the delay, that sounds like something that could easily be added to this project.

I just released the first copy but realised I made a rookie mistake with the current version so I’ve taken it offline while I reverse about 2 weeks of code changes.

Should be back again tomorrow when I’ve reversed all the code in Git.

Jim

I’ve just realised one of the latest (large) code changes to implement XML config files, has a rather nasty bug.

It took about 2 weeks to develop this code and now I need to reverse all those changes, as the cockpit simply isn’t stable enough with them in (and it’s way slower at parsing the XML).

Hope to complete the reversal tomorrow, until then I’ve made the repository Private, to prevent anyone downloading a really bugged version and getting the wrong idea.

Before you invest a lot more time into your steam gauges, have a look at this: https://www.codeproject.com/Articles/27411/C-Avionic-Instrument-Controls
I’ve turned this code into a standalone dll library, let me know if you are interested.

Also these two links might prove useful:
https://www.codeproject.com/Articles/30016/Sliding-Scale-Gauge
https://www.codeproject.com/Articles/20341/Aqua-Gauge

1 Like

Where were you when I was asking if anyone wanted to help with this project?

Thankfully, the way I designed the cockpit display should allow embedding these into any cockpit layout (the cockpit can load instruments using a config or pre-built instruments as an assembly).

I suspect it will need a wrapper to implement a standard interface and convert them, but that shouldn’t be too difficult.

I’ll definitely look into that as a future development feature, your graphics are way better than mine, my imagery is quite basic, as I didn’t spend too much time designing the graphics, focussing on writing code as a priority.

None of those links are my code, they are all done by others. I’ve just used them in my own project.

This article lost me at