Results 1 to 2 of 2

Thread: Elevator-Aileron-Rudder Trim Percentage Question

  1. #1
    Join Date
    Apr 2010
    Location
    Oakland, California; USA
    Posts
    341

    Default Elevator-Aileron-Rudder Trim Percentage Question

    I'm still working off the digital gauge .xml template I've borrowed from someone else, in an effort to make some new gauges for myself.

    I'm stuck at the ELV, AIL, and RUD Trim % commands.

    I got Elevator Trim Percentage to work using the command line:

    (A:Elevator Trim PCT, percentage))%!2d!

    However when I tried to apply the same formula for the Aileron & Rudder... using:

    (A:Aileron Trim PCT, percentage))%!2d! & (A:Rudder Trim PCT, percentage))%!2d! respectively, the last two wouldn't work. They zeroed out.

    (Note that this is just a section of the command line...all other things in the rest of the .xml text are equal to that of the one for Elevator Trim except of course the words Aileron, and Rudder).

    I should point out that the plane I'm doing this for is the default b737_400... a safe litmus test to do all this on. Note that on that plane's default panel are switches for all three trim scenarios... so it's not like any of them are missing on the plane.

    In the Parameters page of the SDK, it showed "Elevator (or Aileron) (or Rudder) Trim PCT" as valid command lines.

    So my question is of the three, why did only the Elevator one work? Has anyone else had a problem with this in their experiences making gauges and manipulating this data?

    I did find a work around, but I don't know if it's an accurate representation of "percentage of trim" or not:

    For the aileron trim and the rudder trim only, I decided to use the command "Aileron Trim" and "Rudder Trim", which measures the amount of deflection in the surface being trimmed in units of degrees.

    So using those parameters in the command line with the unit "degree" I was able to get those gauges to work. However, I don't want the info in degrees of play (which turned out to be +/- 10° for both-- for the aircraft I'm testing this with. I want it in percentage of play (+/- 100%).

    So I had the idea of telling it to take the degrees, divide by 10 and then multiply by 100 to give me the degrees of trim play as a percentage instead of an angle. And I might add that it does work, and I get *FULL* aileron & rudder trim values of -100% to the left and +100% to the right... just like I wanted.

    But... is the rate of travel in degrees and percent directly linear to one another?

    Can I assume that if 10° of 10° total play in one direction is 100%, that 5° is 50%, 2.5° is 25%, etc.? Or is that relationship not that clean-cut, even though I tweaked the measurement and seemed to make it work that way?

    My whole reason for doing this is that sometimes when I trim aircraft while I fly, I don't always know where the exact center point of the trim wheel is when I want to return it to neutral... so I thought this gauge might help me... even if it is a bit of a "cheat". I suppose if all I really care about is 0=center or netural... then it really doesn't matter if it's % or degrees, so long as they both zero out as a percentage or a degree.

    Thanks.
    Last edited by b3burner; 06-24-2012 at 06:34 PM.
    MSFS 2004 v9.1; Windows 7 Ultimate 64-bit
    AMD FX 8120 8-core processor 4.3Ghz, XFX R7870 2GB GDDR5, Corsair Vengeance 8GB 1600, Western Digital 500GB HDD, Biostar A880GZ AM3+, Antec Kuhler 620 water cooling

  2. #2

    Default

    I can't see your entire script, but I suspect that you are not formatting your script properly, and are simply missing some critical characters!

    In any <String> expression, the fundamental key is the "evaluate the following" script:

    %( ... ) Note especially the "percent symbol + open round bracket", then the thing you want evaluated, and lastly, a closing round bracket.

    That is why you will always see:

    %((A:SomeParameter,unit)) where the red text is the "evaluate" command and the blue text is the expression to be evaluated.

    Once again, I will emphasize the importance of using a CR (carriage return or enter key) to separate each section of the <String> into its constituent components. This will allow you to examine each component for proper formatting without having to strain yourself and your eyesight!

    Let's examine for a moment this particular <String>:
    Code:
    <String>
     %((A:GPS ETE, hours) flr 100 %)
         %!02d!:
         %((A:GPS ETE, minutes) flr 60 %)
         %!02d!
    </String>
    
    The first line is an "evaluate the following" expression. I'm asking the sim to display the GPS Estimated Time Enroute, hours and apply the "floor" to a modulo of 100. This ensures that I will always receive a whole integer of just the hours (because the variable will actually return fractional hours such as 3.6292018593820, and I only want the "3" to be displayed!

    The second line is defining how I want the returned value to be displayed. So, % (evaluate) !02d! (format for display). The leading zero means "pad the return with a leading zero", and the 2 means "two digits" and the d means whole fixed whole number (no decimal). This line ends with the simple colon character : because any character following a % symbol will be displayed as literal text.

    These two lines will always display this form: 00: to 99:

    The third line is similar to the first, except I'm asking for the "minutes" part of the GPS Estimated Time Enroute variable, and since its returned in seconds, I want the "floor" (nearest integer) of modulo 60.

    The fourth line is identical format as the second line, without the trailing colon : character.

    The final assembled "string" will always be in this exact format:

    00:00 through 99:59

    BTW, the above is the answer to your "digital clock" question. All you need to change is the variable!
    Last edited by n4gix; 06-25-2012 at 03:20 PM.
    Bill Leaming
    Gauge Programming - 3d Modeling Eaglesoft & Military Visualizations
    Flightsim.com Panels & Gauges Forum Moderator
    Flightsim Rig: Intel Core i7-2600K - 8GB DDR3 1333 - GeForce GTX550Ti 1GB - Win7 64bit Home Premium
    Development Rig1: Intel Core i7-3770k - 16GB DDR3 - Dual Radeon HD7770 SLI 1GB - Win7 64bit Professional
    Development Rig2: Intel Core i7-860 - 8GB DDR3 Corsair - GeForce GTS240 1GB - Win7 64bit Home Premium
    NOTE: Unless explicitly stated in the post, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...

Similar Threads

  1. Replies: 0
    Last Post: 02-23-2011, 05:45 PM
  2. Re: Question - Elevator/Elevon Trim
    By codebreaker in forum Aircraft Design Archive
    Replies: 0
    Last Post: 04-28-2003, 07:48 PM
  3. Question - Elevator/Elevon Trim
    By codebreaker in forum Aircraft Design Archive
    Replies: 0
    Last Post: 04-24-2003, 09:57 AM
  4. Aileron vs Rudder Trim?
    By TomDoc in forum FS2002
    Replies: 6
    Last Post: 12-03-2002, 11:01 AM
  5. Elevator & Rudder trim toggle switches on panel
    By kelmar in forum The Outer Marker
    Replies: 0
    Last Post: 11-11-2002, 08:18 PM

Posting Permissions

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