November 27, 20169 yr 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
November 27, 20169 yr The circle case is straightforward. If the distance from the center of the circle to the point in question is less than the radius of the circle, the point is inside the circle. For polygons, things get exciting... http://geomalgorithms.com/a03-_inclusion.html
December 13, 20169 yr Author could you give a hint of code for the circle case? i'm trying for days, but cannot find a solution... thanks,
December 28, 20169 yr 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
Archived
This topic is now archived and is closed to further replies.