June 7, 201015 yr Moderator Did the same again , appeared in the codebox window with element,select ,value etcbut not in thread after I hit OK button ?KarolThe command is {code} not {codebox} (replace curly braces with square brackets)...Alternatively, simply highlight all your script and click the last icon on the toolbar of this editor... Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
June 8, 201015 yr Geocalc test instrument .Karol <Gauge Name="GeoTEST" Version="1.0"><Image Name="zDATA_SCRN.bmp"/><Update Hidden="No"/> <Macro Name="c">C:fs9gps</Macro><Macro Name="g">C:fs9gps</Macro> <Element> <Element> <Select> <Value> 30.00(>@c:GeoCalcLatitude1, degrees) -50.00(>@c:GeoCalcLongitude1, degrees) 0(>@c:GeoCalcAzimuth1, degrees) 20(>@c:GeoCalcLength, NMiles) (@c:GeoCalcExtrapolationLatitude, degrees)(>L:Lat1,degrees) (@c:GeoCalcExtrapolationLongitude, degrees)(>L:Lon1,degrees) </Value> </Select> </Element> <Element> <Position X="9" Y="8" /> <FormattedText X="80" Y="130" Font="Tahoma" FontSize="13" LineSpacing="16" Adjust="Left" Color="#349F34" Bright="Yes"> <String> %Lat1%((L:Lat1,degrees))%!3.4f!\n %Lon1%((L:Lon1,degrees))%!3.4f! </String> </FormattedText> </Element> </Element></Gauge>
June 8, 201015 yr I conducted a test by removing the Geocalc code contained in the select /element section.The returns were again or still zeros .It would appear that the Geocalc is not being initialized , but why ?Karol
June 10, 201015 yr No responses ?Has anyone tried to get Geocalc to work in a simple instrument ora test instrument ?Karol
June 11, 201015 yr Hi,It certainly does!But your code seems to be a bit wrong.There must be a space between the number and command.Also you can put the code in the string when you use FormattedText, less code!So, try: <String>%( 30.00 (>@c:GeoCalcLatitude1, degrees) -50.00 (>@c:GeoCalcLongitude1, degrees) 0 (>@c:GeoCalcAzimuth1, degrees) 20 (>@c:GeoCalcLength, NMiles) (@c:GeoCalcExtrapolationLatitude, degrees) (>L:Lat1,degrees) (@c:GeoCalcExtrapolationLongitude, degrees) (>L:Lon1,degrees) ) %Lat1: %((L:Lat1,degrees))%!3.4f!\n%Lon1: %((L:Lon1,degrees))%!3.4f!</String> Added 2 spaces, but one is enough.Hope it helps,Jan Jan "Beatus ille qui procul negotiis..."
June 15, 201015 yr Thank you Jan , will try in 'String' .I got the following to work <Gauge Name="GeoTest" Version="1.0"><Image Name="zDATA_SCRN.bmp"/> <Update Frequency="18" /> <Macro Name="c">C:fs9gps</Macro><Macro Name="g">C:fs9gps</Macro> <Element> <Element>- <Select> <Value>(A:PLANE LATITUDE, degrees) (>@c:GeoCalcLatitude1,degrees) (A:PLANE LONGITUDE, degrees) (>@c:GeoCalcLongitude1,degrees) 0 (>@c:GeoCalcAzimuth1,degrees) 20 (>@c:GeoCalcLength,nmiles) (@c:GeoCalcExtrapolationLatitude,degrees) (>L:Lat1,degrees) (@c:GeoCalcExtrapolationLongitude,degrees) (>L:Lon1,degrees) </Value> </Select> </Element> <Element> <Position X="9" Y="8" /> <FormattedText X="140" Y="130" Font="Tahoma" FontSize="13" LineSpacing="16" Adjust="Left" Color="#349F34" Bright="Yes"> <String> %Lat1%((L:Lat1,degrees) d 0 >= s0 r abs d 3600 * 60 % r d 60 * 60 % flr r flr 'N' 'S' l0 ? )%!s!%!02.0f!% %!02.0f!%' %!02.0f!"%\n %Lon1%((L:Lon1,degrees) d 0 >= s0 r abs d 3600 * 60 % r d 60 * 60 % flr r flr 'E' 'W' l0 ? )%!s!%!03.0f!% %!02.0f!%' %!02.0f!%"% </String> </FormattedText> </Element> </Element> </Gauge> basically it returns Lat/Long 20 NM ahead .CheersKarol
Create an account or sign in to comment