[Marble-devel] Gps tracking

Torsten Rahn tackat at t-online.de
Mon Sep 5 15:25:18 UTC 2011


Hi Konrad,

> Is there a way to rotate the map to allways drive in north direction ? like
> navigation devices do?

Well currently it does always have north pointed upwards. You probably mean 
the case where it puts the driving direction always upwards:

This was possible many moons ago: Have a look at:

void MarbleMap::centerOn( const qreal lon, const qreal lat )
{
    Quaternion  quat;
    quat.createFromEuler( -lat * DEG2RAD, lon * DEG2RAD, 0.0 );
    d->m_viewParams.setPlanetAxis( quat );
    d->m_textureLayer.setNeedsUpdate();

    emit visibleLatLonAltBoxChanged( d->m_viewParams.viewport()-
>viewLatLonAltBox() );
}

IIRC the third parameter in createFromEuler should allow to rotate the globe 
around the axis that is orthonormal to the screen plane.

I recall that at some point we had a method inside MarbleMap which took three 
parameters to accomplish this. Apparently It got removed at one point. Maybe 
we should reintroduce it.

BR,

Torsten


 
> thanks for support,
> konrad



More information about the Marble-devel mailing list