The A2A Simulations Community

"Come share your passion for flight"
It is currently Wed May 24, 2017 8:30 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 14 posts ] 
Author Message
PostPosted: Tue May 16, 2017 8:47 pm 
Offline
A2A Master Mechanic
User avatar

Joined: Sat Aug 02, 2008 5:04 pm
Posts: 3078
Location: San Francisco
I am finishing up my set of Lua scripts for the L049 that will setup the aircraft for engine start and
also manage MP and RPM from takeoff to approach. I'll be posting a link to the download file that
contains the 3 Lua files (multiple functions in each), sound folder containing the annotation, a small
XML gauge to allow selection of 6 sets of parameters for Takeoff, Climb, Cruise, BMEP 145 hold and
BMEP 140 hold. Prop sync is managed as is supercharger engage/dis-engage.

I still have a bit of testing to do and finish writing the installation and operation instructions, but in the
interim here are some rough flow charts of the 3 Lua files.

The revised L049-Start Lua:


Image


The new L049-MP control Lua:


Image

Image


The new L049-RPM control Lua"


Image


Image


Image

Paul

Image


Top
 Profile  
 
PostPosted: Thu May 18, 2017 6:38 am 
Offline
Airman

Joined: Thu May 18, 2017 6:34 am
Posts: 10
That looks very exiting. My quick browsing of this implies disabling the FE provided by A2A?


Top
 Profile  
 
PostPosted: Fri May 19, 2017 4:28 pm 
Offline
A2A Master Mechanic
User avatar

Joined: Sat Aug 02, 2008 5:04 pm
Posts: 3078
Location: San Francisco
P*Funk wrote:
That looks very exiting. My quick browsing of this implies disabling the FE provided by A2A?


You can run with or without the A2A VFE.

Here is my initial 'Read_me' file that will accompany the release.

    A2A L049 Constellation Virtual Flight Engineer Extension

    Along with this file, you should find 3 folders and 3 Lua files.

    Installation:
    --------------------------------------------------------------

    NOTE: A REGISTERED version of FSUIPC4 is required!


    1: Move the folder "L049_Sound" into the FSx 'Modules' folder

    2: Move the three Lua files into the FSX 'Modules' folder

    3: Move the "MP_RPM_SET" folder into the
    FSX 'Simobjects\Airplanes\WoS_L049\panel" folder

    4: Refer to the "L049 Panel CFG Edit.txt" file to edit the
    panel.cfg file

    5: After completing the steps above, start FSX and load the A2A L049.
    Refer to the 'assignment' JPG files in the "INFO_FILES" folder
    to assign keys to load (run) the 'L049-Start.lua' file and
    'L049-MP_set.lua' and 'L049-RPM_set.lua' files.
    A list of the default assigned keys and available keys is
    contained in the file 'Key_Assignments_List.txt'
    --------------------------------------------------------------

    Operation:
    --------------------------------------------------------------

    General Notes:
    ==============
    This 'extension' can be run with or without the A2A VFE being enabled.
    Occasionally comments by the crew may happen while the VFEX is also
    'talking' as there is no was to determine in advance when the crew
    comments will take place.

    If the VFE is to be used, it will be best to disable the Superchargers
    function and allow this VFEX to handle the superchargers since engagement
    of the superchargers requires the throttles to be reduced this VFEX will
    do that automatically. If the A2A VFE is in charge then the operation of
    the VFEX must be aborted in able to unloak the throttles and let the
    user reduce power when requested. Once the superchargers are engaged, the
    VFEX operation can be resumed (select the desired mode, then 'Start')

    At various stages of operation where user input is required, the A2A
    Radio gauge will open and the ATC code will be used to respond. The ATC
    code will be set to 1200 for this operation,
    restored afterwards.

    A "Yes" response is indicated by a right-click on the last digit, changing
    the code to 1201.

    A "No" response is indicated by a right-click on the '2' digit, changing
    the code to 1300.

    The previous user ATC code will be resored after the input operation and
    the radio gauge closed.

    Various operations will be annouced by the VFEX 'crew', British pilot,
    Aussie 1st Officer and US FE. Lua displays will also provide feedback
    during operation with 3 separate small lua displays, one for each Lua file,
    popping up in 3 different locations near the top of the screen.

    Starting the VFEX:
    ===================
    Once the L049 is loaded the "L049-Start.lua" file can be started. There is
    a built in delay to allow the initial crew comments to take place before
    the VFEX "Ready to start..." announcement takes place.

    There are options to rum/load functions or abort/skip functions as the operation
    progressives.

    The initial 2 prompts for user input allows one to bypass the entire pre-start
    setup and engine start initially or just skip the pre-start setup and move on
    to start the engines.

    During engine start, there is a 'hold' after starting engines 3 and 4 to allow
    for loading of passengers and cargo to be comoleted before starting engines
    2 and 1. The user can choose to wait or respond immediately with '1201' to continue.

    Upon completion of engine start, or when the pre-start or engine start operations
    are skipped, the user will be prompted to either run or skip the Manifold Pressure
    and RPM Control scripts. Thus one can choose which features to activate. Pre-start
    setup, engine start, MP/RPM control.

    When FSX is PAUSED, the Lua scripts will also PAUSE and display messages to that effect.

    When the option to Load/Run the MP and RPM Lua scripts is selected, the L049-Start.lua
    file will start the L049-MP_set.lua initialization script. Once that initialization is
    completed, the L049-MP_set.lua will start the L049-RPM_set.lua script. At that time the
    XML control gauge will appear in the upper-left corner of the screen. This gauge is
    located in the Shift+1 window, thus can be opened/closed as required using that key-combo.

    The control gauge offers the option to select 6 different power configurations:

    IDLE MP 20" RPM 1500
    TAKE OFF MP 44" RPM 2800
    CLIMB MP 32" RPM 2300
    145 BMEP MP varies RPM Varies BMEP held to 145 PSI
    CRUISE MP 29" RPM 2200
    140 BMEP MP varies RPM Varies BMEP held to 140 PSI

    Selection of any option may also engage/dis-engage other fuctions such as cowl flap settings,
    landing lights, strobe, pitot heat, mixture, etc.

    When the A2A VFE is NOT controlling the superchargers, the VFEX will engage them when passing
    through 12,657' and dis-engage them when passing below 12,353'. Those altitudes were chosen
    to avoid 'toggling' when a cruise level of 12,500' is used. They are also values conveerted
    from 'meters'...3857m and 3765m.

    At an altitude of 20,800' the CLIMB or CRUISE modes will automatically switch to 145 or 140 BMEP modes.
    This is to allow the RPM and MP to be reduced, while maintaining power. Otherwise the throttle
    settings required to hold a set MP/RPM would be excessive.

    Along with this 'mode switch', the RPM will be automatically adjusted every 500' to maintain
    a reasonable throttle setting. I have flown a light fuel loaded aircraft up to 27,000' with no issues.

    Mode selection/activation is accomplished by 'pressing' the desired mode button and then
    pressing the 'Start' button. Throughout operation of the MP and RPM control scripts, the throttles
    are 'locked' and no user input is available.

    Should the user need to use the throttles, say to reduce power if the A2A VFE requests it while
    controlling the superchargers or at any other time, simply press the 'Abort' button and the throttles
    will enabled and an annoucement to that effct will be made. The Lua scripts will still be loaded
    and awaiting a further mode selection/start operation.

    The scripts can be 'killed' using a preassigned key\key-combo assigned via the FSUIPC4 'Key presses' menu.
    (See the JPG files in the INFO_FILES folder)

    During my test flights I have flown the aircaft from takeoff through climb (to 25k'+), cruise,
    descent and final approach without ever touching the throttles and controlling heading and
    altitude with the autopilot.

    I have tested these scripts on my system running Win7 Pro X64. They should not present
    any problems during normal operations. I do suggest that you save your DAT file prior to
    flight so that should any problems arise you can restore the aircraft's hours and state to
    the condition it was in before flight.

    Version 1.30 - 17 May 2017 - Paul 'Gypsy Baron' Strogen




Top
 Profile  
 
PostPosted: Sat May 20, 2017 12:20 am 
Offline
Airman First Class

Joined: Mon Aug 30, 2010 9:47 am
Posts: 94
Hello Paul

That's some impressive programing going on there! 8)


Top
 Profile  
 
PostPosted: Sat May 20, 2017 1:20 am 
Offline
A2A Master Mechanic
User avatar

Joined: Sat Aug 02, 2008 5:04 pm
Posts: 3078
Location: San Francisco
maddz wrote:
Hello Paul

That's some impressive programing going on there! 8)


This 'little project' took on a life of it's own. Every time I thought I was ready to
release it, another idea/approach, popped into my head as I was lying in bed :)

It was definitely a learning experience !

It should be ready for release next week.

Paul

Image


Top
 Profile  
 
PostPosted: Sat May 20, 2017 7:31 am 
Offline
Airman First Class

Joined: Mon Aug 30, 2010 9:47 am
Posts: 94
Ever heard of the saying 'A programer never sleeps'? :lol:

Great stuff


Top
 Profile  
 
PostPosted: Sun May 21, 2017 9:30 am 
Offline
Airman

Joined: Thu May 18, 2017 6:34 am
Posts: 10
That all looks even better than I imagined. Will we be able to customize power settings for cruise or descent easily enough or are the available power settings baked into your scripting?


Top
 Profile  
 
PostPosted: Sun May 21, 2017 6:57 pm 
Offline
A2A Master Mechanic
User avatar

Joined: Sat Aug 02, 2008 5:04 pm
Posts: 3078
Location: San Francisco
P*Funk wrote:
That all looks even better than I imagined. Will we be able to customize power settings for cruise or descent easily enough or are the available power settings baked into your scripting?


Currently the MP/RPM/BMEP values are set in the scripts.

It may be possible to add a feature where the user can 'abort' the MP/RPM operation,
take control and set the desired MP/RPM/BMEP and then have the control scripts read
those three settings and use them instead of the selectable mode settings.

This will require some re-writing to the structure of the 'mode control' area, replacing the current
data entries in the mode logic with variables that are set from either the pre-defined values
or the 'current user settings'. Currently the values are embedded in each of the mode definitions
like this:
Code:
[color=#BFFF00]
   if mode == 3 then
     mp_goal = 32                                       -- Climb MP
     rval = 2300
     bmep = 145
[/color]

The new code would determine if the preset data is to be used or the current settings using
logic similar tho this:

[color=#BFFF00]
 if mode == 3 then
     if user_set == 1 then
        mp = read_engine 1 MP            (not real lua variables)
        rval = read_engine 1 RPM
        bmep = read_Engine 1 BMEP
        user_set = 0
     else
       mp_goal = 32           
       rval = 2300
       bmep = 14
    end

   (continuation of the mode code)
 end
[/color]


I just need to figure out how to have the user set 'user_set = 1' :)

The first thought that came to mind was have the user select 'Abort', then
select "TakeOff" mode after he has set the desired MP/RPM/BMEP and select 'Stert'.
The code would sense that the aircraft was not on the ground and instead of
setting the TakeOff mode, the user_input flag would be set to 1.

The user then selects one of the other modes and hits 'Start'.
The code for that mode would would see the user_input flag = 1
and read in the current parameters and use them for that mode.
The user_set flag would be reset and operation would return to
the presets on the next mode selection.

Paul

Image


Top
 Profile  
 
PostPosted: Sun May 21, 2017 7:27 pm 
Offline
Airman

Joined: Thu May 18, 2017 6:34 am
Posts: 10
Well I certainly like how enthusiastically you reply to a suggestion that would make you have to reassess your entire script! I wonder if you'd ever consider integrating voice recognition that's built into windows, but maybe that's optimistic.

Am I right in assuming I could easily just with how it is now alter the MP/RPM/BMEP figures manually in the script before a flight if I wanted a different cruise number? Seems perfect if this is true for fuel burn and power efficiency testing since right now we don't have a lot of concrete figures to work from when fuel planning.

As far as going forward would you ever consider creating multiple cruise/climb profiles that the user can command making step climbs with different profiles depending on your new weight/alt seamlessly built into it? Also how flexible is the script as far as step climbing using the existing script you have, ie. if I'm on vatsim and I have to climb to a particular altitude, get held there by ATC for a few minutes, then continue my climb can I easily toggle the VFE script between climb and cruise mode?

I'm really getting excited for all this.


Top
 Profile  
 
PostPosted: Sun May 21, 2017 9:05 pm 
Offline
A2A Master Mechanic
User avatar

Joined: Sat Aug 02, 2008 5:04 pm
Posts: 3078
Location: San Francisco
One can certainly edit the script files to change the MP/RPM/BMEP data for each mode.

As for the step climb, the Cruise and Climb modes can be commanded at any time.

You can select Cruise from Climb and then later select Climb again as needed.

I'm about to post 4 videos of the operation. Unfortunately Youtube has really altered
the quality and they are now 'fuzzy'.

Paul


Top
 Profile  
 
PostPosted: Sun May 21, 2017 9:28 pm 
Offline
Airman

Joined: Thu May 18, 2017 6:34 am
Posts: 10
That's excellent. I imagine I could just keep plugging away at you with all sorts of labour intensive ideas but by the looks of things because its lua and you know what you're doing the sky, or your patience, is the limit. Just out of curiosity how far down the rabbit hole are you going to go? Sounds like you've already tricked yourself into doing much more than you originally planned.

Here's a question, can I manually edit the lua script while the sim is running while I'm say climbing after a first cruise step, alter the cruise numbers, then reenable the cruise script to the new figures?


Top
 Profile  
 
PostPosted: Sun May 21, 2017 10:16 pm 
Offline
A2A Master Mechanic
User avatar

Joined: Sat Aug 02, 2008 5:04 pm
Posts: 3078
Location: San Francisco
You can edit the lua file(s) while running then reload it/them for the new content
to become available.

The installation instructions talk about assigning a key or combo to start/kill the scripts.

In the case of changing the preset mode values, just the l049_MP-set.lua script would need to
be restarted. Restarting automatically kills the previous version.

That said, these is an initialization section of that script which runs Master Prop Govenor to the
low limit, then back to the high limit, and finally back down to a mid range before continuing on
and then starting the L049_RPM-set.lua.

Some of those functions would need to be 'commented out' to do the sort of in-flight reload operations.

I MAY add a global 'TEST' flag that could then be used to bypass various operations as noted above. That
would be similar to what I do now with the A2A VFE active/inactive states.

The only other possible add-on, probably a separate Lua file, would be to automate the
run-up and MAG check.

I'll 'sleep' on the things we discussed here and see what I might accomplish in the 'free time' I have between
my ongoing trips...I'm off to Seattle for the long Memorial Day weened, then in mid-June I am off to
Europe for 6 weeks followed almost immediately by a month in Cape Breton, Nova Scotia.

I take my 'gaming laptop' with me so if I have free evenings I can do FSX stuff and also support
the 91st Bombardment Group as I am the Mission Development Officer, creating the flight plans, special
scenery and effects.

Paul


Top
 Profile  
 
PostPosted: Sun May 21, 2017 11:37 pm 
Offline
Airman

Joined: Thu May 18, 2017 6:34 am
Posts: 10
Well automating the VFEX to do his share of the after start checks would be pretty cool too, though I imagine it may require more complexity as it has to then diagnose the engines as suitable or not for flight. I also would ask how does it work with emergencies, like if there's a fire at engine start or in flight. I haven't had one yet so I'm not even sure how the standard VFE deals with it and what I'm supposed to do.


Top
 Profile  
 
PostPosted: Tue May 23, 2017 11:04 pm 
Offline
Airman

Joined: Thu May 18, 2017 6:34 am
Posts: 10
I had another thought, one that selfishly involves you coding a new feature... sorry. :wink:

For the purposes of tracking fuel burn it would be cool if you could create an automated log file for relevant information, such as a fuel tank log for various phases of flight, pre start (triggered by the starting of any engine), takeoff, start of cruise, top of descent, approach, landing, shut down.

Of the above at least fuel used between start, takeoff, landing, and shutdown would be ideal but as many as possible would be helpful for tracking fuel burn. Alternatively or in addition a simple "event log" feature that basically outputs a variety of data points, including fuel state, engine power settings, oil temps and pressure, OAT, pressure alt, whatever else, at the press of a button.

I only ask because I've found it difficult to track fuel burn as the Connie is quite a busy airplane and writing down 4 numbers is not always easy to remember or do at various points. That's of course a wish list item. Frankly I think it'd be a great separate project in fact, one that runs in parallel to this one but could also run without the VFEX.

I mean.. its the kind of idea that makes me want to learn LUA. :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: lholdridge and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group