External DLL Message Expansion?

  • Hi all,

    I've been looking at this external_dll example and this post: Is there a way to get VR head position and/or orientation ?

    I'm wondering if the community could give some constructive feedback about the external_dll messages that could greatly increase the freedom of movement for extending functionality that add-ons can achieve? I'm new to all of this, but it would be interesting to e.g. able to have a plane specific FMS/FMC systems or in-depth propulsion systems management (simulating it in the DLL and sending back propulsion parameters in the sim). I'm seeing that there is a lot of community members that would love to help out devs, so IMHO it would make sense to ease access to such internal functions. Some very basic event system for e.g. injecting custom sounds (engine stop/start), simulation steps etc. would be awesome and would offload the devs, so if someone misses something, one would have the mechanisms to crerate it.

    Hopefully no one finds this idea (too) naive or offensive.

    Balazs

    Best Regards

    Balazs

    Ryzen 2700X, HyperX 32GB, 2060 Super 8GB, win10/ubuntu19

    Saitek X52 HOTAS, Logitech G920 pedals

    freetrack/opentrack
    X-Plane 11, DCS modules: A-10C, Ka-50, FC3, Mirage 2000C, F/A-18C, Persian Gulf

  • That's the path that leads to the dark side and crashes, out of memory exceptions, bad frame rates, instability, additional dependencies, installers, incompatibilities and so on which you see plenty of in other simulators. That is one of the main reasons Aerofly is running so well. We aim to avoid all this trouble by providing a programmable aircraft file structure, using the tmd file. We have a lot planned for the future just give us more time to implement more systems. We plan to implement more building blocks for the tmd like we did for the electric systems for example. In the future you might be able to program all kinds of systems without the need of a dll, just using the tmd file.

    From our point of view we can't really recommend attempting to develop another physics engine outside of the tmd. Just let us know what you are trying to simulate and we will try to make it work as a team effort.

  • Hey Jan, thanks for the quick response!

    I'm still studying what is possible and what is not within the scope of the SDK. I've read about some limitations where a new aircraft can only be implemented with existing elements of avionics. Overcoming this could open way to custom aircraft like the 737-800. Also the fully simulated propulsion and power control (APU, power, electrics, hydraulics, pneumatics, avionics, all acting depending on each other) in all aircraft would be a spot where the community could help in if the SDK makes this possible. E.g. subsystems of the Airbus are well documented and accessible so if there would be a safe (does not risk performance and stability of AFS2) means of scripting (e.g. lua/python/etc.?), any aircraft-specific behavior could be be included to an aircraft.

    I would never think about a DLL project if all of these could be be solved via TMD.


    Taking part in such an extension of e.g. the A320 would be awesome. :)

    Thank you again for taking your precious time to answer and for your positive approach!

    Best Regards

    Balazs

    Ryzen 2700X, HyperX 32GB, 2060 Super 8GB, win10/ubuntu19

    Saitek X52 HOTAS, Logitech G920 pedals

    freetrack/opentrack
    X-Plane 11, DCS modules: A-10C, Ka-50, FC3, Mirage 2000C, F/A-18C, Persian Gulf

  • Hi Balazs,

    scripts are also quite a penalty on performance which is why you see add on developers for other simulators move away from them, towards implementing everything in C++. If you imagine that some computer program will need to interpret what you programmed at the same time that it runs your code you will understand that this takes much more computing power than just compiling all code into machine instructions and then run that. Figuring out what instructions to use and then executing them is not an option for us in a real time simulation. If we decide to use some form of scripts its going to use all kinds of tricks to do as much linking or pre-processing so that the code running in real time is kept fast.

    The systems you mentioned are all things that we eventually want to provide tmd blocks for (no promises), then you can create your own networks using the electric buses, batteries, electric loads, electric bus connectors / electric switches, generators (all implemented already), fuel lines, fuel pumps, fuel tanks (also already implemented), hydraulic lines, hydraulic pumps, bleed air ducts, valves, packs, recirc fans, pressuirization chambers and so on. You can also already write custom avionics (just not the display rendering as of today), you have variables, logic gates, event setters, integration, differentiation, sums, products; all you need to implement systems, custom controllers or even systems that aren't implemented as actual building blocks yet. For example you could use electric networks to simulate hydraulic networks or bleeds (just find some factor to convert from voltage to pressure and from current to fluid mass flow - the physical "system-description" are almost identical). Or just use the fuel lines and pumps to represent hydraulic lines and pumps. On a nummerical level its just numbers, it doesn't matter how we scale it or name it. :)

    If you take a look at the Learjet 45 tmd you'll find custom menus, the A320 has most of its ECAM system implemented in the tmd, including automatic page switching, several caution messages, etc, in the C172 and B58 you'll find completely finished electrical networks (including "dark" state in default C172 and B58) and at least the basic networks in the A320 and Learjet and we will expand these in the future.

    So yeah, the tmd currently is THE way to go, at least from our perspective. We will add more building blocks if any add-on developer approaches us.

  • I understand the ipacs approach and the fluid performance proofs it. However i wonder why this dll thing has been published at all. What is the idea of ipacs what developers could do with it?

    Regards,

    Thomas

    i7-14700KF @ 5.6 GHz, Geforce RTX 4090, 32MB RAM, 1TB SSD M.2, 1TB SSD M.2, 2TB SSD M.2, 32" Monitor 4K, Pimax Crystal

  • I fully understand your stance, being a programmer myself for over 25 years. I'm currently learning Vulkan to write my pet project (a simple 3D engine which concentrates to decent performance even on potato hardware.

    I would have never thought of aircraft addons if the A320 were complete right now (which IMHO is a key selling point for AFS2). And I'm also willing to contribute to make it happen. I was only researching the possibilities about that. It's another question if a standard plane can be upgraded or one has to start everything from scratch.

    You can do things like motion platforms, connect existing apps that show your position, or display instrument values on home build simulators, send new joystick or button commands, etc

    The idea is to extend functionality outside the sinulator with this dll.

    Someone complained that his Saitek panel does not display the information it's supposed to. Can this DLL approach a solution for him? :)

    Best Regards

    Balazs

    Ryzen 2700X, HyperX 32GB, 2060 Super 8GB, win10/ubuntu19

    Saitek X52 HOTAS, Logitech G920 pedals

    freetrack/opentrack
    X-Plane 11, DCS modules: A-10C, Ka-50, FC3, Mirage 2000C, F/A-18C, Persian Gulf

  • Someone complained that his Saitek panel does not display the information it's supposed to. Can this DLL approach a solution for him? :)

    A customer at the AERO exhibition last week said he had also issues with his Saitek panels, that they only work when the simulator is shut down and restarted again. The dll won't fix this I think, that is something we need to address in our existing code, once we are able to reproduce this consistently.

  • A customer at the AERO exhibition last week said he had also issues with his Saitek panels, that they only work when the simulator is shut down and restarted again. The dll won't fix this I think, that is something we need to address in our existing code, once we are able to reproduce this consistently.

    Well, the Saitek panels are very partly supported in AFS2. The setting menu detects all keys/knobs pressing/movements, showing it's not a driver issue, but there's simply no appropriate interaction in AFS2 for most keys and knobs, and no easy way to assign any action to the switches and knobs.

    I managed to do it for my mixture axis (which has now been added to the setup menu, no more need to tweak), and for simple switches like the fuel pump. But I never managed to do it for instance for the magneto key.

    Shutting down and restarting the computer is another topic, related (as far as I understand) to Windows 10 tendency to take over USB power supply and cut unilaterally communication. You can set it up, but in my case it frequently reactivates. Here, a dll won't change anything...

    Cheers

    Antoine

    Config : i7 6900K - 20MB currently set at 3.20GHz, Cooling Noctua NH-U14S, Motherboard ASUS Rampage V Extreme U3.1, RAM HyperX Savage Black Edition 16GB DDR4 3000 MHz, Graphic Card Gigabyte GeForce GTX 1080 8GB, Power supply Corsair RM Series 850W, Windows 10 64 bit.

  • Thank you for all the orientation about this subject. I will train in to TMD and we'll see if updates are catching up with me.:)

    Best Regards

    Balazs

    Ryzen 2700X, HyperX 32GB, 2060 Super 8GB, win10/ubuntu19

    Saitek X52 HOTAS, Logitech G920 pedals

    freetrack/opentrack
    X-Plane 11, DCS modules: A-10C, Ka-50, FC3, Mirage 2000C, F/A-18C, Persian Gulf

  • Well, the Saitek panels are very partly supported in AFS2. The setting menu detects all keys/knobs pressing/movements, showing it's not a driver issue, but there's simply no appropriate interaction in AFS2 for most keys and knobs, and no easy way to assign any action to the switches and knobs.

    I managed to do it for my mixture axis (which has now been added to the setup menu, no more need to tweak), and for simple switches like the fuel pump. But I never managed to do it for instance for the magneto key.

    Shutting down and restarting the computer is another topic, related (as far as I understand) to Windows 10 tendency to take over USB power supply and cut unilaterally communication. You can set it up, but in my case it frequently reactivates. Here, a dll won't change anything...

    Cheers

    Antoine

    Yes, it is a real drag that the Saitek panels support has not had any or very little support from IPACS in 18 months now. :( Maybe someone will take an interest one rainy day and hookup all the necessary links. :)

    Regards,

    Ray