Page 1 of 19 12311 ... LastLast
Results 1 to 30 of 563

Thread: TF DeviceLink like interface

  1. #1
    ATAG_Colander's Avatar
    Join Date
    Nov 2011
    Location
    Bir Tawil
    Posts
    11,128
    Post Thanks / Like
    Total Downloaded
    255.73 MB

    TF DeviceLink like interface

    Just another goodie in the TF release. A "DeviceLink" like readonly interface.

    - It accepts the same parameters as the "GetParameters" function for missions.
    - Only the data available in instruments for the airplane being flown will be available. This means, for example, that if you the plane you are flying does not have an altimeter, you will not receive values for the altimeter.
    - It has not been fully tested so it might have some bugs (i.e. missing information which is available in instruments).
    - Run it in a timer to get periodic updates.
    Those who know programming will know what can be done with it

    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.IO.MemoryMappedFiles;
    
    namespace DeviceLinkServer
    {
        public class GameCommunications
        {
            private MemoryMappedFile m_MemoryMappedFile;
            private MemoryMappedViewAccessor m_MemoryMappedViewAccessor;
            public enum ParameterTypes
            {
                Nil,
                M_Random,
                M_Shake,
                M_CabinDamage,
                M_CabinState,
                M_NamedDamage,
                M_SystemWear,
                M_Health,
                C_Steering,
                C_Brake,
                C_Throttle,
                C_Trigger,
                C_Pitch,
                C_Mix,
                C_WaterRadiator,
                C_OilRadiator,
                C_RadiatorAutomation,
                C_PitchAutomation,
                C_Compressor,
                C_Afterburner,
                C_BoostEnabler,
                C_SlowRunningCutOut,
                C_Magneto,
                C_Feather,
                C_CarbHeater,
                C_HatchDoor,
                C_HatchJettison,
                C_Timer,
                C_Timer1,
                C_Aileron,
                C_Elevator,
                C_Rudder,
                C_AileronTrim,
                C_ElevatorTrim,
                C_RudderTrim,
                C_TailwheelLock,
                C_LandingFlap,
                C_LeadingEdgeSlats,
                C_Undercarriage,
                C_UndercarriageEmergency,
                C_BombBayDoor,
                C_Airbrake,
                C_FuelTankSelector,
                C_TelepirometroElettrico,
                C_AltimeterPinion,
                C_AnemometroPinion,
                C_BombSight,
                C_Sight,
                C_Bombenabwurfgerat,
                C_KraftstoffSelector,
                C_LiquidGauge0,
                C_LiquidGauge1,
                C_PriLights,
                C_SecLights,
                C_SightLights,
                C_PitotHeater,
                C_Handpumpe,
                C_RadTXRX,
                C_RadPriNav,
                C_RadSecNav,
                C_Kurssteuerung,
                A_Steering,
                A_Brake,
                A_Aileron,
                A_Elevator,
                A_Rudder,
                A_AileronTrim,
                A_ElevatorTrim,
                A_RudderTrim,
                A_Undercarriage,
                A_UndercarriageShock,
                A_UndercarriageWheel,
                A_HatchDoor,
                A_BombBayDoor,
                A_ImpellerAngle,
                A_ImpellerAngularVelocity,
                A_ImpellerUnfold,
                A_LandingFlap,
                A_Airbrake,
                A_EngineAirRadiator,
                A_EngineWaterRadiator,
                A_EngineOilRadiator,
                A_LeadingEdgeSlat,
                Z_Coordinates,
                Z_Orientation,
                Z_Overload,
                Z_AltitudeAGL,
                Z_AltitudeMSL,
                Z_VelocityIAS,
                Z_VelocityTAS,
                Z_VelocityMach,
                Z_AmbientAirTemperature,
                S_ElectricVoltage,
                S_ElectricIncandescingRatio,
                S_ElectricAmperage,
                S_ElectricPrimaryPitLight,
                S_ElectricSecondaryPitLight,
                S_ElectricSightLight,
                S_FuelReserve,
                S_HatchDoor,
                S_UndercarriageValve,
                S_PneumoContainerPressure,
                S_PneumoLinePressure,
                S_HydroPressure,
                S_HydroReserve,
                S_Sturzanlage,
                S_GunOperation,
                S_GunReserve,
                S_GunClipReserve,
                S_BombReserve,
                S_Fenster,
                S_PitotHeater,
                S_Bombenabwurfgerat,
                S_Turret,
                M_Reserved000,
                M_Reserved001,
                M_Reserved002,
                M_Reserved003,
                M_Reserved004,
                M_Reserved005,
                M_Reserved006,
                M_Reserved007,
                M_Reserved008,
                M_Reserved009,
                M_Reserved00A,
                M_Reserved00B,
                M_Reserved00C,
                M_Reserved00D,
                M_Reserved00E,
                M_Reserved00F,
                M_Reserved010,
                M_Reserved011,
                M_Reserved012,
                M_Reserved013,
                M_Reserved014,
                M_Reserved015,
                M_Reserved016,
                M_Reserved017,
                M_Reserved018,
                M_Reserved019,
                M_Reserved01A,
                M_Reserved01B,
                M_Reserved01C,
                M_Reserved01D,
                M_Reserved01E,
                M_Reserved01F,
                I_Timer,
                I_AmbientTemp,
                I_EngineRPM,
                I_EngineManPress,
                I_EngineBoostPress,
                I_EngineWatPress,
                I_EngineOilPress,
                I_EngineFuelPress,
                I_EngineWatTemp,
                I_EngineRadTemp,
                I_EngineOilTemp,
                I_EngineOilRadiatorTemp,
                I_EngineTemperature,
                I_EngineCarbTemp,
                I_Pitch,
                I_VelocityIAS,
                I_Altitude,
                I_Variometer,
                I_Slip,
                I_MagneticCompass,
                I_RepeaterCompass,
                I_Peilzeiger,
                I_FuelReserve,
                I_LiquidReserve,
                I_Voltamperemeter,
                I_Voltmeter,
                I_Amperemeter,
                I_HydroPressure,
                I_HydroEmPressure,
                I_Turn,
                I_AH,
                I_DirectionIndicator,
                I_SlavedCompass,
                I_Suction,
                I_AFN,
                I_ADF,
                I_RDF,
                I_RMI,
                I_FLRC,
                I_Kurssteuerung,
                I_BombSight
            }
    
            public GameCommunications()
            {
                m_MemoryMappedFile = null;
                m_MemoryMappedViewAccessor = null;
            }
    
    
            private void OpenMMF()
            {
                try
                {
                    m_MemoryMappedFile = MemoryMappedFile.OpenExisting("CLODDeviceLink", MemoryMappedFileRights.Read);
                    m_MemoryMappedViewAccessor = m_MemoryMappedFile.CreateViewAccessor(0, 10000 * sizeof(double), MemoryMappedFileAccess.Read);
                }
                catch(Exception e)
                {
                    return;
                }
            }
    
            public double GetParameter(ParameterTypes ParameterType, int SubType)
            {
                if (m_MemoryMappedFile == null)
                        OpenMMF();
    
                try
                {
                    return m_MemoryMappedViewAccessor.ReadDouble((((int)ParameterType * 10) + SubType) * sizeof(double));
                }
                catch (Exception e)
                {
                    return -99999.99999;
                }
            }
        }
    }
    Enjoy!

  2. Likes ATAG_Lord Wukits liked this post
  3. #2
    ATAG_Colander's Avatar
    Join Date
    Nov 2011
    Location
    Bir Tawil
    Posts
    11,128
    Post Thanks / Like
    Total Downloaded
    255.73 MB

    Re: TF DeviceLink like interface

    Is any one using this?

  4. #3
    ATAG Member ATAG_Lolsav's Avatar
    Join Date
    Jun 2012
    Posts
    4,684
    Post Thanks / Like
    Blog Entries
    1
    Total Downloaded
    16.32 MB

    Re: TF DeviceLink like interface

    To my knowledge its usefull to those who have panels.. i only have what i see on my monitor. Not even a G15 keyboard with display.. those could have some use. Althought maybe it could have some use to X52 Saitek MDF display, but theres a bug with 64 bit drivers, does not display characters correctly, they get scrambled, so, getting readings its more like a guess game.

  5. #4
    Supporting Member DK_'s Avatar
    Join Date
    Mar 2012
    Posts
    108
    Post Thanks / Like
    Total Downloaded
    0

    Re: TF DeviceLink like interface

    Would be nice to set up some engine/flight instruments on another screen or tablet device (wifi, bluetooth, usb, etc).

    I have seen some things like this in racing sims but it is way beyond my abilities to set up.
    ---o-0-o---

  6. #5
    Student Pilot
    Join Date
    Feb 2013
    Posts
    5
    Post Thanks / Like
    Total Downloaded
    0

    Re: TF DeviceLink like interface

    Nice feature. Thats what I have waited for since the release of CLOD . Now I hope that CLOD will be beimplemented into HELIOS or to the nice USB devices that have been anounced in that threat: http://forums.eagle.ru/showthread.php?t=100076.

  7. #6
    Student Pilot
    Join Date
    Feb 2013
    Posts
    1
    Post Thanks / Like
    Total Downloaded
    0

    Re: TF DeviceLink like interface

    Good job

    Could you please explain to me what is the meaning of the prefixes (M, C, A, Z, S, I)?

    Thank you.

  8. #7
    Novice Pilot
    Join Date
    Jan 2013
    Posts
    47
    Post Thanks / Like
    Total Downloaded
    0

    Re: TF DeviceLink like interface

    i am also interested in using this to display some of the gauges (airspeed, altitude, engine temp etc) on a 2e small monitor or tablet type display, but i have no clue on how to use the data values you just provided

    thanks anyway to provide the information output from the game, hopefully some of the more tech savvy CoD folks will know how to take it to the next step (there have been a number of threads at the old 1C forum asking for this)
    The end of democracy and the defeat of the American Revolution will occur when government falls into the hands of lending institutions and moneyed incorporations.- Thomas Jefferson
    Fascism is simply the convergence of government and corporate power - Benito Mussolini

  9. #8
    Novice Pilot Knight's Avatar
    Join Date
    May 2011
    Posts
    40
    Post Thanks / Like
    Total Downloaded
    129.06 MB

    Re: TF DeviceLink like interface

    Need help with a program to send UDP packets to a step motor driver. I am looking for some one to write a program like UDPSpeed (il2 1946) Artificial Horizon for X and Y axis and compass Z axis for step motors for a full motion cockpit.

    I know it can be done if UDPSpeed works by sending data to another computer it could send that same information to a step motor driver.

    Any Help or advice would greatly be appreciated.

    Knight

  10. #9
    Novice Pilot
    Join Date
    Aug 2012
    Posts
    95
    Post Thanks / Like
    Total Downloaded
    296.1 KB

    Re: TF DeviceLink like interface

    I am not sure if this is any use although it is something I will be looking into myself. There is a forum called X-Sim. This is a community devoted to DIY motion platforms for flight and racing sims. They have free software that extracts output data from a sim as it runs and exports it to HID devices, Arduino boards and all manner of similar goodies. I do not know if it works with CloD but I understand it works with IL-2 1946 by utilizing Device Link although this meant it has limited use online.

  11. #10
    Novice Pilot Knight's Avatar
    Join Date
    May 2011
    Posts
    40
    Post Thanks / Like
    Total Downloaded
    129.06 MB

    Re: TF DeviceLink like interface

    Sorry double post!
    Last edited by Knight; Jun-07-2013 at 19:38.

  12. #11
    Novice Pilot Knight's Avatar
    Join Date
    May 2011
    Posts
    40
    Post Thanks / Like
    Total Downloaded
    129.06 MB

    Re: TF DeviceLink like interface

    GREAT Website, however does not use step motors. I am looking at bypassing a motor controller board and going with UDP direct to stepper motor driver on Ethernet more accurate. The best place I have been to is Flight illusions and there gauge setup for attitude and compass using stepper motors. however the driver board they are using is not powerful enough or I would be DONE.LOL
    Anyway I am still moving forward and I know that many of the guys at ATAG know about getparameter script. I just don't know how to create a program to use this script to send the data to the stepper motor driver hook up on Urse Data Protocol.

    My final phase will be ready to go by Christmas this year.


    Knight
    Last edited by Knight; Jun-07-2013 at 19:40.

  13. #12
    Student Pilot
    Join Date
    Jun 2013
    Posts
    1
    Post Thanks / Like
    Total Downloaded
    0

    Re: TF DeviceLink like interface

    Super ..
    i use vb net and arduino for tests.. ;)


    20130615142.jpg

    What about compass value .. always get 0 ..

    Greetings
    Last edited by lowca; Jun-15-2013 at 12:24.

  14. #13
    Ace bolox's Avatar
    Join Date
    Dec 2012
    Posts
    561
    Post Thanks / Like
    Total Downloaded
    0

    Re: TF DeviceLink like interface

    I believe compass value has a problem- which parameter are you trying to read as there are several possibilities.

    Looking through some old scripting I used I seem to have used
    aircraft.getParameter(part.ParameterTypes.I_Repeat erCompass, 0);
    rather than the magnetic compass value.

    Cool you can program something to use this

  15. #14
    Novice Pilot
    Join Date
    Sep 2013
    Posts
    33
    Post Thanks / Like
    Total Downloaded
    0

    Re: TF DeviceLink like interface

    So I tried to use this to write a bridge app that would allow UDPSpeed to work with IL2CoD ... however, most of these parameters do not seem to work properly. I tried all the I_* params and I_MagneticCompass and I_EngineRPM, do seem to work ... but that was about it. For example I_VelocityIAS, I_Altitude, I_Variometer, I_Slip etc. all report 0 in all 10 sub-params. Which is a shame, because being able to use UDPSpeed with IL2CoD is something I'm sure many people would be interested in
    Last edited by Tomsk; Sep-14-2013 at 12:29.

  16. #15
    ATAG_Colander's Avatar
    Join Date
    Nov 2011
    Location
    Bir Tawil
    Posts
    11,128
    Post Thanks / Like
    Total Downloaded
    255.73 MB

    Re: TF DeviceLink like interface

    Maybe because of this:
    Quote Originally Posted by ATAG_Colander View Post
    - Only the data available in instruments for the airplane being flown will be available. This means, for example, that if you the plane you are flying does not have an altimeter, you will not receive values for the altimeter.

  17. #16
    Novice Pilot
    Join Date
    Sep 2013
    Posts
    33
    Post Thanks / Like
    Total Downloaded
    0

    Re: TF DeviceLink like interface

    Sadly not, the airplane definitely did have an altimeter and an airspeed indicator. Unless I'm mistaken and I'm not using the right parameters, I wasn't entirely sure what the I_ C_ Z_ etc stood for ... but I_ seemed to be instruments to me, so I'm guessing I_Altitude and I_VelocityIAS should work ...
    Last edited by Tomsk; Sep-14-2013 at 17:08.

  18. #17
    ATAG_Colander's Avatar
    Join Date
    Nov 2011
    Location
    Bir Tawil
    Posts
    11,128
    Post Thanks / Like
    Total Downloaded
    255.73 MB

    Re: TF DeviceLink like interface

    Try I_VelocityIAS with -1 as the parameter.

  19. #18
    Novice Pilot
    Join Date
    Sep 2013
    Posts
    33
    Post Thanks / Like
    Total Downloaded
    0

    Re: TF DeviceLink like interface

    Quote Originally Posted by ATAG_Colander View Post
    Try I_VelocityIAS with -1 as the parameter.
    Okay yes that works. That's pretty odd, some of the parameters are accessible at 0 index ... some at -1. Why not put all of them starting at index 0?

    So the only other issue is that I_VelocityIAS (and many of the other parameters) change units depending on what plane you are in. So in a Bf109 I_VelocityIAS gives kmph, in a Spitfire it gives mph. This makes compatibility with UDPSpeed complicated, because IL2 DeviceLink always uses the same units irrespective of the plane. Since you don't know whether the numbers from CoD are in mph or kmph you can't automatically convert them to the right values for the DeviceLink protocol.

    IMO there are quite a lot of advantages to using fixed units for the parameters. It's generally very easy to adjust a gauge to display in mph even if the input data is kmph, but without fixed units it's impossible to make a set of generic gauges that are usable for every plane. Not having fixed units also makes compatibility with existing tools and protocols difficult, as all of the protocols I know are built around fixed units.

  20. #19
    Ace bolox's Avatar
    Join Date
    Dec 2012
    Posts
    561
    Post Thanks / Like
    Total Downloaded
    0

    Re: TF DeviceLink like interface

    I agree having different units makes things slightly complicated, however it appears that the units of measurement are based on nationality - so it would 'only' require a set of RAF gauges and a set of Luftwaffe gauges- the RAF ones just needing some 'conversion' in the UDP ini's for the relevant gauge sets.

    For users of physical gauges, motion cockpits etc things are more difficult

  21. #20
    ATAG_Colander's Avatar
    Join Date
    Nov 2011
    Location
    Bir Tawil
    Posts
    11,128
    Post Thanks / Like
    Total Downloaded
    255.73 MB

    Re: TF DeviceLink like interface

    What this is returning is the data available for the plane's instruments.
    Because of this, the values will be in the instruments UOM (and if there's no instrument, there's no value).

    I guess you can assume that there are only 2 UOM (metric and imperial) and make a "switch" to change between A and B.

  22. #21
    Student Pilot
    Join Date
    May 2013
    Posts
    12
    Post Thanks / Like
    Total Downloaded
    0

    Re: TF DeviceLink like interface

    Hi, I am not a programmer so I might be reading this incorrectly but; you can get flight telemetry from this such as roll, pitch, heave and yaw is that correct?

    The reason I ask is that, like Knight, I too have a motion platform but I do not need to talk directly to my motor drivers. I am using a program called SimTools (free, check it out at XSimulator.net). If I can find out the method of extracting telemetry from the game I can get help over there in making a plugin for Simtools which will allow me to have motion with Cliffs.

    As I understand it; I would need the memory map locations for each of the data sets I mention above. Plugins for Simtools can be made from Memory map locations, memory hooks, UDP, DLLs, etc.

    As I mentioned, I am not a programmer but if I do the leg works I know someone that is a flight sim enthusiast, a programmer, and developer with Simtools that is willing to create plugins for the sim motion community.


    Thanks

  23. #22
    Ace bolox's Avatar
    Join Date
    Dec 2012
    Posts
    561
    Post Thanks / Like
    Total Downloaded
    0

    Re: TF DeviceLink like interface

    Hi, I am not a programmer so I might be reading this incorrectly but; you can get flight telemetry from this such as roll, pitch, heave and yaw is that correct?
    correct- Colander has done is mapped he instrument readings.- ie if the olane doesn't have the instrument the data will not be able to be read.
    It is also possible to use a script to output data from a greater variety of possible types- but this requires a script for each mission (offline).

    A programmer should be able to make sense of the parameters in the first post

  24. #23
    Team Fusion ATAG_Bliss's Avatar
    Join Date
    Feb 2011
    Location
    United States of China
    Posts
    4,135
    Post Thanks / Like
    Total Downloaded
    457.02 MB

    Re: TF DeviceLink like interface

    Quote Originally Posted by bolox View Post
    correct- Colander has done is mapped he instrument readings.- ie if the olane doesn't have the instrument the data will not be able to be read.
    It is also possible to use a script to output data from a greater variety of possible types- but this requires a script for each mission (offline).

    A programmer should be able to make sense of the parameters in the first post
    Yep - with the reasoning behind this is anyone using a device link type setup still won't be able to have an unfair advantage online as anyone else.

    But all the other information (don't know about telemetry) could be scripted into SP missions to see an assortment of just about any type of information you wanted.


    "The dissenter is every human being at those moments of his life when he resigns momentarily from the herd and thinks for himself". - Archibald Macleish


  25. #24
    ATAG_Colander's Avatar
    Join Date
    Nov 2011
    Location
    Bir Tawil
    Posts
    11,128
    Post Thanks / Like
    Total Downloaded
    255.73 MB

    Re: TF DeviceLink like interface

    I'm thinking I might add Rx, Ry and Rz rotations to it.
    I don't think they could give any advantage to any one. Thoughts?

  26. #25
    Team Fusion ATAG_Bliss's Avatar
    Join Date
    Feb 2011
    Location
    United States of China
    Posts
    4,135
    Post Thanks / Like
    Total Downloaded
    457.02 MB

    Re: TF DeviceLink like interface

    Quote Originally Posted by ATAG_Colander View Post
    I'm thinking I might add Rx, Ry and Rz rotations to it.
    I don't think they could give any advantage to any one. Thoughts?
    Eh.., in English please

    Is that like the game telling you how much control input you are doing (pitch, roll, rudder)?

    If so there are programs out there that can overlay and give you the same type of information already. So I don't see how that would give someone an unfair advantage. If that's not what you are talking about you'll have to explain it a bit more


    "The dissenter is every human being at those moments of his life when he resigns momentarily from the herd and thinks for himself". - Archibald Macleish


  27. #26
    ATAG_Colander's Avatar
    Join Date
    Nov 2011
    Location
    Bir Tawil
    Posts
    11,128
    Post Thanks / Like
    Total Downloaded
    255.73 MB

    Re: TF DeviceLink like interface

    No, I'm talking about the position in space of the plane....

    For example:
    Roll 30 degrees
    Pitch 10 degrees
    Bank -5 degrees

    The data that the 6DOF cockpit people needs.

  28. #27
    Team Fusion ATAG_Bliss's Avatar
    Join Date
    Feb 2011
    Location
    United States of China
    Posts
    4,135
    Post Thanks / Like
    Total Downloaded
    457.02 MB

    Re: TF DeviceLink like interface

    Quote Originally Posted by ATAG_Colander View Post
    No, I'm talking about the position in space of the plane....

    For example:
    Roll 30 degrees
    Pitch 10 degrees
    Bank -5 degrees

    The data that the 6DOF cockpit people needs.
    Ah - that's pretty cool. I have no idea how that could be used as an unfair advantage at all. Hell, I have no idea how that is advantageous in the 1st place


    "The dissenter is every human being at those moments of his life when he resigns momentarily from the herd and thinks for himself". - Archibald Macleish


  29. #28
    Ace bolox's Avatar
    Join Date
    Dec 2012
    Posts
    561
    Post Thanks / Like
    Total Downloaded
    0

    Re: TF DeviceLink like interface

    Only advantage I can see is that planes without artificial horizon (eg 109) could have a graphic representation on a separate screen.
    Doesn't bother me personally, but I know some people get massively upset if there is a one in a billion chance someone could theoretically cheat with it

  30. #29
    ATAG_Colander's Avatar
    Join Date
    Nov 2011
    Location
    Bir Tawil
    Posts
    11,128
    Post Thanks / Like
    Total Downloaded
    255.73 MB

    Re: TF DeviceLink like interface

    That's what I'm afraid of.

  31. #30
    Student Pilot
    Join Date
    May 2013
    Posts
    12
    Post Thanks / Like
    Total Downloaded
    0

    Re: TF DeviceLink like interface

    Wow, I forgot to subscribe to this thread and so did not see the responses. Thank you all for replying to my request.

    I had completely forgotten the "anti-cheating" issue from way back when until Bolox reminded me of it in my thread on this topic. You are correct though, it is a huge issue that would adversely affect those of us who are building out of the box so to speak. Reminds me of the music video created by David "Tolwyn" Shaw called "Flying for the First Time". One of the lyrics was "Anyone better than me must be cheating". A refrain you used to see often on Hyperlobby.

    I did pass on the code in the first post and hopefully someone will be able to incorporate it into a plug-in for Cliffs, and I am trying to learn how to program. I am starting with Visual Studio Express 2012 and C# but I doubt I will be in a position to do anything on my own for a very long time. Regardless it is fun to learn.

    Thanks for carrying on the conversation and tossing ideas around.

Page 1 of 19 12311 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •