Archived

This topic is now archived and is closed to further replies.

n4gix

xml rose and arc

Recommended Posts

Hallo,May be old stuff, but in my quest to get rid off all bitmaps, i found a way to show the numbers of the nd arc and rose and let them rotate the good way:Determine the position: x="..." y="..."Rotation point: Assign these values to all 12 elements.Compose the text: 0, 3, 6, 9, 12, ....etc.And let rotate according: (A: Plane heading degrees gyro, radians) /-/The point is to add between the value tags: pi 6 / a * - in which a is 0 - 11.So this is one element (of 12) for 60 degrees:6 (A: Plane heading degrees gyro, radians) pi 6 / 2 * - /-/Adding gives the possibility to mask the cifers beyond the nd display.Together with circle's, polyline's, text etc. you will get a nice nd.Jan"Procul Negotiis"http://forums.avsim.net/user_files/65098.jpg

Share this post


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

Very nice, Jan. I too am looking to eliminate as many bitmaps as possible and will probably end up doing something similar with my centered and decentered roses.I am building a miliraty aircraft and you should see the mess I have to use to do a proper pitch ladder. Since there's a 2000 pix max on images before they start going haywire, I have had to string together 4 separate images for rotation and translation. I'd love to use polys, but since all the negative pitch lines are dashed, it becomes impractical since each poly must be contained within a separate element making for a massive number of code lines.Do you know if there's a way to start and stop drawing polynines within the same element? i.e...Pseudo: X 0 y 0 X 50 y 0 (end line) X 100 y 0 (begin new line) X 150 y 0

Share this post


Link to post
Share on other sites

Hi,I have the same problem.So it is just a lot of copy and paste and adapt the x's and y's.Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites

Thanks for the suggestion. I've been playing around with the thought of using rotated text instead of a full rose on my EHSI, but never given it much thought- until now that is :)Something to be concerned with, perhaps. Have anyone done any speed comparison tests on graphics vs vector elements in xml? Also, text seem to screw up somewhat when trying different screen resolutions.

Share this post


Link to post
Share on other sites

Karl,As far as i can see, no difference in fps.Notice the amount of text in the gps compared with a few text elements and a piece of nudated gps, only the flightplanline.And i think it looks good in the mfd with the transparancy tric.May be not so good in a steam driven hsi.Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites

For a compass rose, I just use this one in my helicopter HUD directly from the GPS:(@g:currentPageNAV) @kNAVPageDflt ==(@g:setup_ColorTerrain) if{ 0x703030 } els{ 0xF0D0D0 }(@g:setup_ColorTerrain) if{ 0 } els{ 0x080808 }(A:GPS GROUND MAGNETIC TRACK, Radians)Modified as per this one:(L:Compass,enum) 1 == 0xFF69140x000000 (A:Plane heading degrees gyro, radians)The LVar is just a button I use to turn it on and off at pilots discretion.Steve

Share this post


Link to post
Share on other sites

I forgot to make a print of this before I headed home from work the other day, but decided to have a go on it anyway. I was able to enhance my compass rose (graphics) with textual numbers that rotates around the rose, but keeping horizontal at all times. Looked pretty neat. A better look at http://www.sandel.com/ for illustration.I was forced to use FormattedText with a pivot though.Speaking of FormattedText, has anyone found any logics to what is supported with the special character stuff, as found in the GPS. Such as kt or NM written in small character above oneanother in the same string etc?

Share this post


Link to post
Share on other sites

Hi,I used the "gpsrose" also, but i decided to change because of the poor refresh rate of the gps.Karl, how did you manage to keep the text horizontal?(example pl.);(btw. in the mfd i've seen text rotates)I try to avoid formattedtext as much as possible, don't know why.Jan"Procul Negotiis"http://forums.avsim.net/user_files/65524.jpg

Share this post


Link to post
Share on other sites

I've attached the element as an xml-file, it's not a complete gauge. Hope it works ok for you. The avionics check is temporary :)

Share this post


Link to post
Share on other sites

hey GuysTrying to use this stuff in my Helicopter HUD as part of a VOR/HSI, so I need really clear, high vis compass text and a complete rose in vector format.Do you guys have any completed vector roses/examples with rotating text I could look at?Steve

Share this post


Link to post
Share on other sites

The code for the rose:0(A:Plane heading degrees gyro, radians) pi 6 / 0 * - /-/3(A:Plane heading degrees gyro, radians) pi 6 / 1 * - /-/6(A:Plane heading degrees gyro, radians) pi 6 / 2 * - /-/9(A:Plane heading degrees gyro, radians) pi 6 / 3 * - /-/12(A:Plane heading degrees gyro, radians) pi 6 / 4 * - /-/15(A:Plane heading degrees gyro, radians) pi 6 / 5 * - /-/18(A:Plane heading degrees gyro, radians) pi 6 / 6 * - /-/21(A:Plane heading degrees gyro, radians) pi 6 / 7 * - /-/24(A:Plane heading degrees gyro, radians) pi 6 / 8 * - /-/27(A:Plane heading degrees gyro, radians) pi 6 / 9 * - /-/30(A:Plane heading degrees gyro, radians) pi 6 / 10 * - /-/33(A:Plane heading degrees gyro, radians) pi 6 / 11 * - /-/For the ARC on the out- and inside "Circle's" and for the pointers still a bitmap, of course using the "clip" command, rest is "vector".Same for the ROSE, without a "Circle".With a lot of work it could be possible to make the pointers as "Polyline", but the code would be enormous (72 line's!).See very bad pic (i use very small gauges) Hope it helps,Jan"Procul Negotiis"http://forums.avsim.net/user_files/67200.jpg

Share this post


Link to post
Share on other sites

Seem to recognize the graphics there Bill ;) If you have the time and skill, maybe you should consider the real Sandel, not this wannabe. There exist one already, but that is payware, and not sure if it works with FS9 - never tried it.There are also many many bugs in the old version, i.e. in "unslaved mode" (highly fake, but still) ADF needle is no corrected for drift, but the textual actually is... Should be the other way around. Also, in the real thing, centered deviation bars are not available in arc mode. I see the ILS reception is also "faked", by crossover on the glideslope even though ILS is determined over pure localizer. Not sure if may will understand that concept :) Probably buggy as well, not sure?I have fixed a lot of stuff in the xml version, maybe you want it for further investigations?

Share this post


Link to post
Share on other sites

>Seem to recognize the graphics there Bill ;) If you have the>time and skill, maybe you should consider the real Sandel, not>this wannabe. There exist one already, but that is payware,>and not sure if it works with FS9 - never tried it.Some of the graphics (such as the bezel) were 'borrowed' from your XML version until my graphics artist gets off his well-deserved laurels (Bob Hayes created the Citation X from Eaglesoft), and creates some new one's for me. This will be going into the Citation II SP/2 that's currently under development.The rose and arc are vectors, as is the text. I have the Sandel 3308 manual and am striving to implement as many of the real features as possible, following Ike Slack's excellent documentation has also been helpful. Ike has "gone to work" for RXP as a programmer, but is apparently still working on the FS9 version of his Sandel SN3308.I am planning to implement the navaid and flight track data as well, but will probably not implement the A-B memory, as the gauge is already approaching 2.2 MB in size! :) However, since I've finally got a handle on file I/O in C, I may well add that in, since I can read/write and swap data from disk now, and won't have to hold the info in a memory array."Auto Slew" is also being implemented... slowly!All the "course pointers" are functional in both Rose and Arc modes, except the GPS, which I've only showing while in GPS mode. I may go back and add that to the BRG select menu as well though, in keeping with the authentic Sandel SN3308's operational capability.>I have fixed a lot of stuff in the xml version, maybe you want>it for further investigations?I'm always open for inspiration! Sure, send it along. BTW, the earlier XML version won't work in FS9, as I'm sure you are aware, since the old "XML-Sound" tricks no longer work.http://forums.avsim.net/user_files/67379.jpghttp://forums.avsim.net/user_files/67380.jpg

Share this post


Link to post
Share on other sites

I have modifieds an ND, put the XML codes into the default FS9gps, customized the FS9gps-XML (means got rid of all the unwished features) and now I have got a nice nav display, which shows the flight path (if a flight plan is loaded), all the fixes, nav aids and airports.The 4 arcs are clipped static vector circles, the numbers on the outer arc and the little lines which mark the degrees are a rotating bitmap. Also all other elements - exept for the text strings - are bitmaps. The GS indication of the FS9gps I left there, but will modify it. The next step is to substitute the remaining bitmaps by vectors.The rose and the other parts which were elements of the ND rotate very smoothly but the refreshrate of the data, which come from the GPS, like moving map and the displayed flightpath, is very slow.Does anybody have an idea how to speed this up? Thanks for your helpMy appologies for the bad quality of the pic. :-)Wolfgang http://forums.avsim.net/user_files/67482.jpg

Share this post


Link to post
Share on other sites

Autoslew in xml would be possible by setting obs to "GPS WP DESIRED TRACK", once a waypoint is passed, and every now and then since it changes slightly along the way on long legs (great circle?).I've deliberately avoided using the GPS engine since it is hardcoded for slow update rates. Maybe accurate for typical GPS use, but an update tag/parameter would be very welcome if that sort of data were being used in a non-GPS gauge.All the faulty C421B gauges including the EHSI, was "fixed" to use only one graphics set, and exchanged afterburner events with new @PlayS macros, adding the actual macro to the top of the gauges. Using ultraedits regular expression, I changed 130+ gauges in a few clicks - it was amazing :) Some things had to be fixed manually though, but I think it was all done in a days "work". Having a lot more experience now, I'm considering doing the xml-EHSI from scratch, more faithful to the original features. I'm also considering using saved but nonused A:variables to store information (in flt-file), haven't dug deep enough into this yet though.Ike Slacks version, will it be freeware?

Share this post


Link to post
Share on other sites

>Autoslew in xml would be possible by setting obs to "GPS WP>DESIRED TRACK", once a waypoint is passed, and every now and>then since it changes slightly along the way on long legs>(great circle?).The same variable is available in C as well. The chief problem is that it isn't always 100% reliable when being used to update the GPS "pointer/CDI..." While the numeric display is 100% accurate, the calculate value for rotation isn't. Neither of these will return the correct value 100% of the time:GPS_WP_TRUE_REQ_HDG - PLANE_HEADING_DEGREES_GYRO GPS_WP_DESIRED_TRACK - PLANE_HEADING_DEGREES_GYRO>Ike Slacks version, will it be freeware?No, it will be payware under the Reality XP label, AFAIK at this time.

Share this post


Link to post
Share on other sites

Could you post an example of your FormattedText using pivot? I've been trying to create a compass rose whose text is displayed horizontally. I've tried various combinations of rotate, pivot, xaxis, xpivot. Nothing seems to work. Your help would be greatly appreciated. Thanks!

Share this post


Link to post
Share on other sites

Just an update for everyone....Ike Slack is a member of the Eaglesoft Development Group Team and we will be offering Ikes Sandel and other Coyote Avionics gauges as payware in our upcoming Avionics Catalog:-)

Share this post


Link to post
Share on other sites
Ressurrected and reposted for posterityThe code for the rose:
<Element>	<Text X="10" Y="7" Length="2" Font="Arial" Color="dkgray" Adjust="Center" VerticalAdjust="Center" Multiline="No">	<String>0</String>	<Axis X="5" Y="43"/>	</Text>	<Rotate>		<Value>(A:Plane heading degrees gyro, radians) pi 6 / 0 * - /-/</Value>	</Rotate></Element><Element>	<Text X="10" Y="7" Length="2" Font="Arial" Color="dkgray" Adjust="Center" VerticalAdjust="Center" Multiline="No">	<String>3</String>	<Axis X="5" Y="43"/>	</Text>	<Rotate>		<Value>(A:Plane heading degrees gyro, radians) pi 6 / 1 * - /-/</Value>	</Rotate></Element><Element>	<Text X="10" Y="7" Length="2" Font="Arial" Color="dkgray" Adjust="Center" VerticalAdjust="Center" Multiline="No">	<String>6</String>	<Axis X="5" Y="43"/>	</Text>	<Rotate>		<Value>(A:Plane heading degrees gyro, radians) pi 6 / 2 * - /-/</Value>	</Rotate></Element><Element>	<Text X="10" Y="7" Length="2" Font="Arial" Color="dkgray" Adjust="Center" VerticalAdjust="Center" Multiline="No">	<String>9</String>	<Axis X="5" Y="43"/>	</Text>	<Rotate>		<Value>(A:Plane heading degrees gyro, radians) pi 6 / 3 * - /-/</Value>	</Rotate></Element><Element>	<Text X="10" Y="7" Length="2" Font="Arial" Color="dkgray" Adjust="Center" VerticalAdjust="Center" Multiline="No">	<String>12</String>	<Axis X="5" Y="43"/>	</Text>	<Rotate>		<Value>(A:Plane heading degrees gyro, radians) pi 6 / 4 * - /-/</Value>	</Rotate></Element><Element>	<Text X="10" Y="7" Length="2" Font="Arial" Color="dkgray" Adjust="Center" VerticalAdjust="Center" Multiline="No">	<String>15</String>	<Axis X="5" Y="43"/>	</Text>	<Rotate>		<Value>(A:Plane heading degrees gyro, radians) pi 6 / 5 * - /-/</Value>	</Rotate></Element><Element>	<Text X="10" Y="7" Length="2" Font="Arial" Color="dkgray" Adjust="Center" VerticalAdjust="Center" Multiline="No">	<String>18</String>	<Axis X="5" Y="43"/>	</Text>	<Rotate>		<Value>(A:Plane heading degrees gyro, radians) pi 6 / 6 * - /-/</Value>	</Rotate></Element><Element>	<Text X="10" Y="7" Length="2" Font="Arial" Color="dkgray" Adjust="Center" VerticalAdjust="Center" Multiline="No">	<String>21</String>	<Axis X="5" Y="43"/>	</Text>	<Rotate>		<Value>(A:Plane heading degrees gyro, radians) pi 6 / 7 * - /-/</Value>	</Rotate></Element><Element>	<Text X="10" Y="7" Length="2" Font="Arial" Color="dkgray" Adjust="Center" VerticalAdjust="Center" Multiline="No">	<String>24</String>	<Axis X="5" Y="43"/>	</Text>	<Rotate>		<Value>(A:Plane heading degrees gyro, radians) pi 6 / 8 * - /-/</Value>	</Rotate></Element><Element>	<Text X="10" Y="7" Length="2" Font="Arial" Color="dkgray" Adjust="Center" VerticalAdjust="Center" Multiline="No">	<String>27</String>	<Axis X="5" Y="43"/>	</Text>	<Rotate>		<Value>(A:Plane heading degrees gyro, radians) pi 6 / 9 * - /-/</Value>	</Rotate></Element><Element>	<Text X="10" Y="7" Length="2" Font="Arial" Color="dkgray" Adjust="Center" VerticalAdjust="Center" Multiline="No">	<String>30</String>	<Axis X="5" Y="43"/>	</Text>	<Rotate>		<Value>(A:Plane heading degrees gyro, radians) pi 6 / 10 * - /-/</Value>	</Rotate></Element><Element>	<Text X="10" Y="7" Length="2" Font="Arial" Color="dkgray" Adjust="Center" VerticalAdjust="Center" Multiline="No">	<String>33</String>	<Axis X="5" Y="43"/>	</Text>	<Rotate>		<Value>(A:Plane heading degrees gyro, radians) pi 6 / 11 * - /-/</Value>	</Rotate></Element>

For the ARC on the out- and inside "Circle's" and for the pointers still a bitmap, of course using the "clip" command, rest is "vector".Same for the ROSE, without a "Circle".With a lot of work it could be possible to make the pointers as "Polyline", but the code would be enormous (72 line's!).

Share this post


Link to post
Share on other sites

Wow, I remember that one.Only, I think I'd want to precalulate EVERYTHING in there.For example: (A:Plane heading degrees gyro, radians) pi 6 / 0 * - /-/ :( Becomes: (A:Plane heading degrees gyro, radians) /-/ :( --Jon

Share this post


Link to post
Share on other sites