Jump to content
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

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  

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