Jump to content
The simFlight Network Forums

Fltbuff7197

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by Fltbuff7197

  1. *** Moved from FAQ sub-forum to main support forum ***

    Apparently chars vs numbers cause issue  when dealingg with strings...

    I wanted to grab text from the end of  ipc.readSTR(0x0130, 256) which is the loaded flight plan .pln file

     

     

    zzz = ipc.readSTR(0x0130, 256)
    xyz = string.sub (zzz, -22)
    abc=ipc.ask("here" .. xyz, WHITE)

    returns nothing...

    but if I hardcode zzz with "data within double quotes"
    last 22 chars are returned

    how do i make this work in a simple solution ?

  2. After experimenting some more, I thought it best to load the waypoints file into the script all at once at the beginning.

    I have it set to 50 occurrences for each of the 3 fields in the array, but you can change it to a smaller or larger value.  The larger it is the longer the script takes to initialize.

    Readme stuff you need to read is at the top of the script in comment lines.

     

    Have fun at your own risk......

    Latest script click here for OneDrive

  3. Since I have ALWAYS received outstanding support from this site and Pete Dowson himself, I thought I would share my recent work, which I started about 3 weeks ago.

    I just now (after 20 years of FSX), have begun to explore the use of FSUIPC with LUA scripting to control flights, without a joystick.  WOW!


    No guarantees, just have fun if you love math and scripting challenges...

    If you are not already an expert and/or are curious, have fun with automated scripting using LUA and FSUIPC for unattended or long flights.

    FSUIPC has logging functions you can turn on to debug script if needed.

    Also, set FSUIPC misc setting to "center elev on A/P disconnect". ( I had plane dive when I turned off A/P at 175') without this setting...

    Scripts  could be used for any flight, and altitude, but you may have to accordingly.


    Use at your own risk or curiosity.  Make sure to READ the comments at the top of the script BEFORE proceeding !

     

    Here is my OneDrive Link to the script: &nbsp

  4. OK, got it !!!!!!!!!!!!!!

     

    After re-reading several other posts, I re-traced my steps and redid what I thought I did in the first place and whalah!

     

    set distance to dest airport= 2271.0102539063
    set distance to dest airport= 2271.0041503906
    set distance to dest airport= 2271.0012207031
    set distance to dest airport= 2270.9956054688
    set distance to dest airport= 2270.9899902344
    set distance to dest airport= 2270.9821777344

     

    I'm my .txt file I write out during script operations, I was able to see correct results for 0x6C38, distance to destination

     

    distwork = ipc.readFLT(0x6C38)
     file:write("\nset distance to dest airport= " .. distwork)
      file:flush()

     

    OH, and per FSUIPC documentation,  I made sure I had the PMDG777 OPTIONS.ini file entry below added BEFORE I started FSX:

    [SDK]
    EnableDataBroadcast=1

     

    THANKS, issue now closed...

  5. HI Pete

     

    Thanks Again.

     

    OK will try that.

     

    Quick Question, I found 2 PMDG777 Offsets I would like to extract as a number value, but me the dummy is having issues.

     

    6C34 4 FLT32 FMC_DistanceToTOD nm

    0.0 if passed,

    negative if n/a

    6C38 4 FLT32 FMC_DistanceToDest nm

    negative if n/a

    If not too much trouble, could you show me the ipc.read... command I can use to get at this data?

    I used ipc.readFLT(0x0634) but got weird number back  n.nnnnnnnnnnn e  ???????????? 

     

    looking for the nnnnn of NM from TOD (FLT32 4 byte value ), also had Destination as an FLT32 4 byte value as well...

      

  6. Hello fellow simmers....

     

    I have ran logs, looked at Linda (too compl for me), , looked at fsinterrogate,  and can not figure out code needed to set PMDG777 MCP IAS speed.  This is the value I want to set automatically via lua x number of minutes from airport.

     

    On the 777.... Using FSUIPC loggins (great tool), and the Offset and control documentation,  I have been able to figure out the below:

    setting APP switch on 777 to fully automate inflight actions, I have flaps, gear and APP working.  I had DIST working as well which shows me minutes from destination airport...

     

     

    I have all of this working fine on my stock 747, as well, setting all actions at departing airport where all I need to do is release brakes, plane will take off, raise flaps, gear, set APP, NAV1 sw, lower flaps gear, flare up, brake, reverse thrust and stop, totally unattended. 

     

    I like math and tech challenges and able to log lots flight miles without me sitting at computer for hours,... which I why I do this.

     

    Any help on control, lvars, offsets etc for 777's MCP would be greatly appreciated.

     

    Bob Higgins

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