private static void Timer1Elapsed(object sender, ElapsedEventArgs e) { Memory.Update(); _bunnyJump.Update(); _sonar.Update(); _triggerBot.Update(); _rcs.Update(); KeyUtils.Update(); }
public override void Observation() { Sonar.RelativeAngle = Angle; Sonar.Update(new PointF((float)X, (float)Y)); double l = 0, r = 0; WheelRotationAmountCalculation(ref l, ref r); rotl = (Inertia) * rotl + (1 - Inertia) * l; rotr = (Inertia) * rotr + (1 - Inertia) * r; double n = Math.Sqrt(rotl * rotl + rotr * rotr); if (n > Rotmax) { rotl /= n; rotr /= n; } UpdateRotation(rotl, rotr); }