# File generated by Wizard 2.9.0 on Dec 22, 2024.
processor flyZone WSF_SCRIPT_PROCESSOR 
   script_variables 
      string zNameOrPoint = "tw";
      string zType = "polygon";
   end_script_variables
   
   //
   //@ flyPolygonalZone
   //
   script void flyPolygonalZone(string zName)
      WsfZone zone = zone.FindZone(zName);
      PLATFORM.GoToSpeed(1000,999);
      PLATFORM.GoToLocation(zone.Location());
   end_script
   
   //
   //@ flyCircleZone
   //
   script void flyCircleZone(string zPoint)
      WsfGeoPoint p = p.Construct(zPoint);
      PLATFORM.GoToSpeed(1000,999);
      PLATFORM.GoToLocation(p);
   end_script
   
   //
   //@ fly the zone
   //
   script void flyZone(string zNameOrPoint,string zType)
      if(zType == "polygon")
      {
         flyPolygonalZone(zNameOrPoint);
      }
      else if(zType == "circle")
      {
         flyCircleZone(zNameOrPoint);
      }
   end_script
   
   execute at_time 50 sec relative 
      flyZone(zNameOrPoint,zType);
   end_execute
end_processor