Jump to content

Recommended Posts

Guest gert1966

Is there anyone who worked out a speed trend indicator in xml? Still coding on my Fokker PFD, but i really haven't got a clue how to create this one ( sadly math is not my strong point ;-) ) regards Gert Polkerman

Share this post


Link to post
Share on other sites
Guest The ATP Experience

My best untested guess would beIn FS9 XML...(L:switch to turn on and off_If Req'd,bool) 1 == (L:Lock out variable,bool) 0 == &&if{ (P:Absolute Time,seconds) 0.20 + (>L:trend_timer,seconds)(A:indicated airspeed, knots) (>L:speed sample1,number)1 (>L:Lock out variable,bool) }__________________________________________________________________(L:Lock out variable,bool) 1 == (L:trend_timer,seconds) (P:Absolute Time,seconds) > && if{ (A:indicated airspeed, knots) (>L:speed sample2,number)0 (>L:Lock out variable,bool) }__________________________________________________________________(Put any variables you want to deactivate the code here...like pitot heat blockage, failures, or even if the indicator is inactive below certain speeds or altitudes) if{ (L:speed sample1,number) (L:speed sample2,number) + 5 * (>L:trend value,number) }___________________________________________________________________in display gauge be sure to add a visible tag: (L:trend_timer,seconds) 0 !=So it should work like this:Check switch on and Lock out 0...if so...if{current time in seconds + 0.20 seconds = trend timer Current speed number sent to Speed sample1Set lock out variable to 1 }___________________________________________________________________Check if lock out is 1...which can only be done by the previous line...and trend timer is now 0.20 seconds in the future...if so...if{Send current speed to speed sample2 and set lock out back to 0 to restart cycle }____________________________________________________________________deactivation codes...if none found...if{ speed sample1 + speed sample2 X 5 = rate of change per second...Send the results to (L:Trend_Value, number) this is the shift on the speed tape.multiply the 5 by the number of seconds in the future you want the guage the show...for example to show the trend in ten seconds would be X 50. This is the simplest calculation of how many knots of change is expected. There are much more complex math solutions but I don't understand them myself.The basic idea here is if you are increasing airspeed by 0.20 knots per sample that is 1 knots per second...so 0.20 X 5 would render the prediction 1 knots faster 1 second from now. Likewise, 0.20 X 50 would render the prediction 10 knots faster 10 seconds from now.Hope that helps. I'm glad you asked the question because I am making a similar gauge and this post forced me to think it out in a simple way!Thanks

Share this post


Link to post
Share on other sites

Hello Try (L:Sel_1,number) 9 < if{ (L:Sel_1,number) ++ (>L:Sel_1,number) } els{ 0 (>L:Sel_1,number) }(L:Sel_1,number) 1 == if{ (A:Airspeed select indicated or true, knots) (>L:Sel_2,number) } (L:Sel_1,number) 9 == if{ (A:Airspeed select indicated or true, knots) (>L:Sel_3,number) } (L:Sel_1,number) 0 == if{ (L:Sel_3,number) (L:Sel_2,number) - 10 * (>L:SpeedTrend,number) }


Paul EGLD

Share this post


Link to post
Share on other sites

Here is another one, based on a 737 "bracket type" trend indicator with samples every 0.1 second computed for a 10 second trend. It was done for FS2002 so some things would have to be changed for your gauge, size, axis, ImageSizes=" " etc...(P:Local Time, seconds) 0.2 % 10 * int 0 == if{ (A:Airspeed indicated, knot) (>G:Var1) }(P:Local Time, seconds) 0.2 % 10 * int 1 == if{ (A:Airspeed indicated, knot) s1 (G:Var1) - 0.1 / 10 * l1 + (>G:Var3) }(G:Var3) (A:Airspeed indicated, knot) >(A:Airspeed indicated, knot) 45 < if{ 0 } els{ (G:Var3) (A:Airspeed indicated, knot) - }(G:Var3) (A:Airspeed indicated, knot) <(A:Airspeed indicated, knot) 45 < if{ 0 } els{ (G:Var3) (A:Airspeed indicated, knot) - } Regards,Roman


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites
Guest gert1966

Guys, Lots of thanx for showing the way, I will with your permission ofcourse use the examples to make it work in my fokker PFD. now..... going to work !!! regards Gert Polkerman

Share this post


Link to post
Share on other sites
Guest The ATP Experience

At what rate is that clocking? Is that 3 times in one pass?I like short code lol

Share this post


Link to post
Share on other sites

I've "quoted" and "edited" Roman's original post to recover the XML script that's been "hidden" by the new forum software, and remove some extra "bits" that somehow snuck into the XML script... :(

Here is another one, based on a 737 "bracket type" trend indicator with samples every 0.1 second computed for a 10 second trend. It was done for FS2002 so some things would have to be changed for your gauge, size, axis, ImageSizes=" " etc...Regards,Roman
<Element>  <Select>	<Value>	  (P:Local Time, seconds) 0.2 % 10 * int 0 == if{ (A:Airspeed indicated, knot) (>G:Var1) }	</Value>  </Select></Element><Element>  <Select>	<Value>	  (P:Local Time, seconds) 0.2 % 10 * int 1 == if{ (A:Airspeed indicated, knot) s1 (G:Var1) - 0.1 / 10 * l1 + (>G:Var3) }	</Value>  </Select></Element><Element>  <Position X="0" Y="0"/>  <Visible>	(G:Var3) (A:Airspeed indicated, knot) >  </Visible>  <MaskImage Name="EADI_TREND_UP_MASK.bmp" Bright="Yes">	<Axis X="43" Y="89.5"/>  </MaskImage>  <Image Name="EADI_TREND_UP.bmp" Bright="Yes">	<Nonlinearity>	  <Item Value="2" X="5" Y="0"/>	  <Item Value="50" X="5" Y="90"/>	</Nonlinearity>  </Image>  <Shift>	<Value Minimum="2" Maximum="50">	  (A:Airspeed indicated, knot) 45 < if{ 0 } els{ (G:Var3) (A:Airspeed indicated, knot) - }	</Value>	<Delay PixelsPerSecond="10"/>  </Shift></Element><Element>  <Position X="0" Y="0"/>  <Visible>	(G:Var3) (A:Airspeed indicated, knot) <   </Visible>  <MaskImage Name="EADI_TREND_DN_MASK.bmp" Bright="Yes">	<Axis X="43" Y="89.5"/>  </MaskImage>  <Image Name="EADI_TREND_DN.bmp" Bright="Yes">	<Nonlinearity>	  <Item Value="2" X="5" Y="90"/>	  <Item Value="-50" X="5" Y="0"/>	</Nonlinearity>  </Image>  <Shift>	<Value Minimum="-50" Maximum="2">	  (A:Airspeed indicated, knot) 45 < if{ 0 } els{ (G:Var3) (A:Airspeed indicated, knot) - }	</Value>	<Delay PixelsPerSecond="10"/>  </Shift></Element>


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...