[Marble-devel] Review Request: New reference system

Torsten Rahn tackat at kde.org
Mon May 28 17:39:57 UTC 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105053/#review14248
-----------------------------------------------------------



src/lib/ViewportParams.h
<http://git.reviewboard.kde.org/r/105053/#comment11271>

    The initial time is a mere implementation detail and doesn't matter for the thing you are trying to reach :-) It's not necessary to set it from the outside imho. But what needs to be done is finding out an initial reference point that would make sense to have for the inertial system (like the spring equinox point).



src/lib/ViewportParams.h
<http://git.reviewboard.kde.org/r/105053/#comment11272>

    I'm not sure whether we want to have the "clock" as a property for ViewportParams. So far the class has been clock-independent. Maybe instead we should make MarbleClock a singleton.



src/lib/ViewportParams.h
<http://git.reviewboard.kde.org/r/105053/#comment11274>

    setType() doesn't give any idea what this is about. A better API naming would be "setReferenceSystem" with an enum passed. I don't think we want a referencesystem mode here. This should be done in a different way (e.g. as a parameter provided when querying the matrix, e.g.)



src/lib/ViewportParams.cpp
<http://git.reviewboard.kde.org/r/105053/#comment11275>

    Again I'd rather pass the type as a parameter (and an Enum).



src/lib/geodata/data/GeoDataCoordinates.h
<http://git.reviewboard.kde.org/r/105053/#comment11276>

    Having this stuff inside the GeoDataCoordinates class is a bit invasive. Maybe MarbleClock should really become a singleton. The same comments about the type and Initial time that were made earlier apply here again.


- Torsten Rahn


On May 25, 2012, 6:11 p.m., marbledeveloper marbledeveloper wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105053/
> -----------------------------------------------------------
> 
> (Updated May 25, 2012, 6:11 p.m.)
> 
> 
> Review request for Marble and Torsten Rahn.
> 
> 
> Description
> -------
> 
> New reference system: changes in GeoDataCoordinates_p.h
> Three new attributes:
> - type: The type of the reference system to use. By default the value of the type is zero, this means that the reference system used is the typical reference system used for Marble.
> - m_clock: The marble clock to get the current time and to calculate the delta time.
> - m_initialTime: The initial time when the coordinate was created.
> 
> New reference system: changes in GeoDataCoordinates.h
> Declarations of get and set methods for the three new attributes type, m_clock, m_initialTime.
> 
> New reference system: changes in GeoDataCoordinates.cpp
> Implementation of get and set methods for the three new attributes type, m_clock, m_initialTime.
> 
> New reference system: changes in SphericalProjection.cpp
> In SphericalProjection class are the methods that are executed whenever geodetic coordinates converted to screen coordinates. I have modified the method that has this prototipe: 'bool SphericalProjection::screenCoordinates( const GeoDataCoordinates &coordinates, const ViewportParams *viewport, qreal &x, qreal &y, bool &globeHidesPoint ) const'.
> 
> New reference system: changes in ViewportParams.h
> I have modified ViewportParamsPrivate::setPlanetAxis() method to use another reference system to a specific kind of GeoDataCoordinates.
> 
> New reference system: changes in ViewportParams.cpp
> I have modified ViewportParamsPrivate::setPlanetAxis() method to use another reference system to a specific kind of GeoDataCoordinates.
> 
> Explanation and purpose:
> When the Earth turns the corresponding angle in each update of Marble clock, the points added turn the same angle too, it's the normal behaviour in Marble because the reference system rotates with the Earth globe.
> 
> In this case, a point that has the next values for lon, lat and alt doesn't generate an orbit. lon, lat, alt = (0, 0, 20000 * 1000). The point is drawn always in the same point of space.
> 
> I want that the points remain fixed in the space and they doesn't turn with the Earth.
> 
> In this case a point that has the next values for lon, lat and alt generates an orbit. lon, lat, alt = (0, 0, 20000 * 1000). The point is drawn in differents points of space because the point drawn remain fixed in space.
> 
> For example, we consider that the update interval of Marble clock is 10800 s, (10800 s is the time that the Earth use to turn 45º) and that a point with values lon, lat, alt = 0,0, 20000 * 1000 is added in each update of Marble clock. At first, when the time is 0 s, the point p is drawn in 0,0, 20000 * 1000, then, when the time is 10800 s, the point p is drawn in 0,0, 20000 * 1000 but the last point p' is in -45, 0, 20000 * 1000 respect the new point p.
> 
> 
> Diffs
> -----
> 
>   src/lib/Projections/SphericalProjection.cpp 45d7306 
>   src/lib/ViewportParams.h f6d2f82 
>   src/lib/ViewportParams.cpp fb92e05 
>   src/lib/geodata/data/GeoDataCoordinates.h f112384 
>   src/lib/geodata/data/GeoDataCoordinates.cpp 8a44c5b 
>   src/lib/geodata/data/GeoDataCoordinates_p.h 14c5164 
> 
> Diff: http://git.reviewboard.kde.org/r/105053/diff/
> 
> 
> Testing
> -------
> 
> GeoDataCoordinates coordinates = GeoDataCoordinates( 0, 0, 20000.0 * 1000, GeoDataCoordinates::Degree );
> coordinates.setType( 1 ); // Inertial reference system
> coordinates.setClock( model()->clock() ) const; // The marble clock to get the current time and to calculate the delta time.
> coordinates.setInitialTime( model()->clock()->dateTime() ); // The initial time when the coordinate was created.
> m_track->addPoint(model()->clock()->dateTime(), coordinates);
> 
> 
> Thanks,
> 
> marbledeveloper marbledeveloper
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20120528/2e2b6b2a/attachment.html>


More information about the Marble-devel mailing list