Jump to content
Sign in to follow this  
Guest Skymed

GPS Small View

Recommended Posts

Guest Skymed

ANy thoughts on why this does not work?C:fs9gpsC:fs9gps175 (@g:map_ZoomFactor) 1852.0 * (A:GPS POSITION LAT, Radians)(A:GPS POSITION LON, Radians)(A:GPS GROUND TRUE TRACK, Radians) 1 1 0 0 0 0 0 0 0x5 0x5 0x7 0x7 0x1F 0x1F 0x1F 0x1F 0x4F 0x4F 0x4F 0x4F 0x4F 0x4F 0x4F 0x4F 0x4F 0x4F 24 (@g:map_ZoomStep) case0xE 0xF (@c:FlightPlanIsActiveApproach)?Steve

Share this post


Link to post
Share on other sites

Steve,I altered:(@g:map_ZoomFactor) 1852.0 * into20 1852.0 * And it works ok.May be something to do with your "Zoom Var"Make a custom L: one; i did too.Hope it helps, Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Simple... you didn't include the macro code to calculate the @g:map_ZoomFactor...As has been written already, either substitute a constant for @g:map_ZoomFactor or a custom L:variable... ;)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest Skymed

BillRoger that, and thanks. Just building a new zoom button now.Steve

Share this post


Link to post
Share on other sites

Hi,I tried adding the zoom macro's but that didn't work.There is that mysterious (for me):..... @1 caseI use custom L:Var's.Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

>Hi,>>I tried adding the zoom macro's but that didn't work.>There is that mysterious (for me):>>..... @1 caseThat is a case of "nested Macros" :) They are convenient, but make unraveling the logic more difficult than sorting a bowl of cooked spaghetti!2000 1500 1000 500 350 200 150 100 50 35 20 15 10 5 3.5 2.0 1.5 1.0 0.576037 0.329164 0.246873 0.164582 0.082290 0 24 @1 case@1 0.55 * sp1 1 sp0 :1 @CalculateZoomFactor(l0) 1852 * l1 < if{ l0 ++ sp0 g1 } l0The first Macro is an indexed list of "zoom constants." The "24" just before the @1 is the max index value (there are 24 items in the list).The "FitToZoom" (@1) Macro calculates the needed index value, then looks in the "CalculateZoomFactor" (@CalculateZoomFactor) to fetch the Zoom multiplier constant.It's no coincidence that those values represent the GPS map scale: 2000nm, 1500nm... all the way down to 0.082290nm (500')... ;)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Fr Bill,I know, the ...case.... isn't the problem, but the @1.No idea how to use it and there are a lot of that @1, @2, @3 etc. in the gps code.Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Jan, Quite possibly there is a new variable "holder" I.E. s1 -> l1, sp1 -> l1, G:Vars, L:vars.... If you write to >@1 then you'll have that result in @1. Didn't test but there are no headers for a @1. So just assuming.. would like to test myself in time. Regards,Roman


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites

Roman,I think you're right.Also testing to find the logic.Reading %((@1))%!s or d etc gave only 0.But sure intriging stuff.Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

What if... A stack "pointer" Oh boy!!! That would be fun :-( . OR as Bill mentioned a part of nested , where the @# points to the nest,, again FUN !!! :-( Up a little late doing some "knowledge" searching for a friend of mine who NEEDS her computer again..It's all loaded up with ABI network, Hot search, Holistyc, VX2, Claria, back space, IML server... All Maleware !!! What a pain ! The "geeks to go" searches tell me to give up and reinstall. UGHH! Regards,Roman


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites
Guest Eugen

Hi,About the @1 isn't that the parameter that is sent to the macro ? Compare it it with a function , where several parameters could be sent in to the function.Calling the macro test@Test(1,2,3) @1 (>@c:IcaoSearchInitialIcao) @2 (>@c:IcaoSearchStartCursor) @3 (>@g:enteringInput)ie parameter 1 will be @1, parameter 2 will be @2 etc.Thats how I think it works but I am not sure//Eugen

Share this post


Link to post
Share on other sites

Hi,Works like you say.@1,@2, etc are the parameter's values passed to the macro.Ie: ...@Macro1((L:Var1,number),(L:Var2,number))Inside <"Macro1">@1 has the value of L:Var1, and @2 that of L:Var2You can use this values for calculations; assign them to other variables or even pass them as arguments to other macros.Tom

Share this post


Link to post
Share on other sites

Tom,I use them without knowing what happens.Can you give an example to test with, so that I can experiment a bit to get more knowledge?Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Jan,You might try:@1 10 + @SecondTemp(@2) -@1 10 +35 (>L:Temp1,celsius) 20 (>L:Temp2,celsius)@FirstTemp((L:Temp1,celsius),(L:Temp2,celsius)) (>L:TempTot,celsius)%Total Temp = %((L:TempTot,celsius))%!3d!%(L:TempTot,celsius) should read 15This is a fairly simple example of how to deal with nested macros. Sure you can go deeper, (I've done it), though you may reach a point where FS crashes (it happened to me also), and need to go back. That's the way programming works!:-)Tom

Share this post


Link to post
Share on other sites

he,That is just the reason why I stopped exploring the @1.The same happened also when converting GPS variables in custom L:Var's.Some worked ok, some crashed the sim.(Like (@g:popupMenu))Well, still a lot to discover.Thanks for the example.Btw. Your example works all rightChanging the positions of the @'s gave unpredictable results.Still an enigma.Jan"Beatus Ille Procul Negotiis"

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