dumbo2007
Crazy about real time sims
Hi,
I need some help regarding transformations again
I am trying to make a Rover addon which is integrated with Bullet Physics. The rover is a vessel which is attached to another vessel(which serves as a controlling base). The rover moves on a plane in the Physics world. I copy this position into Orbiter by moving the attachment point connecting the rover vessel and base vessel, to the position that the physics gives me. However on the Moon's surface, the rover's wheels leave the surface at longer distances due to the Moon's curvature. The difference becomes noticeable over a distance of about a km or so.
I understand that I have to somehow force the rover downwards as it moves further out as the moon's surface is not a plane. I am searching for an easy way to convert the vessel relative co-ordinates to the moon's surface co-ordinates.
So if we assume that the rover moves along the z axis of the base vessel, then at some point it will leave the moon's surface say z=1000. This is because the rover is moving in the base vessel's relative co-ordinates while I want the vessel to move along the curving surface. So given a distance of 10 along the surface, I need to convert this to the corresponding co-ordinates wrt the the base vessel.
I hope I was able to explain clearly.
Thanks!
I need some help regarding transformations again
I am trying to make a Rover addon which is integrated with Bullet Physics. The rover is a vessel which is attached to another vessel(which serves as a controlling base). The rover moves on a plane in the Physics world. I copy this position into Orbiter by moving the attachment point connecting the rover vessel and base vessel, to the position that the physics gives me. However on the Moon's surface, the rover's wheels leave the surface at longer distances due to the Moon's curvature. The difference becomes noticeable over a distance of about a km or so.
I understand that I have to somehow force the rover downwards as it moves further out as the moon's surface is not a plane. I am searching for an easy way to convert the vessel relative co-ordinates to the moon's surface co-ordinates.
So if we assume that the rover moves along the z axis of the base vessel, then at some point it will leave the moon's surface say z=1000. This is because the rover is moving in the base vessel's relative co-ordinates while I want the vessel to move along the curving surface. So given a distance of 10 along the surface, I need to convert this to the corresponding co-ordinates wrt the the base vessel.
I hope I was able to explain clearly.
Thanks!