Sign in to follow this  
n4gix

sd2gau23.zip uploaded

Recommended Posts

New version of the long-running gauge creation tutorial. The file ID is 227318 when the sysops get round to releasing it. Yes, it does say version 23 - I wrote 21 and 22 but forgot to release them....-Dai

Share this post


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

Thanks, as usual you've done an invaluable service to the entire gauge design community by maintaining this document.Regarding the "odd behavior" of the ADF, VOR1_BEARING_DEGREES and VOR2_BEARING_DEGREES tokens, if I recall correctly that is because, according to the SDK they are actually returning "16-bit pseudo-degrees." However, the fact is that the return is actually an offset to determine the relative bearing from the plane's current position and is based on "16-bit pseudo-degrees," which is a rather major difference from the simple note in the SDK!See here for more details and examples of how to convert those tokens for a digital display as well:http://forums.avsim.net/dcboard.php?az=sho...ing_type=searchAs I said in my original post of that thread:"Note to self: Next time you're in Redmond, remember to slap whoever thought "16 bit pseudodegrees" was a "good idea" silly!" :-bluegrab

Share this post


Link to post
Share on other sites

You should consider just putting this up on a wiki, and then letting it become a living document.

Share this post


Link to post
Share on other sites

Hey Bill,<<"Note to self: Next time you're in Redmond, remember to slap whoever thought "16 bit pseudodegrees" was a "good idea" silly!" >>Well, when pseudodegrees were created, it was because most computers at the time didn't have floating point processors in them (thanks Intel for that horid idea called the 486SX, just when we thought we could finally count on an FPU being there :-> ). We've gotten rid of them for the most part in the code, but there are still some file formats that use them and apparently some of the navigation related vars :->

Share this post


Link to post
Share on other sites

>Hey Bill,>><<>"Note to self: Next time you're in Redmond, remember to slap>whoever thought "16 bit pseudodegrees" was a "good idea">silly!" >>>>>Well, when pseudodegrees were created, it was because most>computers at the time didn't have floating point processors in>them (thanks Intel for that horid idea called the 486SX, just>when we thought we could finally count on an FPU being there>:-> ). We've gotten rid of them for the most part in the>code, but there are still some file formats that use them and>apparently some of the navigation related vars :->>>Um... I believe the first set of code was written for the 6502 family of procesors... and floating point wasn't even considered a computer concept on 8bit. ;) Then it was ported to the 8088 for the PC.Let's give Bruce Artwick his due... he accomplished something most experts at the time said was impossible.

Share this post


Link to post
Share on other sites

Hi BillI'll add that into the next version.... actually, update 24 is already started! I spent a few too many hours experimenting to find which macros will successfully accept an alpha channel and then wrote a 'how-to' as a new section. In general (and I guess I'm looking for input here):-1. MAKE_STATIC and MAKE_ICON present no problems.2. MAKE_NEEDLE and MAKE_SPRITE have limited success - much seems to depend on how you define the alpha mask i.e. the number of levels of grey.3. MAKE_SLIDER: I went to bed at this point.... but I suspect it will be the same as for a needle.In summary, FS seems to have problems with a moving alpha channel but then again, it could just be my (by now) woefully underpowered PC. I'm still testing with FS9 on an AMD Semperon 2800, 1.5Gb RAM and a GeForce 7600 256Mb video card. FSX produces one of the most wonderful slideshows I've ever seen....And you really don't want to know how out-of-date my internet PC is!!! :)-Dai

Share this post


Link to post
Share on other sites

Hi PatrickThe only problem I can see with that idea is that I'm trying to keep it aimed down at a certain level of gauge programmer (beginner-level) and an open Wiki might get away from that. Everything I know about gauge programming is not in the document and it's not because I'm trying to hide 'proprietory' information, just that I consider it to be above the level of my target audience. OTOH, there is stuff I know just about absolutely zero about (e.g. XML gauges and GDI drawing) that I'd like to find out about and so I am willing to be argued into making it an open document.Is Bill not running a Wiki somewhere that covers the more advanced stuff? I thought I saw it but of course, as soon as you come to search you can never find the right search term.-Dai

Share this post


Link to post
Share on other sites

>Is Bill not running a Wiki somewhere that covers the more>advanced stuff? I thought I saw it but of course, as soon as>you come to search you can never find the right search term.No Wiki yet... Flightsim.com management was planning for a Wiki, but it seems to have disappeared for the moment. Of course, some points I made to the fellow in charge (Dan) might have prompted that result...=============================The idea of a Wiki is good, but it seems to me that re-inventing the wheel isn't always the best thing. FS-Developer.com has had a Wiki up for quite awhile now, with categories for Aircraft Design, Scenery Design, Mission Design, SimConnect, File Formats and Manuals.http://fsdeveloper.agerrius.nl/wiki/index....title=Main_PageOne of the banes of all simmers and developers is that - with the proliferation of FS websites, forums and news groups - we are in fact suffering from self-induced "Information Dilution," a phenomenon that's unique to the Internet Age.In fact, that's the entire reason sites such as Google.com, Ask.com et alia exist! They are meant to supply a "master index to all information available on the World Wide Wasteland (er, Web!), but......due to the plethora of such "search engine sites," they actually contribute more to the problem than they solve.Consider that currently I invest at a minimum four hours each day reading/replying to EIGHT different websites, a total of FIFTY-SIX forums, and THIRTY-EIGHT internet news groups (some of which are admittedly FSDN* and therefore closed to the general public), and that only includes a very small fraction of all the FS websites and other forums, ng's et cetera...So, my suggestion would be to maintain the Flightsim.com Wiki's unique Categories, but for those of Aircraft, Scenery, Mission, SimConnect simply link directly to the same categories at the fsdeveloper.com Wiki...* FSDN: Flightsim Developers Network, sponsored by MS/ACES==========================

Share this post


Link to post
Share on other sites

>Well, when pseudodegrees were created, it was because most>computers at the time didn't have floating point processors in>them (thanks Intel for that horid idea called the 486SX, just>when we thought we could finally count on an FPU being there>:-> ). We've gotten rid of them for the most part in the>code, but there are still some file formats that use them and>apparently some of the navigation related vars :->Thanks for the comment, Tim. I was - of course - speaking entirely tongue-firmly-in-cheek, but still......after all these years shouldn't some attention be paid to throughly rationalizing the panel "system?" ;)Quite honestly I've begun retrieving fs token vars from XML in most of my C gauge projects. It's just as fast, and best of all I can actually get rational, usable and properly scalable returns from them! :-lol

Share this post


Link to post
Share on other sites

>Yes, it does say version 23 - I wrote 21 and 22 but forgot to>release them....You did? Funny that my previous downloaded "version" had this in the readme.txt file:FS2K+ and CFS+ Gauge Creation Tutorial Rev.22Not for non-programmers but can be used bynon-C programmers. FSX SP1 gauges.h filecorrected and included. XML read/write information updated. Some other minorupdates and clarifications.FOR PROGRAMMING C-LANGUAGE GAUGES ONLY.Dai Griffiths, Dragonflight Design.It is still hosted in the Flightsim.com Library... ;)Perhaps you simply forgot that you released Rev.22 :-hah

Share this post


Link to post
Share on other sites

>>Perhaps you simply forgot that you released Rev.22>:-hah Urrr... no, it's a bit simpler than that (puts on stupid hat). I did a search on sd*.* in the file library and it popped up sd2gau20.zip. As I normally put the previous version as a file to be deprecated (deleted) in the upload infromation, I assumed that sd2gau20 was in fact the current release....Bill, how on earth do you find that much time each day to go chasing forums?! I find that if I have to spend more than a few minutes each day answering emails and posts, I actually start to resent it quite badly!-Dai

Share this post


Link to post
Share on other sites

>Bill, how on earth do you find that much time each day to go>chasing forums?! I find that if I have to spend more than a>few minutes each day answering emails and posts, I actually>start to resent it quite badly!I rationalize it by averaging out my "daily earnings" and consider it part of my job description to invest the required time as a form of "continuing education." ;)Since flightsim development is my "full-time" (read: only job!), this is entirely reasonable... ;)BTW, the Wiki is indeed up and running. Would you be at all interested in migrating your "book" over to it as a sub-topic withing the "Panels and Gauges" entry?Right now, it's a complete Tabula Rasa: http://forums.flightsim.com/fswiki

Share this post


Link to post
Share on other sites

Hi BillI would.... but this jumped out and bit me:"including distributing it for free or profit".I guess I'm not the only one who would baulk at the thought that someone else could make a direct profit from my freely-given work. I accept that in my case you could make a good argument that a lot of people may have made a considerable profit from using the information in the gauhelp and sd2-series documents, but that's not quite the same as agreeing to allow the document itself to be sold.Get rid of the words 'or profit' and I'm your man.Now, what's the betting that someone else will object to the words 'for free'? :-wink2 -Dai

Share this post


Link to post
Share on other sites

That's a really odd wiki agreement. LOLWiki is rarely set up as 'owned' by any group/organization/etc... but this one comes rather close.

Share this post


Link to post
Share on other sites

>Get rid of the words 'or profit' and I'm your man.>>Now, what's the betting that someone else will object to the>words 'for free'? :-wink2 Hmmm... I confess I hadn't ever read the "Terms and Conditions" there...In any case, it appears that "they" (meaning flightsim.com management) are restricting data input to the Wiki only to a limited few individuals whom "they" deem "experts..." In that case then, might I propose that the Wiki at FSDeveloper.com as an alternate? As it is "open to everyone" and is "owned" by well-known "freeware" developers (Arno Gerretsen and Nick), it seems to embrace the spirit of the entire Wiki concept... ;)http://www.fsdeveloper.com/wiki/index.php?title=Main_PageIn fact, there's already a Category of "Manuals" which would be a likely good place for it to be created...

Share this post


Link to post
Share on other sites

>>In any case, it appears that "they" (meaning flightsim.com>management) are restricting data input to the Wiki only to a>limited few individuals whom "they" deem "experts..." >Would explain why it's empty... ;)

Share this post


Link to post
Share on other sites

>>>>In any case, it appears that "they" (meaning flightsim.com>>management) are restricting data input to the Wiki only to a>>limited few individuals whom "they" deem "experts..." >>>>Would explain why it's empty... ;)Well, to be entirely fair, it's not even "announced" yet and is still very, very new. There's a lot of entries in the FAQ sections though, but by limiting the data entry to only an "approved selected few" it will take a very long time for it to become truly useful...I will be taking all the "sticky posts" from my Panel & Gauges forum and moving them to the FS Wiki as I find time, to reduce the "clutter" that they currently create...I also received a reply to an inquiry to pass along to Dai:"If his work is to only be used on the wiki and not for profitor any where else we will be happy to abide by any of those restrictions he would like to put on his work."It would appear that they are willing to be flexible.

Share this post


Link to post
Share on other sites

Hi BillI'm quite happy to post it to both wikis, but being a complate ignoramus where wikis are concerned, how on earth would I get 108 pages into one article, plus putting the sample files alongside?Your comment on flightsim.com about it being a 'handbook' made me smile. In an idle moment of curiosity I just ran a wordcount and had the smile almost wiped off my face - 36,726 - and that's after the recent purge of out-of-date materials.Prompted by Patrick's reply, I'm beginning to think that some of the more advanced stuff wouldn't go amiss either. One topic I've been humming and hawing mentally about for quite a while is programming DirectSound. It actually isn't that difficult once you have a working set of templates in place.-Dai

Share this post


Link to post
Share on other sites

>Hi Bill>>I'm quite happy to post it to both wikis, but being a complate>ignoramus where wikis are concerned, how on earth would I get>108 pages into one article, plus putting the sample files>alongside?Well, I'm practically an ignoramous myself WRT to Wiki. I'm supposing that one would simply do a lot of cut-and-paste to get it from the original source file to the Wiki editor, then embed links to the relevant screenshots where appropriate.I'd suggest that the Wiki at FSDeveloper.com might be a good place to begin with, simply because registration will allow you to begin at your convenience, experiment as needed. In fact, there are any number of folks who'd be delighted to provide assistance WRT to formatting, etc.Once it was done there, it I believe that there's a method whereby the contents can be "captured" to an XML format, which may then be "imported" into another Wiki with all content preserved.>Your comment on flightsim.com about it being a 'handbook' made>me smile.It doesn't quite qualify for the title "Magnum Opus," but it's a close contender... ;)On reflection though, I can see one advantage of the FlightSim.com arrangement. By limiting the ability to "edit" they've also virtually eliminated the possibility of anyone "defacing" the document...

Share this post


Link to post
Share on other sites

>Prompted by Patrick's reply, I'm beginning to think that some>of the more advanced stuff wouldn't go amiss either. Putting it on a public Wiki will mean you give up control over it, and this may be a big emotional step for you. You would have to remember that it will then be edited by the community in ways that you may initially not like. However, it means that it is more likely to self-update and get corrected as people using it discover new things and become a living document.>One topic I've been humming and hawing mentally about for quite a>while is programming DirectSound. It actually isn't that difficult>once you have a working set of templates in place.Programming to DirectSound is out, and XAct is in, and allows you much much more control.

Share this post


Link to post
Share on other sites

XAct... don't think that's part of Win XP. ;)Well... it is... but it's Xbox... and gives me the heebie jeebies.

Share this post


Link to post
Share on other sites

@Ed:It wasn't but it is now.... [sigh]."XACT is an audio programming library and engine released by Microsoft as part of the DirectX SDK. It is a high-level audio library for authoring/playing audio that is written to use Xaudio on the Xbox, DirectSound on Windows XP, and the new audio stack on Windows Vista. Xaudio is an Xbox-only API designed for optimal digital signal processing. XACT also includes X3DAudio, a spatialization helper library available on both platforms, Windows and the Xbox. XACT was originally developed for Xbox development, and was later modified to work for Microsoft Windows development as well." - WikipediaGuess I need to go-find another SDK....@PatrickI appreciate that I would lose control over it but in some ways that would not be such a bad thing; as I have said, I know sod-all about GDI programming for example. Surely that is a topic that needs adding? Despite my comment about XML earlier in the thread, that is something that needs its own tutorial and should not be included in mine, simply because they are two different technologies.@Bill:Which just leaves the question: how do you attach files to an article? I can link to my own serverspace if I'm absolutely pushed, but I'd prefer not to.-Dai

Share this post


Link to post
Share on other sites

>@Bill:>>Which just leaves the question: how do you attach files to an>article? I can link to my own serverspace if I'm absolutely>pushed, but I'd prefer not to.Dai, rather than continue to abuse AVSIM's bandwidth, I've begun a new topic at FSDeveloper.com here:"Proposed C Gauge Development Manual"http://www.fsdeveloper.com/forum/showthread.php?t=7751I note that there's a mechanism for uploading images and linking them for display in an article, but didn't see an obvious method for making uploaded .zip files available......so I though I'd ask! ;)

Share this post


Link to post
Share on other sites

No fair!I can't register over there! :(Well, I did... but it's never sent me my confirmation email. :(

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