Jump to content
The simFlight Network Forums

FlyingCoder

Members
  • Posts

    59
  • Joined

  • Last visited

Posts posted by FlyingCoder

  1. Hi guys,

    Am i trying to make my application detect different aircrafts. This is because different aircraft developed by different developers, uses different parking brake variable. Like PMDG, FENIX, and Flybywire, They use their own custom Lvars which i have to detect if i am using PMDG or fenix or FBW. Now, how do i able to detect if i am flying a fenix aircraft or pmdg aircraft or FBW aircraft? Hope to get some help. Thank you.

  2. 18 minutes ago, John Dowson said:

    How can I possibly answer that?

    Yes.

    These may or may not hold the correct value - try monitoring those offsets, using FSUIPC's offset monitoring facilitis, as you fly and see if the values increase from 0...
    If they don't work, you can use the PMDG offsets (from the Offset Mapping for PMDG 737 document - should also apply to the 738):

    6494 4 FLT32 FUEL_QtyCenter LBS
    6498 4 FLT32 FUEL_QtyLeft LBS
    649C 4 FLT32 FUEL_QtyRight LBS

    You would need to initially read and save the quantities at the start of the flight, and then whenever you want to know how much fuel has been used simply read them again and subtract that number from the initial values.

     

    Hi John,

     

    Sorry, i am using your Offset and getting 115503102 and increasing.

    I forgot about PMDG 737 offsets. I will take a look at it and see if these solution work. Thank you

  3. 4 hours ago, John Dowson said:

    You can try the following offsets which hold the GENERAL ENG FUEL USED SINCE START indexed simvar for 4 engines: 0x090C. 0x09A4, 0x0A3C. 0x0AD4

    Hi John,

    What is the expected result? I'm flying the PMDG 738. Do i have to get value of all engines then add them up?

  4. Hi John,

    Thanks and will do. I am using .netframework 4.7 for my windows app. However, after i use your latest FSUIPCclient dll, i am getting object reference not set to an object when trying to call GSX boarding.

    FsLVar GSX_Getboardingstate = MSFSVariableServices.LVars["L:FSDT_GSX_BOARDING_STATE"]; // Gives the object not set reference error 
    // after using latest FSUIPC Client DLL

    I have also included the fsuipc-lvar module in my MSFS community folder.
    Before this, there was no issue. Is it compatibility issue where the latest version of FSUIPCclient only supports .net6.0?

    Also, im using your c# application sample to view the Lvars in MSFS but the app does not show any Lvars available. FSUIPC said there are 220 ish Lvars.

    Do advise me if its compatibility issues or what i could have done wrong. Thank you

     

  5. Hi Pete,

    I am using your FSUIPC for my own application.

    Firstly, I would like to ask, how am i able to get the exact model or type of the aircraft that user if flying or loaded. For example, Fenix A320. Fenix A320 has different liveries. How do i know if that particular user or simmer is using Fenix A320 regardless of its livery?

    Secondly, i am using LVAR for fenix as an example to get the number of PAX being loaded using GSX. Lets say boarded is 50pax. I did a a short flight which is around 1hr or so. Took off, application states 50pax. Landed and deboard the pax and noticed that it reset back to 0pax. How do i prevent this from being reset?

    I hope to get your answer. Thank you!

  6. *** Moved to .Net dll client sub-forum ***

    Hi,

    I am currently making my own C# winform application and i cant seem to get the readLvar to be working. I am trying to read the passengers boarding from the GSX pro for MSFS. This is my code.

     

    FSUIPCConnection.Process();
    myTextbox.Text = FSUIPCConnection.ReadLVar("L:FSDT_GSX_NUMPASSENGERS_BOARDING_TOTAL").ToString();
         
    Console.WriteLine("Reading passengers on board from GSX " + " - " + FSUIPC.FSUIPCConnection.ReadLVar("L:FSDT_GSX_NUMPASSENGERS_BOARDING_TOTAL"));


    Data will be 0 and i dont know why. Am i missing something? Using the latest FSUIPC 7. I have the FSUIPC_lvar installed in the ocmmunity folder. I hope to get some guidance here. thanks

  7. 2 hours ago, Thomas Richter said:

    Hi Paul,

    I got that work years ago just for testing but never used it later with C++ CLR.

    C++ CLR is the C++ fully based on .Net, not native C++, that's why you use still the .Net framework like WinForm.

    Thomas

    Hi Thomas,

     

    i have give a sample code about the problem im having.

  8. 2 hours ago, Paul Henty said:

    I don't use C++ but I had some users in the past using the DLL in a C++ project so it is possible.

    Can you say more about what the problem is exactly? Are there error messages? Does your project compile? Did the DLL install OK from NuGet?

    I had tried here but I couldn't get it to install from NuGet. That could be because I don't know anything about configuring the options in C++.

    Paul 

    Hi Paul,

    As now, i am having problem trying to get the IsPlayerAtGate. Reason why i dont use C# to code is because of reverse engineering that is why im using C++ CLR WinForm. Anyway, the issue i am having right now is the getting gate id to be displayed in the drop downlist.

    I can't seem to get Select to be working because there is not such extension. I believe Select is using Linq? Im not to sure.

    this->gatedropdwn->Items->AddRange(selectedAirport->Gates->ToArray());

    This code below will always give & print out NULL. The code below in at the Timer so it will check.
     

    FsGate ^gate = this->selectedAirport->Gates[this->gatedropdwn->Text];
    	if (gate != nullptr)
    	{
    		if (gate->IsPlayerAtGate)
    		{
    			atgatestatuslbl->Text = "At Gate";
    		}
    		else
    		{
    			atgatestatuslbl->Text = "Not at gate!";
    		}
    	}
    	else
    	{
    		cout << "Null";
    	}

    Hope to get your help here.

  9. *** Moved to FSUIPC7 / MSFS sub-forum ***

    Hello, i am wondering if MakeRwy is available for MSFS? Can it be used in MSFS and if so, how do i use it ? Thanks

  10. Alright. I have used the one you mentioned. Kinda get the idea that 0x7nnnn = nnnn is 66C0. This is the pdated code.
    Regarding about the LVars,
     

    DWORD result;
    unsigned int test = 0x766C0;
    FSUIPC_Write(0x0D6C, 4, &test,&result);
    FSUIPC_Write(0x0D70, 40, ":FSDT_GSX_CATERING_STATE", &result);
    FSUIPC_Read(0x766C0, 4, &test, &result);
    FSUIPC_Process(&result);
    cout << test;

     

×
×
  • 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.