[Pogamut-list] Class Triple - UNITS ???

michal.bida pogamut-forum at artemis.ms.mff.cuni.cz
Sun Mar 22 12:16:45 CET 2009


Re: Re: Class Triple - UNITS ???

Author: michal.bida

There is a mistake in PRJ documentation then. The Direction attribute is obviously a vector and not a rotation value. So to count the dodge direction count Normal to Direction vector and ignore the z coordinate of the normal, when issuing the move command.

E.g. (easy solution - may not work all the time, to make it work all the time, you have to project the normal of the vector to 2D space represented by x and y axis ignoring the z axis): 
tempVect = Normal(Direction); //count normal to Direction (perpendicular vector)
PointToGoToDodge = 300 * tempVect; //as the tempVect is a base vector, we will multiply it by 300 to get 300 UT units away from the Direction of the projectile
PointToGoToDodge.z = YourBotPosition.z; //We will ignore the z coordinate, cause it may lead us to air and the UT maps are usually flat, or flat enough this will work

I'll fix the documentation.

Best,
Michal 

> I'm using the PRJ messages to evaluate the incoming rockets information. Can you explain a little bit better this sentence?
> 
> ^__Direction__
> rotation value that the projectile is coming from. Best chance to dodge is to probably head off at a
> rotation normal to this one (add ~ 16000 to the yaw value)^
> 
> You speak like the direction comes in angles between 0 and 65535, but in my application a see values like:
> 
> Direction.x =  0.69
> Direction.y =  0.72
> Direction.z = -0.06
> 
> Are they radiants or what? Maybe between -Pi and PI?
> And... are they again pitch, yaw and roll, right?
> 
> Thanks.





More information about the Pogamut-list mailing list