|
From: <Wol...@t-...> - 2001-06-18 16:28:17
|
Curt wrote: > OBJECT_STATIC <model_name> <lon> <lat> <alt> <heading> Good, it works! Thanks to Normans post of a few days/weeks ago, I can generate lon lat alt. How is heading defined and how do I calculate it? Here are some ideas, please tell me whether I am on the right track: Heading is the angle between "forward" (if, for example we are speaking about a red fire truck :-)) and north. I can easily caluculate the x,y,z coordinates in "tile space" (the coord. sys. that the vertices of this tile are in). I can calculate them for lets say the centre of the truck and a vertex in the front. Lets call the vector from the vertex to the front A. Lets project it onto the horizontal plane, that means take away any component of A that points in the direction of the vector that is specified in the gbs of the tile. Lets call this projected vector AP.=20 Take the vector (0,0,1) as a "sort of north" and project it onto the plane and call it ZP. The Heading is the angle between AP and ZP, as seen from above, that means as seen from the +gbs vector. Am I making sense? BTW, Curt, don't you want to add pitch and roll? That would be very helpful. People who don't need it can just set it o zero. >Regards, > >Curt. Bye bye, Wolfram. |