How to convert geocentric rotation to geographic "heading"

Geographic coordinates include longitude, latitude and  altitude. In 3d space we now x,y and z.

We assume that 0,0,0 is earth center. 0,R,0 is north pole and 0,0,R is a crossing between 0'th meridian and equator.

I've dealed with transforming camera translation into lon,lat and alt and back.

But have no good idea about transforming camera rotation into "heading", so 0 heading should meen that you're looking at north, 90 - east, 180 south and 270 - west.

So could you help me with it or point me what to investigate?

i'm propably not much help, but you can get the 'direction' as a Vecor3f with yourNode.getLocalRotation().getRotationColumn(2).

i guess you should be able to convert those values to your needs somehow.

"i'm propably not much help, but you can get the 'direction' as a Vecor3f with yourNode.getLocalRotation().getRotationColumn(2)."

This is a good route to go.  I do this to tell which direction in 3d space a player is moving/facing (NE, NW, SE, SW, etc.).

This would require some math… I suggest that you make some intermediate classes, that would operate on the geographic coords, than convert them to XYZ during rendering. This way you only need a one sided conversion and don't need to mess yourself with 3D directions & vectors much.

But have no good idea about transforming camera rotation into "heading", so 0 heading should meen that you're looking at north, 90 - east, 180 south and 270 - west.

So basically converting an angle to a 3D direction? If you can convert geographical position to XYZ, you can find the direction. First know the location of the camera, then compute where it's suppose to be looking at, by adding the cos/sin(angle) * Camera.farPlane to the position in geographical coords and convert that to XYZ, call Camera.lookAt(targetPos) and you have it.

Thank you for answers. I've done it:)

As it is not so difficult to calculate Quaternion to tranform from global coordinates to local at the given place on the globe, so it is really easy to move from camera rotation in global coordinate system to local system where rotation about y axis is my heading i need so much:)

So i just divide camera rotation by this quaternion and get quaternion from which i can know heading,  tilt and pitch.

Reverse transform is done by opposite operation.