Engine gauges do not match tool tip numbers

Post any technical issues here. This forum gets priority from our staff.
Hook
Master Sergeant
Posts: 1358
Joined: 31 Dec 2012, 01:38
Location: Bonham, Texas

Engine gauges do not match tool tip numbers

Post by Hook »

For what it's worth, the Cub oil pressure and oil temperature gauges read lower than the tool tip displays.

I played with the interior model file a bit and changed the "2 /" for the gauge animations to be "0.57 *" for the oil temperature and "0.6 *" for the oil pressure. The gauges now display the same values as the tool tip. I am assuming the tool tip shows the correct numbers and the gauge calibration is off. Note that hacking the binary .mdl file to do this is not for the faint of heart.

Techie note: If it's not obvious I had to rename the variable that's used to display the gauge to be shorter so I had room to add characters to the script string, then include an additional processing .xml file to copy the original value to the new variable.

(L:Eng1_OilTemp,celsius) (>L:OilTemp,celsius)
(L:Eng1_OilPressure,psi) (>L:OilPressure,psi)

As long as I was creating my own variable for this, I added processing to make the oil pressure gauge delay a couple of seconds before indicating pressure on first starting the engine, the actual length of time depending on the ambient temperature. I'd been using similar processing in another non A2A aircraft to also vary the oil pressure with the oil temperature (and weight of oil being used). Accu-Engine, here we come!

Hook

User avatar
Lewis - A2A
A2A Lieutenant Colonel
Posts: 33284
Joined: 06 Nov 2004, 23:22
Location: Norfolk UK
Contact:

Re: Engine gauges do not match tool tip numbers

Post by Lewis - A2A »

Hey Hook,

thanks for the post noted for investigation.

thanks,
Lewis
A2A Facebook for news live to your social media newsfeed
A2A Youtube because a video can say a thousand screenshots,..
A2A Simulations Twitter for news live to your social media newsfeed
A2A Simulations Community Discord for voice/text chat

Hook
Master Sergeant
Posts: 1358
Joined: 31 Dec 2012, 01:38
Location: Bonham, Texas

Re: Engine gauges do not match tool tip numbers

Post by Hook »

(The following depends on the gauge changes noted above. You can check against the tooltips even without the gauge adjustments.)

I have discovered something else. It takes for-freaking-ever for the engine to warm up. It's bad enough in mild weather, but impossible when the weather is really cold.

The problem is, you need to get 100 degrees F oil temperature to take off or your oil pressure will be too high at full throttle. The 100 degrees is necessary to keep the oil pressure down below the upper limit which appears to be 54. You have to idle high enough to break the upper pressure limit to simply get the oil temperature to around 70 or so, and I was idling at around 1500 RPM at one time.

In the file code_s.xml is the following:

(L:Eng1_OilTempCalc,farenheit) - 0.0001 *

I recommend changing the 0.0001 to 0.0002 to get the oil temperature to change faster.

I haven't tested this, but the problem acts like after multiplying by 0.0001 you end up with a number small enough that it rounds to zero fairly often so no change is effected. With 0.0002 you can get your oil temperature up to 90+ easily enough even with -14C ambient temperature by idling at 1000 to 1200 or a little higher (checking to make sure your oil pressure doesn't get too high, of course). It takes a while. :)

When flying in hot weather, when the oil temperature gets above 140 it is not calibrated with the gauge,
with the needle rising much faster than the markings on the gauge. For example, about 170 degrees displays at the 190 degree mark. I have some code to recalibrate the oil temp gauge reading, not quite perfect but good enough. I can make this available if you want.

Hook

Hook
Master Sergeant
Posts: 1358
Joined: 31 Dec 2012, 01:38
Location: Bonham, Texas

Re: Engine gauges do not match tool tip numbers

Post by Hook »

After getting some of the math right, I've got the oil temperature gauge working exactly the way I want.

Up to about 135 degrees the movement is linear and works well (with the 0.57 multiplier rather than dividing by 2). Beyond that the movement of the needle is non-linear. Right now I've got the gauge reading exactly the same as the tooltip, which I assume has the correct value. The needle has a slight wobble that matches the tooltip, which is appropriate. Everything is the same except the gauge is calibrated properly to match the tooltip.

Hook

User avatar
Scott - A2A
A2A General
Posts: 16839
Joined: 11 Feb 2004, 12:55
Location: USA
Contact:

Re: Engine gauges do not match tool tip numbers

Post by Scott - A2A »

Hook, can you post here the exact changes here or PM that you made and we will check these out? We're working on an update at the moment and this is a good time for us to review this temp.

Scott
A2A Simulations Inc.

Hook
Master Sergeant
Posts: 1358
Joined: 31 Dec 2012, 01:38
Location: Bonham, Texas

Re: Engine gauges do not match tool tip numbers

Post by Hook »

Thanks, Scott.

OK, first of all I had to make some changes to the interior model file for all this to work.
The tool tips were not changed.
In the animations, oil pressure had to be multiplied by 0.6 rather than divided by 2.
The oil temperature animation was replaced by (L:OilTempGauge, number) which was calculated elsewhere.
In order to get extra characters for the 0.6 multiplication, I changed (L:Eng1_OilPressure,psi) to (L:OilPress,psi) in the interior model file.

Panel.cfg:
In the VCockpit.00 section I added the following line:
gauge19=LDH!Process, 1,1,1,1

This is what that file looks like:

Process.xml

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<Gauge Name="Process" Version="1.0">
	<Update>

        <!-- Oil pressure delay on start -->

        (A:GENERAL ENG COMBUSTION:1, bool)
        if{
            (L:Oil timer running, bool)
            if{
                99 (L:Oil timer, seconds) ==    <!-- test for first start of the day -->
                if{
                    (E:Absolute time, seconds) 
                    120 (A:Ambient temperature, farenheit) - 30 / +
                    (>L:Oil timer, seconds)
                }
                (E:Absolute time, seconds) (L:Oil timer, seconds) &gt;
                if{
                    0 (>L:Oil timer running, bool)
                    88 (>L:Oil timer, seconds)  <!-- set for subsequent restarts -->
                }
                els{
                    0 (>L:OilPress, psi)
                }
            }
            els{
                (L:Eng1_OilPressure,psi)
                (L:OilPress, psi) 9 * + 10 /  <!-- smooth needle movement -->
                (>L:OilPress, psi)
            }
        }
        els{
            (L:Oil timer, seconds) 88 !=    <!-- test for subsequent restarts -->
            if{
                1 (>L:Oil timer running, bool)
                99 (>L:Oil timer, seconds)  <!-- set for first start of the day -->
            }
            (L:Eng1_OilPressure,psi) (>L:OilPress,psi)
        }
        
        <!-- Recalibrate oil temperature gauge to match markings -->

        (L:Eng1_OilTemp, farenheit) 135 &lt;
        if{
            (L:Eng1_OilTemp, farenheit) 0.57 * (>L:OilTempGauge, number)
        }
        els{
            (L:Eng1_OilTemp, farenheit) 140 &lt;
            if{
                (L:Eng1_OilTemp, farenheit) 135 - 1.2 * 77 + (>L:OilTempGauge, number)
            }
            els{
                (L:Eng1_OilTemp, farenheit) 160 &lt;
                if{
                    (L:Eng1_OilTemp, farenheit) 140 - 0.375 * 83 + (>L:OilTempGauge, number)
                }
                els{
                    (L:Eng1_OilTemp, farenheit) 180 &lt;
                    if{
                        (L:Eng1_OilTemp, farenheit) 160 - 0.115 * 90.5 + (>L:OilTempGauge, number)
                    }
                    els{
                        (L:Eng1_OilTemp, farenheit) 190 &lt;
                        if{
                            (L:Eng1_OilTemp, farenheit) 180 - 0.32 * 92.8 + (>L:OilTempGauge, number)
                        }
                        els{
                            (L:Eng1_OilTemp, farenheit) 190 - 0.4 * 96 + (>L:OilTempGauge, number)
                        }
                    }
                }
            }
        }

    </Update>
</Gauge>
The first section of this code adds a delay to the oil pressure gauge on the first start of the day. The delay is longer in colder weather. The second section recalibrates the oil temperature gauge.

code_s.xml
Changed code:
(L:Eng1_OilTempCalc,farenheit) (L:Eng1_OilTempGoal,farenheit) (L:Eng1_OilTempCalc,farenheit) - 0.0002 * + (L:OAT,farenheit) max (&gt;L:Eng1_OilTempCalc,farenheit)
Changed 0.0001 to 0.0002 to get oil temp to change faster, or in some cases to change at all.

mapscreen.xml
Added Bright attribute to magnetic heading arrowhead

Code: Select all

        <Element id="Heading Mag">
            <FloatPosition>386.000,384.000</FloatPosition>
            <Element id="Element">
                <FloatPosition>0.000,0.000</FloatPosition>
                <Polygon id="Polygon">
                    <Axis>0.500,0.000</Axis>
                    <!-- LDH added -->
                    <Bright>True</Bright>
                    <FillColor>white</FillColor>
                    <LineWidth>2</LineWidth>
manager.xml
Pilot and passenger info background squaresize from 100,100 to 100,95
Passenger personality display from /lsp=30 to /lsp=26
The square around the passenger data cut into the pic of the aircraft. This fixes it.
New code:

Code: Select all

\{lsp=26}
\{clr=white}%((L:PassengerPersonality,enum))%{case}%{:0}SILENT%{:1}CALM%{:2}NERVOUS%{:3}FUN%{end}</GaugeString>
                        <HorizontalAlign>CENTER</HorizontalAlign>
                        <LineSpacing>20.000</LineSpacing>
                        <Multiline>True</Multiline>
<!-- LDH Original, also lsp=30 changed to lsp=26 above
                        <Size>100,100</Size>
-->
                        <Size>100,95</Size>
Also change pilot <size> as above

controls.xml
ColdDarkAble test for ground speed 0, was 2
Added engine not running
This makes Cold Start bright if it's possible, dim if not. Currently always dim.
Old:
(A:SIM ON GROUND,bool) 1 == (A:GROUND VELOCITY,knots) near 2 == and if{ 1 (&gt;L:ColdDarkAble,bool) } els{ 0 (&gt;L:ColdDarkAble,bool) }
New:
(A:SIM ON GROUND,bool) 1 == (A:GROUND VELOCITY,knots) near 0 == and (A:GENERAL ENG COMBUSTION:1,bool) 0 == and if{ 1 (&gt;L:ColdDarkAble,bool) } els{ 0 (&gt;L:ColdDarkAble,bool) }

--------

I think that's everything. Let me know if you need actual files that I've changed.

Hook

Hook
Master Sergeant
Posts: 1358
Joined: 31 Dec 2012, 01:38
Location: Bonham, Texas

Re: Engine gauges do not match tool tip numbers

Post by Hook »

Clicking Cold Start will immediately set the cabin temperature to ambient, but the oil temperature doesn't seem to change unless you save the flight after Cold Start, then reload it, or reload the aircraft. Sometimes this is what you want considering how hard it is to start a cold soaked engine. I suspect it has to do with how fast the oil temperature changes.

I added code to set (&gt;L:Eng1_OilTempCalc,farenheit) to (L:OAT,farenheit) and it worked. It's currently setting (&gt;L:EngOilTemp2,celsius) which doesn't seem to have any immediate effect and I left that code intact.

----

When I "updated" the Cub on skis for the new gauge calibration, I had to change the following in the interior model file for the gauge animations only:
Oil temperature gauge: (L:OilTempGauge,number)
Oil pressure gauge: (L:OilPress,psi) 0.6 *
Although if you're changing the model source file you could use the full variable name (L:Eng1_OilPressure,psi). I had to shorten the name to get enough characters to change "2 /" to "0.6 *".

These are calculated in LDH/Process.xml

Maybe this will be more clear than what I posted above.

Hook

Hook
Master Sergeant
Posts: 1358
Joined: 31 Dec 2012, 01:38
Location: Bonham, Texas

Re: Engine gauges do not match tool tip numbers

Post by Hook »

Also, when clicking on the Cold Start button, the following in controls.xml:
0 (&gt;L:CarbHeat1Switch,bool)
should be replaced by:
0 (&gt;L:Eng1_CarbHeatSwitch,bool)
to reset the carb heat to off.

I didn't remove the old line, just added the new one and tested it and it works.

Hook

User avatar
Scott - A2A
A2A General
Posts: 16839
Joined: 11 Feb 2004, 12:55
Location: USA
Contact:

Re: Engine gauges do not match tool tip numbers

Post by Scott - A2A »

Hook thanks for the info. We'll be working on this tomorrow morning and will post any updates on this area here.

Scott
A2A Simulations Inc.

Hook
Master Sergeant
Posts: 1358
Joined: 31 Dec 2012, 01:38
Location: Bonham, Texas

Re: Engine gauges do not match tool tip numbers

Post by Hook »

Glad to help.

I found another. Cold Start button currently does this:
0 (&gt;L:Eng1FuelCutOffSwitch,bool)

It should be this:
0 (&gt;L:Eng1_FuelCutOffSwitch,bool)

to get the fuel selector to shut off.

Hook

User avatar
Scott - A2A
A2A General
Posts: 16839
Joined: 11 Feb 2004, 12:55
Location: USA
Contact:

Re: Engine gauges do not match tool tip numbers

Post by Scott - A2A »

Hook,

The cold start stuff isn't in my area (Rob's) but the idle and temps are. I just made a commit that stabilizes the idle issue and also makes the internal engine temps less sensitive to outside air temperature. We did time the oil warm up times and it takes a LONG time for the oil to heat up when just idling. We were a tad on the slow side so I increased this time slightly but it's definitely not 2x.

It's been a while since we flew the cub and we are going to resume some cub test flights soon and will be re-visiting / confirming a lot of this stuff again. Considering we based our Accu-Sim cub on a single J3 it's possible we will see some differences between models, based on how tight the cowling is, etc.

We are finished with the update coding and are now just testing, so it shouldn't be long. And thanks for all of the detailed responses.

Scott.
A2A Simulations Inc.

Hook
Master Sergeant
Posts: 1358
Joined: 31 Dec 2012, 01:38
Location: Bonham, Texas

Re: Engine gauges do not match tool tip numbers

Post by Hook »

Thanks, Scott.

I added some processing to test if the 0.0002 multiplier was skipping updates because of the number being rounded to zero. I increased the multiplier to 0.0004 and put in a variable and a test so that it only updated half the time. The amount of update over time would be the same, or close enough not to matter.

I haven't tested it enough to be sure, but it seems like when the temperature approaches a goal it gets there faster than with 0.0002 alone. For one thing, I finally noticed that the oil temperature during climb got hotter than it finally stabilized in cruise. When I first started flying, before making any changes, I could fly at cruise for almost an hour before the temperature stabilized and it never got above cruise temperature during the climb. This possible rounding error is not a problem when first starting and waiting for the engine to warm up.

How long should it take for the Cub to get to operating temperature for various cold ambient temperatures? I'm already having to let the Cub warm up 15 to 30 minutes at 1200 RPM with my changes.

Hook

Hook
Master Sergeant
Posts: 1358
Joined: 31 Dec 2012, 01:38
Location: Bonham, Texas

Re: Engine gauges do not match tool tip numbers

Post by Hook »

Let me expand a bit on the above in case it doesn't make much sense.

My last flight I took off, climbed, and the oil temperature got up to 100. After reducing to cruise power and leveling off, the oil temp stabilized at around 95. This was the only flight that I saw something like that happen. Some of this was probably changes in OAT.

I've been running the cub in very cold temperatures, under -15C. This is where the long warmup times happen. Also, the oil temperature has to be set to OAT or the engine warms quickly. :)

I'm not worried about how long it takes to get above 40, even if the outside temp is 0 F. But I have real problems getting it up to about 70 so I can do a run up at 1800 without the oil pressure going well over the top of the green arc.

I usually idle at 750 until the oil temp registers above 40 degrees, then 1200 until at least 60 degrees. Taxi to the active usually gets the temperature up to around 70 for run up, but you really need 95 to 100 for a full throttle takeoff to keep oil pressure in the green. If the green only applies to cruise and 60 psi is considered reasonable during full power takeoff, then this doesn't matter. Of course as the oil temperature gets higher the pressure goes down.

Hook
Last edited by Hook on 22 Jan 2020, 18:15, edited 1 time in total.

Hook
Master Sergeant
Posts: 1358
Joined: 31 Dec 2012, 01:38
Location: Bonham, Texas

Re: Engine gauges do not match tool tip numbers

Post by Hook »

Hot weather test with my current code. Custom weather with temperature set to 45C, same temperature throughout climb.

I climbed from 2200 feet to about 4500 feet, temperature got up to 182. I reduced throttle to 2050 RPM, temperature dropped to 178 during the time I was flying, several minutes, plenty of time to stabilize. Oil pressure was about 38 during climb, dropped to 36 in cruise.

Hook

User avatar
Scott - A2A
A2A General
Posts: 16839
Joined: 11 Feb 2004, 12:55
Location: USA
Contact:

Re: Engine gauges do not match tool tip numbers

Post by Scott - A2A »

All of this seems good in terms of oil temps. You don't need to wait for oil to be 40c to takeoff, basically you don't really want to idle an airplane no matter how cold much more than 5-10 minutes (unless there is a specific call like on the P-51 due to very high oil pressures). The oil isn't the issue as much as just getting the cylinder temps up, which they will be after 5 minutes.

It takes forever for oil to warm up when idling when you consider all of the cold soaked parts that are robbing the energy.

Scott.
A2A Simulations Inc.

new reply

Return to “Piper J-3 Cub Tech Support”

Who is online

Users browsing this forum: No registered users and 11 guests