Hi,<br><br>I've detected some issues in orbit visualization when the satellite orbit is behind the Earth. See the images: <a href="http://i47.tinypic.com/2u5wa9z.jpg">http://i47.tinypic.com/2u5wa9z.jpg</a> and <a href="http://i50.tinypic.com/2d01c06.jpg">http://i50.tinypic.com/2d01c06.jpg</a><br>
<br>I've used the inertial system reference for the satellite and orbit instead of the fixed reference system.<br><br>I think that I need rotate the bounding box... but I'm not sure...<br><br>How can I solve this issue?<br>
<br>Regards.<br><br><div class="gmail_quote">2012/5/23 marble_developer marble_developer <span dir="ltr"><<a href="mailto:marbledeveloper@gmail.com" target="_blank">marbledeveloper@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br><br>I have implemented a small demo that uses the new reference system. The small demo contains the next files:<br>main.cpp: <a href="http://pastebin.com/Z74VBMCu" target="_blank">http://pastebin.com/Z74VBMCu</a><br>
marblemanager.h: <a href="http://pastebin.com/kXAHLuTz" target="_blank">http://pastebin.com/kXAHLuTz</a><br>
marblemanager.cpp: <a href="http://pastebin.com/iCwPPnjV" target="_blank">http://pastebin.com/iCwPPnjV</a><br>satitem.h: <a href="http://pastebin.com/id30XEeY" target="_blank">http://pastebin.com/id30XEeY</a><br>satitem.cpp: <a href="http://pastebin.com/NBpV5dus" target="_blank">http://pastebin.com/NBpV5dus</a><br>
<br>I have made new changes in the next files, (now I use diffs to make more clear the review):<br>GeoDataCoordinates_p_h.diff: <a href="http://pastebin.com/ak56mVLq" target="_blank">http://pastebin.com/ak56mVLq</a><br>GeoDataCoordinates_h.diff: <a href="http://pastebin.com/mj88Jr4R" target="_blank">http://pastebin.com/mj88Jr4R</a><br>
GeoDataCoordinates_cpp.diff: <a href="http://pastebin.com/9GfDv1YM" target="_blank">http://pastebin.com/9GfDv1YM</a><br>SphericalProjection_cpp.diff: <a href="http://pastebin.com/3GzR72gb" target="_blank">http://pastebin.com/3GzR72gb</a><br>
ViewportParams_cpp.diff: <a href="http://pastebin.com/zvizfq2T" target="_blank">http://pastebin.com/zvizfq2T</a><br>
<br>I have used a new approach. I haven't used the Marble clock in the conversion in ViewportParams because all the times are the same for each update. The update interval of Marble corresponds with the step time of my orbit propagation. v = e / t --> e = v * t --> lon = lon - (earthAngularSpeed * m_time). earthAngularSpeed and m_time are constants in my case.<br>
<br>When I run my small demo a point is drawn. The point remains fixed in the space although I click and drag over the earth globe.<br><br>Can you help me to correct this behaviour?<br><br>Best regards.<div class="HOEnZb">
<div class="h5"><br><br><div class="gmail_quote">
2012/5/16 Torsten Rahn <span dir="ltr"><<a href="mailto:tackat@t-online.de" target="_blank">tackat@t-online.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
Please rather create diffs or even better add an entry to reviewboard :-)<br>
<br>
Otherwise other people won't be able to spot the differences.<br>
<div><br>
On Dienstag, 15. Mai 2012 20:55:24 marble_developer marble_developer wrote:<br>
> 1.- I have added an attribute in GeoDataCoordinatesPrivate class to set the<br>
> new type and I have added another attribute to set the marble clock. Code<br>
> for GeoDataCoordinates_p.h: <a href="http://pastebin.com/mCF0eLn7" target="_blank">http://pastebin.com/mCF0eLn7</a> The type indicates<br>
> the reference system to use for the GeoDataCoordinates object.<br>
<br>
</div>This needs to be a flag at some point.<br>
<div><br>
> 2.- Then I have modified the GeoDataCoordinates class to declare and<br>
> implement the get and set methods for the the new type and for the marble<br>
> clock. Code for GeoDataCoordinates.h: <a href="http://pastebin.com/pFF8hjGe" target="_blank">http://pastebin.com/pFF8hjGe</a> and code<br>
> for GeoDataCoordinates.cpp: <a href="http://pastebin.com/BUGqVETW" target="_blank">http://pastebin.com/BUGqVETW</a><br>
<br>
</div>I don't think that the clock should be a property of the GeoDataCoordinate<br>
class. That's neither acceptable semantically nor in terms of ressource<br>
consumption :-)<br>
<div><br>
> 3.- Later I have gone to the SphericalProjection class because the methods<br>
> in there are executed whenever geodetic coordinates converted to screen<br>
> coordinates. I have modified the method that has this prototipe: 'bool<br>
> SphericalProjection::screenCoordinates( const GeoDataCoordinates<br>
> &coordinates, const ViewportParams *viewport, qreal &x, qreal &y, bool<br>
> &globeHidesPoint ) const'. This is the new code for<br>
> SphericalProjection.cpp: <a href="http://pastebin.com/yhGEfDf9" target="_blank">http://pastebin.com/yhGEfDf9</a><br>
> 4.- I have modified ViewportParamsPrivate::setPlanetAxis() method to use<br>
> another reference system to a specific kind of GeoDataCoordinates. Code:<br>
> <a href="http://pastebin.com/NDFaXJGz" target="_blank">http://pastebin.com/NDFaXJGz</a><br>
<br>
</div>The changes look about correct (at least for a first prototype). Did you test<br>
whether it works as expected?<br>
Did you check whether the resulting longitudes increase with time as expected?<br>
<br>
Of course the problem is still with the MarbleClock: I guess we wouldn't want<br>
to introduce the MarbleClock as a property for the viewport params. So how<br>
would the the time get accessed which currently is only accessible from the<br>
model?<br>
<br>
Also there is the catch with BoundingBoxes ("GeoDataLatLonAltBox"): They'd<br>
either be reference system aware or always fed with the fixed reference system<br>
even if the coordinates involved are inertial ones. The latter approach would<br>
require a conversion which again would require the clock to be accessible from<br>
the classes involved.<br>
<br>
So maybe we should make MarbleClock a singleton?<br>
<br>
Additionally we'd need to investigate possible side effects of the newly<br>
introduced reference system onto other code involved (beyond the bounding<br>
boxes).<br>
<br>
So the new code so far introduces some conceptual issues (Marble Clock<br>
availability, Sideeffects and possibly required handling in other classes such<br>
as the LatLonAltBox, API complexity burden).<br>
<br>
So we need to weigh up those disadvantages against the advantages (possible<br>
performance improvements - but those need to get verified). And only then we<br>
could think of adding this feature to our code base. It might very well be<br>
that it turns out not to be worth the trouble so that you might need to<br>
continue with your previous approach.<br>
<br>
I just had a chat with Guillaume ("smarter") and he would think that the<br>
performance impact is likely not to be noticable in most use cases. But maybe<br>
we could have this verified.<br>
<br>
BR,<br>
Torsten<br>
<div><div><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
> Problems:<br>
> 1.- I'm not sure that the new implementation added in ViewportParams is<br>
> correct because the SphericalProjection::screenCoordinates() method doesn't<br>
> call ViewportParamsPrivate::setPlanetAxis() directly.<br>
><br>
> Best regards.<br>
><br>
> 2012/5/13 Torsten Rahn <<a href="mailto:tackat@t-online.de" target="_blank">tackat@t-online.de</a>><br>
><br>
> > Hi,<br>
> ><br>
> > Now I get it :-)<br>
> ><br>
> > Yes, I can see why this kind of problem occurs with Orbit data.<br>
> ><br>
> > Right now we basically calculate the screen positions of objects for a<br>
> > certain<br>
> > position inside the projection classes. See<br>
> ><br>
> > src/lib/Projections/SphericalProjection.cpp<br>
> ><br>
> > with methods like<br>
> ><br>
> > bool SphericalProjection::screenCoordinates( const GeoDataCoordinates<br>
> > &coordinates, const ViewportParams *viewport,<br>
> ><br>
> > qreal &x, qreal &y, bool &globeHidesPoint ) const<br>
> ><br>
> > for example. The expensive part there is the line qpos.rotateAroundAxis(<br>
> > *(<br>
> > viewport->planetAxisMatrix() ) ); which does the basic coordinate<br>
> > transformation between geodetic GeoDataCoordinates and pixel coordinates.<br>
> ><br>
> > I guess that would be the proper place in the code where one could<br>
> > introduce<br>
> > other such possible reference systems. If you really want to "save" CPU<br>
> > cycles<br>
> > there then you'd probably introduce an alternative planetAxisMatrix that<br>
> > is used for the rotateAroundAxis method (have a look at the other places<br>
> > in the<br>
> > code where the planetAxis is calculated to do this in a similar way).<br>
> > This would avoid having to "convert" the positions for all the<br>
> > GeoDataCoordinates of the Satellites. Instead you'd just create a fitting<br>
> > matrix once that would work for all :-)<br>
> ><br>
> > We'd gladly accept patches that do this in a nice way ;) This means it<br>
> > should<br>
> > work for all projections with a nice API. Ideally you'd also provide some<br>
> > basic unit regression tests :)<br>
> ><br>
> > BR,<br>
> ><br>
> > Torsten<br>
> ><br>
> > On Sonntag, 13. Mai 2012 13:20:14 marble_developer marble_developer wrote:<br>
> > > Hi,<br>
> > ><br>
> > > I will try to explain it a bit better.<br>
> > ><br>
> > > When the Earth turns the corresponding angle in each update of Marble<br>
> > > clock, the points added turn the same angle too, it's the normal<br>
> ><br>
> > behaviour<br>
> ><br>
> > > in Marble because the reference system rotates with the Earth globe.<br>
> > ><br>
> > > In this case, a point that has the next values for lon, lat and alt<br>
> ><br>
> > doesn't<br>
> ><br>
> > > generate an orbit. lon, lat, alt = (0, 0, 20000 * 1000). The point is<br>
> ><br>
> > drawn<br>
> ><br>
> > > always in the same point of space.<br>
> > ><br>
> > > I want that the points remain fixed in the space and they doesn't turn<br>
> ><br>
> > with<br>
> ><br>
> > > the Earth.<br>
> > ><br>
> > > In this case a point that has the next values for lon, lat and alt<br>
> > > generates an orbit. lon, lat, alt = (0, 0, 20000 * 1000). The point is<br>
> > > drawn in differents points of space because the point drawn remain<br>
> > > fixed<br>
> ><br>
> > in<br>
> ><br>
> > > space.<br>
> > ><br>
> > > For example, we consider that the update interval of Marble clock is<br>
> ><br>
> > 10800<br>
> ><br>
> > > s, (10800 s is the time that the Earth use to turn 45º) and that a<br>
> > > point with values lon, lat, alt = 0,0, 20000 * 1000 is added in each<br>
> > > update of Marble clock. At first, when the time is 0 s, the point p is<br>
> > > drawn in<br>
> ><br>
> > 0,0,<br>
> ><br>
> > > 20000 * 1000, then, when the time is 10800 s, the point p is drawn in<br>
> ><br>
> > 0,0,<br>
> ><br>
> > > 20000 * 1000 but the last point p' is in -45, 0, 20000 * 1000 respect<br>
> > > the new point p.<br>
> > ><br>
> > > I have performed this behaviour by recalculating the new lon position<br>
> > > in every update but it's very slowly when the number of points is<br>
> > > elevated.<br>
> > ><br>
> > > How can I do this task in a better way? Is it possible to change the<br>
> > > reference system using in Marble?<br>
> > ><br>
> > > Regards.<br>
> > ><br>
> > > 2012/5/7 marble_developer marble_developer <<a href="mailto:marbledeveloper@gmail.com" target="_blank">marbledeveloper@gmail.com</a>><br>
> > ><br>
> > > > Hi all,<br>
> > > ><br>
> > > > Is it possible to change the reference system using in Marble?<br>
> > > > In affirmative case, how can I change it?<br>
> > > > I need to use an inertial reference system instead of fixed reference<br>
> > > > system.<br>
> > > ><br>
> > > > Best regards.<br>
> ><br>
> > _______________________________________________<br>
> > Marble-devel mailing list<br>
> > <a href="mailto:Marble-devel@kde.org" target="_blank">Marble-devel@kde.org</a><br>
> > <a href="https://mail.kde.org/mailman/listinfo/marble-devel" target="_blank">https://mail.kde.org/mailman/listinfo/marble-devel</a><br>
_______________________________________________<br>
Marble-devel mailing list<br>
<a href="mailto:Marble-devel@kde.org" target="_blank">Marble-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/marble-devel" target="_blank">https://mail.kde.org/mailman/listinfo/marble-devel</a><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>