Jump to content
The simFlight Network Forums

CXA001

Members
  • Posts

    238
  • Joined

  • Last visited

Posts posted by CXA001

  1. Hi Thomas,

    Got that part no problem. My apologies, in reading back my previous post I was not very clear. (Too many hours in front of a keyboard, I guess).

    I have the number of total detentes, but was looking for away to get the same results as 0BFC , but in FS9 meaning:

    Flaps Up value would be 0, Flaps 10  value would be 1, Flaps 20 = value would be 2, Flaps 30 value would be 3, etc.

    This way I can easily get the corresponding degrees of flaps from my aircraft database.

    I am getting Flaps 0  value = 0, Flaps 1 value = 1, Flaps 2 value = 3, Flaps 3 value =3

    Offset<short> FSUIPCDetentes = new Offset<short>("FSUIPCDetentes", 0x3BFA); //Number of flap positions (NOT Including Full Up).
    Offset<int> FSUIPCAircraftDetente = new Offset<int>("FSUIPCAircraftDetente", 0x0BDC); //Current aircraft detente.
    
    int intDetentes; //Total number of flap positions +1 (to include full up).
    int intAircraftDetente; //Current aircraft detente from FSUIPC.
    
    //Get total number of flap positions including full up.
    intDetentes = (16383 / FSUIPCDetentes.Value) +1;
    
    //Curent aircraft detente handle.
    intAircraftDetente = intDetentes - (16383 / FSUIPCAircraftDetente.Value);

    This is driving me crazy as it is the last thing I need to get working as far as data from FSUIPC in my ACARS program.

    Any assistance suggestions or other offsets I can maybe try (although, I think I have been through them all) would be greatly appreciated.

    Regards,

  2. If I understand things correctly, offset 3BF8 is used for determining the number of flap positions on a given aircraft. (For example, the default C172 would return a value of 4).

    In looking at all the different offsets available, I understand that there are a variety of ways to get the different values, angles, etc. of flaps.

    As the program I am writing in C# is to be used across multiple flight simulator platforms, trying to read the different degrees of flaps from each flight sim platform could be problematic.

    How can I go about simply getting the current flaps detent value of an aircraft?

    Once I have that value, I can manage the degrees of flaps, etc. from my aircraft database that contains these values?

    Regards,
    Marc

  3. While I have no problems getting the local date and time from the flight simulator, I am having an issue trying to get the zulu (or GMT) data and time from the flight simulator.

    Here is my code (C#):

    Offset<byte[]> FSUIPCGMTDateTime = new Offset<byte[]>("FSUIPCGMTDateTime", 0x023B, 10);

    string stringFSGMTDateTime; 
    string stringFSGMTDate;
    string stringFSGMTTime;


    FSUIPCConnection.Process(new string[] {"FSUIPCGMTDateTime" });
                  
    short GMTYear = BitConverter.ToInt16(FSUIPCGMTDateTime.Value, 8);
    DateTime FSGMTTime = new DateTime(GMTYear, 1, 1, FSUIPCGMTDateTime.Value[0], FSUIPCGMTDateTime.Value[1], FSUIPCGMTDateTime.Value[2]);
    short GMTDayNo = BitConverter.ToInt16(FSUIPCGMTDateTime.Value, 6);
    FSGMTTime = FSGMTTime.Add(new TimeSpan(GMTDayNo - 1, 0, 0, 0));
    stringFSGMTDateTime = "[" + FSGMTTime.ToString("yyyy/MM/dd HH:mm") + "]";
    stringFSGMTDate = FSGMTTime.ToString("yyyy MM dd");
    stringFSGMTTime = FSGMTTime.ToString("HH:mm");

    I should be getting something like:
    [2016/07/14 22:13]

    What I am getting is:
    [1801/12/05 22:13]

    What am I missing?

     

     

  4. Hi Pete,

    Thanks for the quick response.

    If I understand correctly, I would create a variable with the previous value of 337E and basically have a timer (with a reasonable period of time) that would compare the previous value to the current one.

    The current value should always be greater than the previous one. If it isn't, basically I would have my application prompt the pilot to check his connection to the flight simulator and either try again or quit.

    Am I understanding the use of the 337E offset?

  5. I am in the progress of writing and ACARS program (what a task!) and I have a question.

    If my application is running directly on the flight sim PC and the flight sim crashes (or my application loses connection), my application catches the exception and displays a warning i.e. Lost connection with your fight simulator...

    However, if the flight sim crashes and my application is running via widefs on a secondary PC, this doesn't happen as widefs is still running.

    Is there an offset that I can monitor for widefs to see if it is still connected to the flight sim or do you have any other ideas on how to go about this?

  6. Hi Pete,

    FSUIPC v4751a is the version that I have installed.

    The eggbeaters that I fly have keyboard shortcuts:

    Ctrl+Shift+Up (I want this for the up position on my hat switch)

    Ctrl+Shift+Down (I want this for the down position on my hat switch)

    Ctrl+Shift+Left (I want this for the left position on my hat switch)

    Ctrl+Shift+Right (I want this for the right position on my hat switch)

    Etc...

    Under Button & Switches in FSUPIC Options & Settings I have mapped these keyboard shortcuts to the hat switch on my Microsoft Flight Sidewinder Joystick but to no avail.

    Kind regards,
  7. I have several helicopters that I like to fly and want to use the hat switch on my joystick for certain keyboard commands, instead of POV (which is handled by the hat switch on my yoke).

    I have disabled all the POV for my hat switch in FSX controls for my joystick, however when when I add my key commands (that do work via the keyboard) nothing happens happens for left & right and up and down pans forward and backwards.

    Any assistance would be greatly appreciated.

  8. imageBush-1.jpgimageBush-2.jpgimageBush-3.jpg

    Bush League Sunday is our weekly informal bush flying event where every Sunday night on the Vatsim network we fly to a different area of the world for some exciting off strip takeoffs and landings.

    Every pilot that flies 26 Canadian Xpress® Bush League Sunday events will receive the Canadian Xpress® Bush League Sunday Award that will appear in their Pilot Details section of the Pilot Roster.

    imageBushLeague.png

    Bush flying is a lot of fun, the scenery is spectacular and the takeoffs and landings are always a challenge.

    To learn more about Canadian Xpress® Bush League Sunday and to join Canadian Xpress® visit http://CanadianXpress.ca.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.