Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

trig and geocalc question

Featured Replies

  • Moderator
Did the same again , appeared in the codebox window with element,select ,value etcbut not in thread after I hit OK button ?Karol
The 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

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>

The above instrument is returning only zeros.Any ideas or comments .Karol

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

No responses ?Has anyone tried to get Geocalc to work in a simple instrument ora test instrument ?Karol

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

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.