• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

altimeter drums not working, help?

Messages
255
Country
us-newyork
hello , i've still been working on my A300 recently & found out that the 3d altimeter drums and needle does not sync with the pfd screen or change the number of the altimeter setting in hg or mb, how do i get the 3d altimeter (altitude digits and mb/hg setting knob) to sync with the pfd mb and hg are stuck at 9, 9, 9, 9 and framed (9th keyframe) if pfd and the tooltip (156 meters, 511 feet) is the only source displaying correct altitude. the drums keeps resetting to zero when i try to set it or when the plane climbs or descends, no matter what i do. how do i fix this? this is p3dv5 specific.

photo:

1754892432705.png



1754892487871.png



modeldef.xml altimeter drum codes:

<PartInfo>
<Name>alt_drum_10000</Name>
<AnimLength>90</AnimLength>
<Animation>
<Parameter>
<Code>(A:PLANE ALTITUDE, feet) 10000 / flr 10 mod</Code>
</Parameter>
<Type>Sim</Type>
</Animation>
</PartInfo>
<PartInfo>
<Name>alt_drum_1000</Name>
<AnimLength>90</AnimLength>
<Animation>
<Parameter>
<Code>(A:PLANE ALTITUDE, feet) 1000 / flr 10 mod</Code>
</Parameter>
<Type>Sim</Type>
</Animation>
</PartInfo>
<PartInfo>
<Name>alt_drum_100</Name>
<AnimLength>90</AnimLength>
<Animation>
<Parameter>
<Code>(A:PLANE ALTITUDE, feet) 100 / flr 10 mod</Code>
</Parameter>
<Type>Sim</Type>
</Animation>
</PartInfo>
<PartInfo>
<Name>alt_drum_10</Name>
<AnimLength>90</AnimLength>
<Animation>
<Parameter>
<Code>(A:PLANE ALTITUDE, feet) 10 / flr 10 mod</Code>
</Parameter>
<Type>Sim</Type>
</Animation>
</PartInfo>

knob codes:

<PartInfo>
<Name>altimeter_setting_bug</Name>
<AnimLength>9</AnimLength>
<Animation>
<Parameter>
<Code>(A:KOHLSMAN SETTING HG, inHg) 28 - 3 *</Code>
</Parameter>
<Type>Sim</Type>
</Animation>
</PartInfo>
<PartInfo>
<Name>altimeter_setting_bug_mb</Name>
<AnimLength>9</AnimLength>
<Animation>
<Parameter>
<Code>(A:KOHLSMAN SETTING MB, Millibars)</Code>
</Parameter>
<Type>Sim</Type>
</Animation>
</PartInfo>
<PartInfo>
<Name>alt_knob_mb</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>(A:KOHLSMAN SETTING MB, Millibars) 950 - 1 *</Code>
</Parameter>
<Type>Sim</Type>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipID>TOOLTIPTEXT_KOHLSMAN_MB</TooltipID>
<MouseFlags>LeftSingle+WheelUp+WheelDown</MouseFlags>
<CallbackCode>
(M:Event) 'WheelUp' scmp 0 == if{ (>K:KOHLSMAN_INC) }
(M:Event) 'WheelDown' scmp 0 == if{ (>K:KOHLSMAN_DEC) }
</CallbackCode>
</MouseRect>
</PartInfo>
<PartInfo>
<Name>alt_knob_hg</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>(A:KOHLSMAN SETTING HG, inHg) 28 - 33.33 *</Code>
</Parameter>
<Type>Sim</Type>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipID>TOOLTIPTEXT_KOHLSMAN_HG</TooltipID>
<MouseFlags>LeftSingle+WheelUp+WheelDown</MouseFlags>
<CallbackCode>
(M:Event) 'WheelUp' scmp 0 == if{ (>K:KOHLSMAN_INC) }
(M:Event) 'WheelDown' scmp 0 == if{ (>K:KOHLSMAN_DEC) }
</CallbackCode>
</MouseRect>
</PartInfo>
 
Are you certain that the values from your code is correct?

You've got to isolate if there is a problem with your code or with your keyframe animations. One of the debugging things I would do is stick actual numbers at the end of each code segment (if you put an actual number at the end of any code that will go to the top of the stack and will be the number used effectively ignoring everything before it). For example, use 12345 as your test altitude and put 1 at the end of the 10000 code, 2 at the end of 1000 code etc. Do the drums show correctly then?

EDIT: One other thing you may try is using % instead of mod. I can't remember if P3D accepts mod for modulus or if it uses % as the modulus operator. If it doesn't then that would explain the 9999 as your code would be returning 10 if the mod was not a valid operator.
 
Last edited:
Are you certain that the values from your code is correct?

You've got to isolate if there is a problem with your code or with your keyframe animations. One of the debugging things I would do is stick actual numbers at the end of each code segment (if you put an actual number at the end of any code that will go to the top of the stack and will be the number used effectively ignoring everything before it). For example, use 12345 as your test altitude and put 1 at the end of the 10000 code, 2 at the end of 1000 code etc. Do the drums show correctly then?

EDIT: One other thing you may try is using % instead of mod. I can't remember if P3D accepts mod for modulus or if it uses % as the modulus operator. If it doesn't then that would explain the 9999 as your code would be returning 10 if the mod was not a valid operator.

I am not sure if the value is not correct, but I will test the 12345 method
 
Are you certain that the values from your code is correct?

You've got to isolate if there is a problem with your code or with your keyframe animations. One of the debugging things I would do is stick actual numbers at the end of each code segment (if you put an actual number at the end of any code that will go to the top of the stack and will be the number used effectively ignoring everything before it). For example, use 12345 as your test altitude and put 1 at the end of the 10000 code, 2 at the end of 1000 code etc. Do the drums show correctly then?

EDIT: One other thing you may try is using % instead of mod. I can't remember if P3D accepts mod for modulus or if it uses % as the modulus operator. If it doesn't then that would explain the 9999 as your code would be returning 10 if the mod was not a valid operator.
tested the 12345 method. i am not getting the elevation readout at the airport from the altimeter. still the same symptoms. modelconverterx picks up the animation just fine but not in P3D. what else should i try? altimeter code:

<PartInfo>
<Name>alt_drum_10000</Name>
<AnimLength>90</AnimLength>
<Animation>
<Parameter>
<Code>(A:PLANE ALTITUDE, feet) 10001 / flr 10 %</Code>
</Parameter>
<Type>Sim</Type>
</Animation>
</PartInfo>
<PartInfo>
<Name>alt_drum_1000</Name>
<AnimLength>90</AnimLength>
<Animation>
<Parameter>
<Code>(A:PLANE ALTITUDE, feet) 1002 / flr 10 %</Code>
</Parameter>
<Type>Sim</Type>
</Animation>
</PartInfo>
<PartInfo>
<Name>alt_drum_100</Name>
<AnimLength>90</AnimLength>
<Animation>
<Parameter>
<Code>(A:PLANE ALTITUDE, feet) 103 / flr 10 %</Code>
</Parameter>
<Type>Sim</Type>
</Animation>
</PartInfo>
<PartInfo>
<Name>alt_drum_10</Name>
<AnimLength>90</AnimLength>
<Animation>
<Parameter>
<Code>(A:PLANE ALTITUDE, feet) 14 / flr 10 %</Code>
</Parameter>
<Type>Sim</Type>
</Animation>
</PartInfo>
 
You are not putting the 12345 numbers at the end of the code. They must go right before the less than symbol of the </code>.
 
You are not putting the 12345 numbers at the end of the code. They must go right before the less than symbol of the </code>.
ok, so it should be 12345</code>? can you show me a sample of where to put the 12345 numbers (if it has to be 12345 or the numbers 1,2,3,4,5 individually on each line before the </code>?
 
The number should be placed in single digits for each portion of the code. 1,2,3,4.
 
The variable I used for the altimeter was (A:Indicated Altitude, feet)
 
Like this:

Code:
<Code>(A:PLANE ALTITUDE, feet) 10000 / flr 10 mod 1</Code>

<Code>(A:PLANE ALTITUDE, feet) 1000 / flr 10 mod 2</Code>

<Code>(A:PLANE ALTITUDE, feet) 100 / flr 10 mod 3</Code>

<Code>(A:PLANE ALTITUDE, feet) 10 / flr 10 mod 4</Code>

Because 1,2,3 and 4 are at the end of the code and there are no operators (+, -, * etc) the values 1,2,3 and 4 will be used for the animation so you can check your animation code.

Using % instead of mod would look like this. Like I said, I don't know if mod works in P3D (so long ago since I used it) but in the MSFS2020 the docs say use % for modulus

Code:
<Code>(A:PLANE ALTITUDE, feet) 10000 / flr 10 %</Code>

<Code>(A:PLANE ALTITUDE, feet) 1000 / flr 10 %</Code>

<Code>(A:PLANE ALTITUDE, feet) 100 / flr 10 %</Code>

<Code>(A:PLANE ALTITUDE, feet) 10 / flr 10 %</Code>
 
In my altimeter i use:

XML:
<!-- Altitude Convert Tenth -->
    (L:CORE2_AirData1_Altitude,feet) 100 % (&gt;L:AltiM_Feet_Tenths,feet)

<!-- Altitude Convert Hundreds -->
    (L:CORE2_AirData1_Altitude,feet) 1000 % 100 / int (&gt;L:AltiM_Feet_Hundreds,feet)

<!-- Altitude Convert Thousands -->
    (L:CORE2_AirData1_Altitude,feet) 1000 / int 10 % (&gt;L:AltiM_Feet_Thousands,feet)

<!-- Altitude Convert TenThousands -->
    (L:CORE2_AirData1_Altitude,feet) 10000 / int 10 % (&gt;L:AltiM_Feet_TenThousands,feet)


Replace (L:CORE2_AirData1_Altitude,feet) with (A:INDICATED ALTITUDE,feet).

I use (A:INDICATED ALTITUDE,feet)
 
In my altimeter i use:

XML:
<!-- Altitude Convert Tenth -->
    (L:CORE2_AirData1_Altitude,feet) 100 % (&gt;L:AltiM_Feet_Tenths,feet)

<!-- Altitude Convert Hundreds -->
    (L:CORE2_AirData1_Altitude,feet) 1000 % 100 / int (&gt;L:AltiM_Feet_Hundreds,feet)

<!-- Altitude Convert Thousands -->
    (L:CORE2_AirData1_Altitude,feet) 1000 / int 10 % (&gt;L:AltiM_Feet_Thousands,feet)

<!-- Altitude Convert TenThousands -->
    (L:CORE2_AirData1_Altitude,feet) 10000 / int 10 % (&gt;L:AltiM_Feet_TenThousands,feet)


Replace (L:CORE2_AirData1_Altitude,feet) with (A:INDICATED ALTITUDE,feet).

I use (A:INDICATED ALTITUDE,feet)
ok, makes sense!! will do that
 
Back
Top