Simas Posted October 1, 2012 Posted October 1, 2012 (edited) Is this what I think it is? :) It's a header/interface definition for AFM, right? I don't think I have seen this file before, it's in /API/include/FM dir of the new 1.2.1 DCS World installation. Does that mean that AFM is sort of public API now and not just for the official third-party developers? Everyone can try their hand at it? Or am I just dreaming? Edit: It's a real deal. There is also a template Visual Studio project included! Edited October 1, 2012 by Simas
EagleEye Posted October 1, 2012 Posted October 1, 2012 You can develop youre own FM and DCS will use it. Don`t think that this one have something to do with the AFM... Deutsche DCS-Flughandbücher SYSSpecs: i7-4790K @4GHz|GA-Z97X-SLI|16GB RAM|ASUS GTX1070|Win10 64bit|TrackIR5|TM Warthog/Saitek Pro Pedals
beczl Posted October 1, 2012 Posted October 1, 2012 It's just a "connection". You have to develop your own FM and connect to your developed AC as well.
Simas Posted October 1, 2012 Author Posted October 1, 2012 (edited) I understand that, as far as I am aware the "AFM" thing is just the ability to do anything in the sim as far as FM is concerned (but you have to start from scratch). Or do the third party developers have some other libraries/documentation/interface to help with their fligth models? I am thinking about the Virtual Patriots L-39 AFM video they posted not that long ago. I guess the question is - are they using this interface or not? Edited October 1, 2012 by Simas
aaron886 Posted October 1, 2012 Posted October 1, 2012 I am thinking about the Virtual Patriots L-39 AFM video they posted not that long ago. I guess the questions is - are they using this interface or not? Yes, they are, it's the only one. They've described it (and the general process) in detail many times.
Tango Posted October 1, 2012 Posted October 1, 2012 (edited) I understand that, as far as I am aware the "AFM" thing is just the ability to do anything in the sim as far as FM is concerned (but you have to start from scratch). Or do the third party developers have some other libraries/documentation/interface to help with their fligth models? I am thinking about the Virtual Patriots L-39 AFM video they posted not that long ago. I guess the question is - are they using this interface or not? Yes, we're using the EAFM (External Advanced Flight Model) interface, the same as anyone wanting to do their own FM will need to do. As Beaker already stated, beyond the API, NOTHING is done for you; you are starting out tabula rasa. If you're not familiar with APIs, these are merely interfaces to communicate with the sim. They are not used for processing the flight model in any way, beyond giving the most basic data required to make it function (position in quaternion form). Let me put it this way, if we had less than we have now, the EAFM would not work, ever. It is THAT basic. As far as the EAFM is concerned, you are starting not from the beginning, but from the beginning of the beginning. You aren't following instructions on creating one, you're figuring out how to write the instructions, so you can create one. Forget cooking, you have to build the kitchen first. ...ad nauseam. I hope that clarifies on how wide open the EAFM is for developers. Simply put, it is PERFECT. You just need to know what you are doing with mathematics and aerodynamics, and know how to program. Best regards, Tango. Edited October 1, 2012 by Tango
SilentEagle Posted October 1, 2012 Posted October 1, 2012 I guess they decided to give everyone the ability to write their own flight model. will be interested to see the results! Either that or accidentally left in, lol.
Simas Posted October 1, 2012 Author Posted October 1, 2012 Excellent! As far as I can see you don't really need to model an airplane with this, you could technically do even a ground vehicle with this interface right? hint hint :P Just ignore the turbulence and make sure it doesn't fly :thumbup: Actually, I suppose you can even use something like JSBSim third-party FM library. I haven't dug into the API that much yet, but since it's a DLL it should be doable. And if you can live with JSBSim and if it's better than ED SFM - why not. Really excited about this and the fact ED is making it public for everyone to try. Heck, A2A simulations Accu-Sim could be connected with this if they choose to, but they will have to figure out how to present other aspects of their sims (like the FSX hangar/configuration windows).
aaron886 Posted October 1, 2012 Posted October 1, 2012 Really excited about this and the fact ED is making it public for everyone to try. So are we. But I think the thing that is key (and actually fortunate, as cruel as that sounds,) is that this is extremely difficult. ED is not holding anyone's hand, nor really doing anything for you. This should keep those who are not capable of doing good work from getting very far, and might help artificially maintain a standard of quality. (Whether or not ED intended it that way!) I know for my part external FMs will require lots of study and most importantly, lots of time. I guess they decided to give everyone the ability to write their own flight model. will be interested to see the results! Either that or accidentally left in, lol. They kind of had to, if they wanted to actually allow 3rd parties to release modules with external FMs, didn't they? ;)
fred64 Posted October 7, 2012 Posted October 7, 2012 Hi, I am new here, but have developed my own AFM for helicopters at Hovercontrol.com, I am really interested in understanding how to integrate my library into DCS World Tango where can I find the documentation for EAFM ? thanks Fred
Blaze Posted October 7, 2012 Posted October 7, 2012 They kind of had to, if they wanted to actually allow 3rd parties to release modules with external FMs, didn't they? ;) Well it was actually left in by accident, and after release of 1.2.1 ultimately decided it wasn't really a big deal to let it out. :) Tango where can I find the documentation for EAFM ? There isn't any. i7 7700K | 32GB RAM | GTX 1080Ti | Rift CV1 | TM Warthog | Win 10 "There will always be people with a false sense of entitlement. You can want it, you can ask for it, but you don't automatically deserve it. "
fred64 Posted October 8, 2012 Posted October 8, 2012 Thank you blaze, I am currently browsing through the lua files, looking at the SU-25T in Mods\aircrafts\Su-25T and in the Scripts folder I believe this uses Legacy_AFM_Su25.dll under the bin directory, so I assume somewhere in the scripts I should find a lua variable like FM = Legacy_AFM_Su25.dll but cannot find this reference anywhere, where is the flight model to use defined ? I am an expert in aerodynamics and could do my own FM quite easily, the AFM template is quite understandable to me, so I would like to port my library to DCS world. I currently have 32 helicopter profiles active and tested on Hovercontrol http://www.hovercontrol.com/cgi-bin/ifolio/imageFolio.cgi?direct=HTR_-_Helicopter_Total_Realism/Custom_Profiles What I would like to do is port my library to an EAFM template and link it to the 3D model....
EagleEye Posted October 8, 2012 Posted October 8, 2012 (edited) Hi, I am new here, but have developed my own AFM for helicopters at Hovercontrol.com, I am really interested in understanding how to integrate my library into DCS World Tango where can I find the documentation for EAFM ? thanks Fred Oh wow, are you the author of HTR? I was just about to write you a PM on hovercontrol to point you to DCS.:) Edit: You may contact Pat01 http://forums.eagle.ru/showthread.php?t=93302. He currently work on a Gazelle helicopter. Though don`t know about his plan for the FM... Edited October 8, 2012 by EagleEye Deutsche DCS-Flughandbücher SYSSpecs: i7-4790K @4GHz|GA-Z97X-SLI|16GB RAM|ASUS GTX1070|Win10 64bit|TrackIR5|TM Warthog/Saitek Pro Pedals
amalahama Posted October 8, 2012 Posted October 8, 2012 Yes, we're using the EAFM (External Advanced Flight Model) interface, the same as anyone wanting to do their own FM will need to do. As Beaker already stated, beyond the API, NOTHING is done for you; you are starting out tabula rasa. If you're not familiar with APIs, these are merely interfaces to communicate with the sim. They are not used for processing the flight model in any way, beyond giving the most basic data required to make it function (position in quaternion form). Let me put it this way, if we had less than we have now, the EAFM would not work, ever. It is THAT basic. As far as the EAFM is concerned, you are starting not from the beginning, but from the beginning of the beginning. You aren't following instructions on creating one, you're figuring out how to write the instructions, so you can create one. Forget cooking, you have to build the kitchen first. ...ad nauseam. I hope that clarifies on how wide open the EAFM is for developers. Simply put, it is PERFECT. You just need to know what you are doing with mathematics and aerodynamics, and know how to program. Best regards, Tango. One question regarding EAFM. Do you define forces and moments and then DCS physical engine do all the integration for you? Or do you have to integrate also all the newton equations, sort out clashing conflicts with your own collision engine, etc? Is it THAT basic? Regards!
aaron886 Posted October 8, 2012 Posted October 8, 2012 One question regarding EAFM. Do you define forces and moments and then DCS physical engine do all the integration for you? Or do you have to integrate also all the newton equations, sort out clashing conflicts with your own collision engine, etc? Is it THAT basic? Regards! No, you get at least that much. :)
amalahama Posted October 8, 2012 Posted October 8, 2012 (edited) No, you get at least that much. :) Well, I at least would expect that stuff like collision engine and force & moments integration were elements retained in the core and accessible via API. If you had to develop your own collision model you would have to pass through a TON of info from the environment: terrain, objects, other aircraft collision points... and with an external integrator for forces, it's very easy to arrive at numerical instabilities if both clocks, world clock and model clock don't match. It's fine that ED let developers to touch things at the lowest level, but always there is a practical limit. I'm considering to pass my FM modules to DCS and I'm very interested on the potential of the engine. Regards! Edited October 8, 2012 by amalahama
aaron886 Posted October 8, 2012 Posted October 8, 2012 (edited) Well, I at least would expect that stuff like collision engine and force & moments integration were elements retained in the core and accessible via API. If you had to develop your own collision model you would have to pass through a TON of info from the environment: terrain, objects, other aircraft collision points... and with an external integrator for forces, it's very easy to arrive at numerical instabilities if both clocks, world clock and model clock don't match. It's fine that ED let developers to touch things at the lowest level, but always there is a practical limit. I'm considering to pass my FM modules to DCS and I'm very interested on the potential of the engine. Regards! Per the previous post, you are not exactly at ground level. Collisions, force/moment integration, all are done by the simulator after the plugin. AFAIK your plugin sends Euler angles and force quantities. This gives a little insight: (Hopefully old news to you if you're deeply invested in developing an EFM for World.) Edited October 8, 2012 by aaron886
BR55Sevas Posted October 8, 2012 Posted October 8, 2012 (edited) Great news. I tried to compile template and it`s works. Blaze, Tango, Eagle can you explain how-to test it? I suppose dll need to be placed to bin folder (yeah, it`s obvious). But what to do next? Some additional definition in wunderluft.lua or entry.lua? Thx Edited October 8, 2012 by BR=55=Sevas МиГ-29 Fly by wire СДУ Su-27SM second display panel https://www.youtube.com/embed/videoseries?list=PL_2GGwNpWNp_fKXfRtDhIk8s5Jf4a9XHS http://berkuts.ru Пилотажный сервер с роботом | Aerobatic server with PhantomControl
Dejjvid Posted October 8, 2012 Posted October 8, 2012 Omg, i get the chills when i read this thread. I feel something awesome is about to happen! i7 8700K | GTX 1080 Ti | 32GB RAM | 500GB M.2 SSD | TIR5 w/ Trackclip Pro | TM Hotas Warthog | Saitek Pro Flight Rudder [sigpic]http://www.132virtualwing.org[/sigpic]
amalahama Posted October 9, 2012 Posted October 9, 2012 (edited) Per the previous post, you are not exactly at ground level. Collisions, force/moment integration, all are done by the simulator after the plugin. AFAIK your plugin sends Euler angles and force quantities. This gives a little insight: (Hopefully old news to you if you're deeply invested in developing an EFM for World.) Sorry aaron, but after re-reading again all previous posts, it's still no clear for me what is provided by the API and what has to be model from scratch. Actually, if API feeds Euler/quaternions angles, then moment integration must be done by your module, it isn't worked out by DCS engine. I will have to look through this header (wHumanCustomPhysicsAPI.h) and see what is inside, I'm afraid. Anyway I'm glad that ED provides some (limited?) access to the API. Regards! Edited October 9, 2012 by amalahama
upupandaway Posted October 9, 2012 Posted October 9, 2012 Omg, i get the chills when i read this thread. I feel something awesome is about to happen! Outright eerie... ;) [sIGPIC][/sIGPIC] Deedle, deedle!
fred64 Posted October 9, 2012 Posted October 9, 2012 Oh wow, are you the author of HTR? I was just about to write you a PM on hovercontrol to point you to DCS.:) Edit: You may contact Pat01 http://forums.eagle.ru/showthread.php?t=93302. He currently work on a Gazelle helicopter. Though don`t know about his plan for the FM... Yes I am, I really like the way DCS is setup from a programmer standpoint, I think it has a great potential. I already wrote to Pat and we will try to do something together hopefully Nice to see you here too bye Fred
BR55Sevas Posted October 11, 2012 Posted October 11, 2012 (edited) I found a way how to connect filght-model.dll to my mod. But I have one error when test it. 00000.895 ERROR WorldPlugIns: Can't load plugin module ./mods/aircrafts/Wunderluft/bin/ED_FM_Template.dll :%1 is not Win32 application. Bold text is my translation from russian. I compiled dll in Visual Studio 2010 without any errors. I`m sure that dll was compiled like win32 app. Also I tried to get acces to dll function in other software I use (LabVIEW), looks like dll is ok Anyway, even with this error, my test-plane fly better then SFM, lol Maybe I ask to much, but help please. Thx Edited October 12, 2012 by BR=55=Sevas МиГ-29 Fly by wire СДУ Su-27SM second display panel https://www.youtube.com/embed/videoseries?list=PL_2GGwNpWNp_fKXfRtDhIk8s5Jf4a9XHS http://berkuts.ru Пилотажный сервер с роботом | Aerobatic server with PhantomControl
chaos Posted November 23, 2012 Posted November 23, 2012 Make sure that, when you compile the code, you're out of DEBUG mode. See if that makes a difference.. "It's not the years, honey. It's the mileage..."
Recommended Posts