Jump to content
Sign in to follow this  
Guest Eugen

Yoke indicator

Recommended Posts

Guest Eugen

Hi,I trying to do an yoke indicator ie a cross in a "rectangle" showing the stick's position. I have looked in the a-vars file in Arnes Bartels tutorial and found the following vars.YOKE X INIDICATOR <--- I assume this is a spelling misstake?YOKE X POSITIONYOKE Y INDICATORYOKE Y POSITION My first question is what is the difference between indicator and position ?Secondly what is the unit? degrees, numbers or something else?Third how can it be put together, can I have both x and y in the value or must I make two elements? or Shift ? (A:YOKE X INDICATOR ?) (A:YOKE Y INDICATOR ?) I'll appreciate any help.BrgdsEugen

Share this post


Link to post
Share on other sites
Guest harry3

Some time ago, I've done a yoke for FS2002.I've added the source code of it. It should help you, as it's nearly the same gauge, just the graphics are different!As you can see, the unit is numbers. Numbers should always(!!!) work. Regards,Harri :-)Let's begin: (A:YOKE X INIDICATOR, numbers) (A:ELEVATOR POSITION, numbers) Yoke ©2002 by Harald Scheidl

Share this post


Link to post
Share on other sites
Guest bartels

I haven't experienced a difference in Yoke indication, Yoke position and the elevator/aileron indications and positions yet, but maybe it is for future use, who knows.It might be that YOKE X INIDICATOR is mispelled, but since it is misspelled by the Microsoft programmers we have to use it as it is. The A: variable names are hardcoded in one DLL, you might use sometimes shorter names, or capitals at word-beginning, but you have to use the names as stored in the xmlgau01.zip (a_vars.txt) or in Parameters.doc in the official SDK.Arne Bartels

Share this post


Link to post
Share on other sites
Guest Eugen

Thanks Guys for your help,Seems that MS has misspelled the YOKE X indicator. Lets do some coding and test it out:-)BrgdsEugen

Share this post


Link to post
Share on other sites
Guest Eugen

Hi again,I put it together however I run into some problems, cant 2 shift sentences follow each other? Each of them works fine but not both together. EugenPosition X="0" Y="0"/> Position X="0" Y="0"/> (A:YOKE X POSITION, numbers) (A:ELEVATOR POSITION, numbers)

Share this post


Link to post
Share on other sites
Guest Matthias Lieberecht

Hi All,>>It might be that YOKE X INIDICATOR is mispelled, but since it is misspelled by the Microsoft programmers:D I hope nobody there notes and corrects it. Otherwise Eugen and others have to programm their Yokes completely new when FS2004 came out ;-)Best RegardsMtthias

Share this post


Link to post
Share on other sites
Guest bartels

I think it works. I've done something like this some time ago, but I can't recall the details. All I know is that it made problems, but worked after some time. I'll try to find the code.Arne Bartels

Share this post


Link to post
Share on other sites
Guest bartels

I found only this one, it makes rotation for aileron and a X and Y movement for elevator, but from only one variable (it should make a bit of a perspective movement)<Gauge Name="Yoke" Version="1.0"> <Element> <Size X="350" Y="350" /> <Element> <Position X="50" Y="175"/> <Image Name="Yoke.bmp" ImageSizes="251,138"> <Axis X="126" Y="121"/> </Image> <Shift> <Value>(A:YOKE Y POSITION,part)</Value><!-- Scale describes the movement of the yoke in x and y direction, if pulled or pushed. "Simple" straight y-movement needs an Y and no X value. Slightly "pseudo perspective movement needs a small X value as below. Adjust to your taste--> <Scale X="5" Y="25"/> </Shift> <Rotate><!-- the multiplication with pi/2 gives a +-90� rotated yoke for full left-right --> <Value>(A:YOKE X POSITION,part) pi * 2 /</Value> </Rotate> </Element> </Element></Gauge>Arne Bartels

Share this post


Link to post
Share on other sites
Guest bartels

Ha! I got it modified at last. I'm still not sure, but I think the trick was to use "Scale" commands with only one axis each and no nonlinearities.Try this:<Gauge Name="Yoke" Version="1.0"> <Element> <Size X="350" Y="350" /> <Element> <Position X="50" Y="175"/> <Image Name="Yoke.bmp" ImageSizes="251,138"> <Axis X="126" Y="121"/> </Image> <Shift> <Value>(A:YOKE Y POSITION,part)</Value> <Scale Y="25"/> </Shift> <Shift> <Value>(A:YOKE X POSITION,part)</Value> <Scale X="25"/> </Shift> </Element> </Element></Gauge>Arne Bartels

Share this post


Link to post
Share on other sites
Guest Eugen

Hi Arne,Thanks I'll have a look at it tomorrow , been struggling with this pfd problem until now.Eugen

Share this post


Link to post
Share on other sites
Guest Eugen

Hi,I run into a new strange problem the cross moves as desired, but I can't position it. What ever value I put into the position it sticks to 0.0? Any idea what I can do ?BrgdsEugen Position X="0" Y="0"/> Position X="50" Y="60"/>Position X="50" Y="60"/>(A:YOKE Y POSITION,part)(A:YOKE X POSITION,part)

Share this post


Link to post
Share on other sites
Guest bartels

I didn't have time yet, but it looks as if there are a bit too much <Elements> in there.Arne Bartels

Share this post


Link to post
Share on other sites
Guest bartels

I can't say what was wrong actually, so I rebuilt from completely from scratch:<Gauge Name="Stick_Indicator" Version="1.0"> <Image Name="stickindicatorbckgr.bmp" ImageSizes="99,120,0,0"/> <Element> <Position X="50" Y="60"/> <Image Name="pfdcross.bmp" ImageSizes="22,22,0,0"> <Axis X="11" Y="11"/> </Image> <Shift> <Value>(A:YOKE Y POSITION,part)</Value> <Scale Y="25"/> </Shift> <Shift> <Value>(A:YOKE X POSITION,part)</Value> <Scale X="25"/> </Shift> </Element></Gauge>

Share this post


Link to post
Share on other sites
Guest Eugen

Hi, Arne!It worked like a charm :-) Many thanks !!Sch

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...