Talk:Linear Targeting

From Robowiki
Revision as of 00:39, 17 March 2009 by Awesomeness (talk | contribs) (Stuart)
Jump to navigation Jump to search
Credits - Example of Noniterative Linear Targeting
Old wiki page: LinearTargeting/NanoLinearTargeting
Original author(s): Kev

I find the noniterative targeting 100% accurate aside from walls if you replace the 13 with a 10. I was fooling around with the code to try and make it more accurate, and I made a discovery! New code:

double absoluteBearing = getHeadingRadians() + e.getBearingRadians();
setTurnGunRightRadians(Utils.normalRelativeAngle(absoluteBearing - 
    getGunHeadingRadians() + (e.getVelocity() * Math.sin(e.getHeadingRadians() - 
    absoluteBearing) / 10.0)));

Does anyone else get the same results? I hope so. If it does, I'll be... remembered! For a very small thing... But... But I'll be like, on a very small scale, like ABC, like all of the "Robocode scientists", I will have made a discovery! I'll be so happy with myself! =') --Awesomeness 22:39, 16 March 2009 (UTC)