February 20, 200620 yr Author WOW, you are the Macro King Tom. Many thanks for the code. I'll run off now and give this a try. Many, many thanks for your help with this.cheers for now,nick
February 21, 200620 yr Author Hi Tom, having great fun with this.Now, L:Variables are interactive between different gauges. Is this the same with macros. Can you set up a macro in one gauge, and then use the @macro name in another?I'm going through your code at the moment. You say it filters out those ranges that are zero. I'm attempting to find out how it does this. This will hopefully give me an understanding how I can then filter out aircraft that are more than plus or minus 9900 feet away from my aircraft, that is, their relative altitude to my aircraft is greater than plus or minus 9900 feet. Should keep me off the streets for a while.cheers,nick
February 21, 200620 yr ""Hi Tom, having great fun with this.""Hey Nick, I plenty understand you cause I HAD great fun coding the stuff!!:-)""Can you set up a macro in onegauge, and then use the @macro name in another?""Unfortunately no. But you can copy and paste the code, and that's a great advantage per se if you see it optimistically.Remember that macros are literal replacement of code; also parameters passed to macros replace their corresponding @n tags literally. ""You say it filters out those ranges that are zero. I'm attempting to find out how it does this.""Well, there is a bit of cheating here. If you take a look at this macro: d 0 == if{ p 9999 }in fact what the code does is assign 9999 to those lvars (or "s" positions) that are zero. All these will be "pushed" to the last positions. It's simpler and faster than other alternatives that I evaluated. What you have to do is, in case you find a "Lvar_nmiles" in a position lower than 08 that reads 9999, just discard it and its related ones. I forgot to mention this, sorry."This will hopefully give me an understanding howI can then filter out aircraft that are more than plus orminus 9900 feet away from my aircraft, that is, theirrelative altitude to my aircraft is greater than plus orminus 9900 feet"Once you understand how the code manages the interaction between stack variables and operators inside the macros, you'll find very easy to create any kind of filtering conditions between the set of variables. Take your time, I guess that's part of the fun :-)Let me know of your progress.Regards,Tom
February 21, 200620 yr Author Thank you Tom, you are very helpful. Now back to some headscratching.cheers for now,nick
Create an account or sign in to comment