示例#1
0
        public override void Execute(CurrentPosition currentPosition, WayPoint wayPoint)
        {
            var currentWayPoint = wayPoint.Clone();

            switch (Units)
            {
            case 90:
            {
                wayPoint.NorthSouth = -currentWayPoint.EastWest;
                wayPoint.EastWest   = currentWayPoint.NorthSouth;
                break;
            }

            case 180:
            {
                wayPoint.NorthSouth = -currentWayPoint.NorthSouth;
                wayPoint.EastWest   = -currentWayPoint.EastWest;
                break;
            }

            case 270:
            {
                wayPoint.NorthSouth = currentWayPoint.EastWest;
                wayPoint.EastWest   = -currentWayPoint.NorthSouth;
                break;
            }
            }
        }