Robo Home | Changes | Preferences | AllPages

Showing revision 3
Difference (from revision 3 to revision 3) (minor diff, author diff)
(The revisions are identical or unavailable.)
The speed at which your opponent is moving toward you, perpendicular to LateralVelocity. If you stand still, RamFire usually has an AdvancingVelocity of 8 and MyFirstRobot will probably normally have an AdvancingVelocity of close to 0. A robot moving straight away from you would have an AdvancingVelocity of -8.

The formula for calculating this is:

	double advancingvelocity = -Math.cos(e.getHeadingRadians()-absbearing)*e.getVelocity();
absbearing is the absolute bearing to your target. If you take off the negative sign, I suppose it would be the retreating velocity. --Kawigi

Robo Home | Changes | Preferences | AllPages
Edit revision 3 of this page | View other revisions | View current revision
Edited May 19, 2003 22:41 EST by Kawigi (diff)