Difference between revisions of "Thread:Talk:Maximum Escape Angle/Is wiki wrong about MEA?/reply (6)"
Jump to navigation
Jump to search
m (Reply to Is wiki wrong about MEA?) |
m (formatting) |
||
Line 8: | Line 8: | ||
But the last thing could be simplified a bit | But the last thing could be simplified a bit | ||
− | if you notice that latVel = bulletSpeed*sin(MEA) | + | if you notice that |
+ | <pre> | ||
+ | latVel = bulletSpeed*sin(MEA) | ||
+ | </pre> | ||
Moving away is always bad idea from the MEA prospective within robocode physics. | Moving away is always bad idea from the MEA prospective within robocode physics. |
Latest revision as of 16:07, 17 September 2017
timeToHit is not taking in account that the bullet moves at some angle too, i.e. we need to use bulletSpeed*cos(MEA). In above we assume that 'a' is angle between line connecting bots and the velocity of the target.
The last line is not precisely correct as well. There should be no factor of 2, and you forgot the atan. It should be
mea = atan( latVel / (distance - (timeToHit * advVel)) * hitTime );
But the last thing could be simplified a bit if you notice that
latVel = bulletSpeed*sin(MEA)
Moving away is always bad idea from the MEA prospective within robocode physics.