当前位置: 首页>>代码示例>>C#>>正文


C# Azimuth.Normalize方法代码示例

本文整理汇总了C#中Azimuth.Normalize方法的典型用法代码示例。如果您正苦于以下问题:C# Azimuth.Normalize方法的具体用法?C# Azimuth.Normalize怎么用?C# Azimuth.Normalize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Azimuth的用法示例。


在下文中一共展示了Azimuth.Normalize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Randomize

        /// <summary>
        /// Randomizes the emulation by changing speed and direction
        /// </summary>
        /// <param name="seed"> The randomizer to use. </param>
        /// <param name="speedLow"> The minimum travel speed. </param>
        /// <param name="speedHigh"> The maximum travel speed. </param>
        /// <param name="bearingStart"> The initial direction of travel. </param>
        /// <param name="bearingArc"> The arc in which random directional changes will occur. </param>
        /// <remarks>
        /// GPS coordinate emulation can be randomized by any number of factors, depending on the emulator type used.
        /// Any emulation can have it's direction and speed randomized within specified tolerances. By default, speed is 
        /// limited to between 0 (low) and 5 (high) meters/second and bearing changes are limited to +/- 45 degrees 
        /// (a 90 degree arc) from North (0) degrees.
        /// </remarks>
        public void Randomize(Random seed, Speed speedLow, Speed speedHigh, Azimuth bearingStart, Azimuth bearingArc)
        {
            // Flag it so the emulation will use random values
            _isRandom = true;

            // Get the randomizer parameters
            _seed = seed;

            // Get the speed variance
            _speedLow = speedLow.ToMetersPerSecond().Value;
            _speedHigh = speedHigh.ToMetersPerSecond().Value;

            // Get the normalized arc values
            _bearingStart = bearingStart.Normalize().DecimalDegrees;
            _bearingArc = bearingArc.Normalize().DecimalDegrees;
        }
开发者ID:chinnisuraj1984,项目名称:navigational,代码行数:30,代码来源:Emulator.cs


注:本文中的Azimuth.Normalize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。