Sign in to follow this  
Bassy77

xml define area

Recommended Posts

I want to define an area in which an Element must be visbile

This Area is easy enough:

N31-W86             N31-W85

      -------------------------

      |                            | 

      |                            |

      |                            |

      |                            |

      |                            |

      |                            |

      -------------------------

N30-W86             N30-W85

With following Code:

         <Macro Name="POSLA">(A:Plane Latitude, degrees)</Macro>
	 <Macro Name="POSLO">(A:Plane Longitude, degrees)</Macro>
             <Element>
		<Visible>@POSLA 30 >= @POSLA 31 < &&</Visible>
	     <Element>
		<Visible>@POSLO -86 >= @POSLO -85 < &&</Visible>
	     <Element>
		<Position X="150" Y="595"/>
		   <Text X="120" Y="35" Length="120" Fixed="no" Font="tahoma" FontSize="32" Adjust="Left" VerticalAdjust="center" Color="#FFFFFF" Bright="Yes">
		     <String>test-zone 1A%</String>
		   </Text>
	     </Element>
             </Element>
             </Element>

But how to define an Area that is a Triangle or Trapezium or a Circle?

 

Thanks for your answers,

 

Bassy

 

 

 

Share this post


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

could you give a hint of code for the circle case?

i'm trying for days, but cannot find a solution...

thanks,

Share this post


Link to post
Share on other sites

The Flight Sim gps engine contains GeoCalc variables that will return distance between a pair of lat/lon coordinates.  The center of the circle should be GeoCalcLatitude1, GeoCalcLongitude1, and POSLA and POSLO will be GeoCalcLatitude2, GeoCalcLongitude2.  Then, GeoCalcDistance will yield distance between those two points using whatever units you want (for example, nmiles).

 

To read more about gps variables and how to set up the XML script, please take a look at FS9GPS Module Guidebook.  GeoCalc Group variables start on page 198 and GeoCalcDistance is discussed on page 199.  There are enough XML examples in that reference that you should be able to set up your circle condition.

 

Bob

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