Sign in to follow this  
Guest bartels

Some rather embarassing XML gauge questions

Recommended Posts

I'm about to start producing some gauges for some pioneer/WW1 era aircraft that I'm embarking on having got at least some of the exterior done. Most of these gauges are pretty simple affairs, I'm reasonably familiar with Photoshop and I understand XML reasonably well so, no problem...I thought...This is the first gauge I'm aiming to get done just to make sure I understand the whole process. I'm quite happy (having looked at the Cessna Grand Caravan altimeter) with getting it linked to meters, positioning and rotating the needle (including getting it going backwards as required) here it is in Photoshop at the rest position:http://www.warillustrated.co.uk/temp/aus_alt01.jpgNow I have three problems. First of all I can't figure out how to calibrate it. I can get it moving slower by dividing the altitude value, but currently I'm doing this in a rather hit and miss manner - presumably there's a way of calculating it precisely? Secondly I'd like it to go past the highest reading (6km) but slow down rapidly, presumably I can do this using the non-linear entries, but I don't understand how these relate to what's going on in the gauge. Finally you might be able to see some pale green bits on the numerals and needle - I'd like these to glow, or at least be a bit brighter, at night - is this possible with gauges? (I just spotted a post where this is mentioned so I'm hoping that it is)I'm hoping to get a wide range of instruments done, and probably released as a gauge set (for free of course) before I continue work on the planes. So please take pity on me!Have funFinnPS This is one of the planes I'm working on (no textures):http://www.warillustrated.co.uk/temp/forbill02.jpg

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

1st very nice job on the guage 2nd great job on the AC third sorryI've done some guages for Fly but not for F.S.(at least not yet). Dan

Share this post


Link to post
Share on other sites

The calibrating should be relative easy, since the XML gauges are already capable of some conversions, so altimeters in kilometer should use something like this:<Value>(A:Indicated Altitude,meters) 10000 /</Value>nonlinearities are relative simple in their structure: <Nonlinearity> <Item Value="10" X="xx" Y="yyy" /> <Item Value="6" X="xx" Y="yy" /> <Item Value="5" X="xx" Y="yy" /> <Item Value="4" X="xx" Y="yy" /> <Item Value="3" X="xx" Y="yy" /> <Item Value="2" X="xx" Y="yy" /> <Item Value="1" X="xx" Y="yy" /> <Item Value="0" X="xx" Y="yy" /> </Nonlinearity>For the X= and Y= values insert the x and y coordinates of the related ticmarks on the background bitmap. Note that for a counter-clockwise needle the entries are sorted backwards (or you might say the X= a dY= values are still sorted clockwise, resulting in Item Values= sorted backwards).For glowing dots make a bitmaps almost allover black (RGB(0,0,0)) except for the dots and place it between background and needle bitmap with additional Bright="Yes" entry in the <Image Name="... line.Arne Bartels

Share this post


Link to post
Share on other sites

Ah, it's starting to come together here. I think I follow the bright part at least thanks to you and the answer in the other FrBill's thread. I think the non-linearity makes sense too, but I'll have to give it a go to see if I understand. Which just leaves the calibration...What I had previously in my rotation value section was as follows:(A:Indicated Altitude,meters) -1000 /Which made the needle go slowly to the left, very roughly as desired. However, what I want it to do is travel about 330 degrees in 6km (ie 55 degrees per km returned by the value). I don't see how the angular motion I want is linked to the value, or am I missing something really obvious? I think I understand how to start the needle where I want it - important as most early gauges where mounted so that the typical value in flight was at the top) - but not how to calculate how fast it will turn.Thanks for the help it's proving extremely valuable!Have funFinnEdit: Actually - it suddenly struck me, is using the non-linearity co-ordinates at values 0, 6 and 7 all I need to do?

Share this post


Link to post
Share on other sites

FinnN, All the examples look good... One question.. Can the plane fly higher than 6000 meters ??? ( I donot think so but could be wrong ) >>Which made the needle go slowly to the left, very roughly as >>desired. However, what I want it to do is travel about 330 degrees >>in 6km (ie 55 degrees per km returned by the value). I don't see >>how the angular motion I want is linked to the value, or am I >>missing something really obvious? (A:Indicated Altitude,meters)The Delay DegreesPerSecond will give the needle a smooth movement.. ( may have to be ajusted to taste :-lol ) ... The calibration all lies in the nonlinearity table... When you place the back round bitmap you should have an tag placed at the center of needle rotation. On the needle bitmap have an flag placed at the tip of the needle.. The X,Y coordinates for nonlinearity wll be those on the main bitmap corresponding to the location on the needle giving you the desired calibration... With the and tags all values between each thousand meters are automatically calculated by the gauge system and rotated as such. >>I think I understand how to start the needle where I want it - >>important as most early gauges where mounted so that the typical >>value in flight was at the top) - but not how to calculate how >>fast it will turn.Rotate the backround bitmap just the way you want it, then make the coordinates for each value in the nonlinearity table... The Delay DegreesPerSecond can help in the speed at which the needle turns.Regards,RomanProject 737-400

Share this post


Link to post
Share on other sites

>Actually - it suddenly struck me, is using the non-linearity >co-ordinates at values 0, 6 and 7 all I need to do? Yes this is enough. An approbiate non-linearity table is everything you need. No further calculation are necessary, since these are made internally. Back to the calibration factor: any <Rotation> statement uses radians not degrees, so the possible values are 0 to 2*pi and not 0 to 360

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