コード例 #1
0
ファイル: Car.cs プロジェクト: grzesiekmq/rgn
        /// <summary>
        /// right angle of ackermann steering in degrees
        /// </summary>
        /// <param name="rearTrack"></param>
        /// <param name="wheelBase"></param>
        /// <param name="turnRadius"></param>
        /// <returns>angle</returns>
        public static double AckermannRight(float rearTrack, float wheelBase, float turnRadius)
        {
            var right = Math.Atan(wheelBase / (turnRadius - rearTrack / 2));

            return(Maths.RadToDeg(right));
        }
コード例 #2
0
ファイル: Car.cs プロジェクト: grzesiekmq/rgn
        /// <summary>
        /// left angle of ackermann steering in degrees
        /// </summary>
        /// params in metres
        /// <param name="rearTrack"></param>
        /// <param name="wheelBase"></param>
        /// <param name="turnRadius"></param>
        ///
        /// <returns>angle</returns>
        public static double AckermannLeft(float rearTrack, float wheelBase, float turnRadius)
        {
            var left = Math.Atan(wheelBase / (turnRadius + rearTrack / 2));

            return(Maths.RadToDeg(left));
        }