Difference between revisions of "Advancing Velocity"
Jump to navigation
Jump to search
m (change CamelCase link to correct link) |
m (add link to lateral velocity) |
||
Line 7: | Line 7: | ||
</pre> | </pre> | ||
Where absbearing is the absolute bearing to your target. Without the negative sign, it could be called the retreating velocity. | Where absbearing is the absolute bearing to your target. Without the negative sign, it could be called the retreating velocity. | ||
+ | |||
+ | == See Also == | ||
+ | * [[Lateral Velocity]] | ||
[[Category:Terminology]] | [[Category:Terminology]] |
Revision as of 07:09, 14 March 2011
Advancing Velocity is the speed at which your opponent is moving toward you (perpendicular to Lateral Velocity). When you stay still, RamFire usually has an Advancing Velocity of 8 and MyFirstRobot usually has an Advancing Velocity of 0. A robot moving straight away from you would have an Advancing Velocity of -8.
Calculation
A simple formula for advancing velocity is:
double advancingvelocity = -Math.cos(e.getHeadingRadians()-absbearing)*e.getVelocity();
Where absbearing is the absolute bearing to your target. Without the negative sign, it could be called the retreating velocity.