예제 #1
0
 public RadarParams(RadarParams data)
 {
     if (data == null)
     {
         MinEl        = "0";
         MaxEl        = "90";
         MinRange     = "1600";
         MaxRange     = "40000";
         SolarExAngle = "10";
         HalfAngle    = "85";
         MinAz        = "0";
         MaxAz        = "360";
     }
     else
     {
         SolarExAngle = data.SolarExAngle;
         MinRange     = data.MinRange;
         MaxRange     = data.MaxRange;
         MinEl        = data.MinEl;
         MaxEl        = data.MaxEl;
         HalfAngle    = data.HalfAngle;
         MinAz        = data.MinAz;
         MaxAz        = data.MaxAz;
     }
 }
예제 #2
0
 public FcFacility(FcFacility curFac)
 {
     Name           = curFac.Name;
     Type           = curFac.Type;
     Latitude       = curFac.Latitude;
     Longitude      = curFac.Longitude;
     Altitude       = curFac.Altitude;
     CadanceName    = curFac.CadanceName;
     IsOpt          = curFac.IsOpt;
     RParams        = new RadarParams(curFac.RParams);
     OParams        = new OpticalParams(curFac.OParams);
     UseDefaultCnst = curFac.UseDefaultCnst;
 }
    /// <summary>
    /// The Google Places API Radar Search Service allows you to search for up to 200 places at once, but with less detail than is typically returned from a Text Search or Nearby Search request. \n
    /// With Radar Search, you can create applications that help users identify specific areas of interest within a geographic area.
    /// </summary>
    /// <param name="lnglat">The longitude/latitude around which to retrieve place information.</param>
    /// <param name="radius">
    /// Defines the distance (in meters) within which to return place results. \n
    /// The maximum allowed radius is 50 000 meters.
    /// </param>
    /// <param name="key">
    /// Your application's API key. \n
    /// This key identifies your application for purposes of quota management and so that places added from your application are made immediately available to your app. \n
    /// Visit the Google APIs Console to create an API Project and obtain your key.
    /// </param>
    /// <param name="keyword">A term to be matched against all content that Google has indexed for this place, including but not limited to name, type, and address, as well as customer reviews and other third-party content.</param>
    /// <param name="name">
    /// One or more terms to be matched against the names of places, separated by a space character. \n
    /// Results will be restricted to those containing the passed name values. \n
    /// Note that a place may have additional names associated with it, beyond its listed name. \n
    /// The API will try to match the passed name value against all of these names. \n
    /// As a result, places may be returned in the results whose listed names do not match the search term, but whose associated names do.
    /// </param>
    /// <param name="types">
    /// Restricts the results to places matching at least one of the specified types. \n
    /// Types should be separated with a pipe symbol (type1|type2|etc). \n
    /// See the list of supported types:\n
    /// https://developers.google.com/maps/documentation/places/supported_types
    /// </param>
    /// <param name="minprice">
    /// Restricts results to only those places within the specified price level. \n
    /// Valid values are in the range from 0 (most affordable) to 4 (most expensive), inclusive. \n
    /// The exact amount indicated by a specific value will vary from region to region.
    /// </param>
    /// <param name="maxprice">
    /// Restricts results to only those places within the specified price level. \n
    /// Valid values are in the range from 0 (most affordable) to 4 (most expensive), inclusive. \n
    /// The exact amount indicated by a specific value will vary from region to region.
    /// </param>
    /// <param name="opennow">
    /// Returns only those places that are open for business at the time the query is sent. \n
    /// Places that do not specify opening hours in the Google Places database will not be returned if you include this parameter in your query.
    /// </param>
    /// <returns>Query instance to the Google API.</returns>
    public static OnlineMapsGooglePlaces FindRadar(Vector2 lnglat, int radius, string key, string keyword = null, string name = null, string types = null, int minprice = -1, int maxprice = -1, bool opennow = false)
    {
        RadarParams p = new RadarParams(lnglat, radius)
        {
            keyword = keyword,
            name    = name,
            types   = types,
        };

        if (minprice != -1)
        {
            p.minprice = minprice;
        }
        if (maxprice != -1)
        {
            p.maxprice = maxprice;
        }
        if (opennow)
        {
            p.opennow = opennow;
        }

        return(new OnlineMapsGooglePlaces(key, p));
    }
 /// <summary>
 /// The Google Places API Radar Search Service allows you to search for up to 200 places at once, but with less detail than is typically returned from a Text Search or Nearby Search request. \n
 /// With Radar Search, you can create applications that help users identify specific areas of interest within a geographic area.
 /// </summary>
 /// <param name="key">
 /// Your application's API key. \n
 /// This key identifies your application for purposes of quota management and so that places added from your application are made immediately available to your app. \n
 /// Visit the Google APIs Console to create an API Project and obtain your key.
 /// </param>
 /// <param name="p">The object containing the request parameters.</param>
 /// <returns>Query instance to the Google API.</returns>
 public static OnlineMapsGooglePlaces FindRadar(string key, RadarParams p)
 {
     return(new OnlineMapsGooglePlaces(key, p));
 }
예제 #5
0
        public static IAgStkObject AttachFacilityRadar(IAgStkObject parent, string radarName, RadarParams rParams)
        {
            IAgStkObject sensorObj = CreatorFunctions.GetCreateSensor(parent, radarName);
            IAgSensor    sensor    = sensorObj as IAgSensor;

            sensor.Graphics.IsObjectGraphicsVisible = false;
            IAgSnSimpleConicPattern pattern = sensor.Pattern as IAgSnSimpleConicPattern;

            pattern.ConeAngle = Double.Parse(rParams.HalfAngle);

            IAgAccessConstraintCollection constraints = sensor.AccessConstraints;
            IAgAccessCnstrMinMax          elConstraint;
            IAgAccessCnstrMinMax          rangeConstraint;
            IAgAccessCnstrAngle           solarExConstraint;

            elConstraint = CreatorFunctions.GetElCnst(constraints);
            CreatorFunctions.SetCnstMinMax(elConstraint, Double.Parse(rParams.MinEl), Double.Parse(rParams.MaxEl));
            rangeConstraint = CreatorFunctions.GetRangeCnst(constraints);
            CreatorFunctions.SetCnstMinMax(rangeConstraint, Double.Parse(rParams.MinRange), Double.Parse(rParams.MaxRange));
            solarExConstraint       = CreatorFunctions.GetSunExCnst(constraints);
            solarExConstraint.Angle = rParams.SolarExAngle;

            return(sensorObj);
        }