[prev in list] [next in list] [prev in thread] [next in thread] 

List:       flightgear-devel
Subject:    Re: [Flightgear-devel] Time warping
From:       Anton Gomez Alvedro <galvedro () gmail ! com>
Date:       2013-10-30 13:08:32
Message-ID: CAOCt1VoKSsauMqjHvF544FzH=spaZk6mYnXj6shqxnsu8j_hzg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> but nothing anywhere says that it should represent either of those things

Yes, that's right :)

Anyway, this started with the question of: how do you know how much
simulated time has elapsed since your last visit? If you can check every
frame, that quantity becomes sim/elapsed-sec * sim/speed-up. At least from
the aircraft point of view. But if you are updating at 10 Hz for example,
then you can not know exactly. (Or perhaps there is a different property
that exposes that value, that I haven't seen).

If there is a feeling that time management could be improved, I would be
happy to have a look at it. But of course if we can agree on how the user
experience should look like.

Anton

P.S. Just in case: I do realize this is a rather critical/sensible part of
the sim. :)


On Wed, Oct 30, 2013 at 11:44 AM, James Turner <zakalawe@mac.com> wrote:

>
> On 30 Oct 2013, at 10:33, Anton Gomez Alvedro <galvedro@gmail.com> wrote:
>
> I don't know! :D It looked like so after this short discussion:
> http://forum.flightgear.org/viewtopic.php?f=14&t=21020&start=30#p192454
>
> The comments in the code suggest a different concept however:
>
> class FGGlobals {
> ...
>     // Number of milliseconds elapsed since the start of the program.
>     double sim_time_sec;
>
> But the name given to the variable again suggests "simulated time in
> seconds", not milliseconds since start.
>
>
> To be honest I wish we did not have those cumulative values - the comments
> are wrong, the property names are misleading. For 'real' dt (not simulated)
> we can of course offer elapsed seconds or msec since the program started,
> but I can't imagine many use cases where that's a genuinely interesting
> value.
>
> In practice, the variable doesn't grow when the simulator is paused, so
> the comment doesn't really hold, and it doesn't honour either speed-up nor
> warp settings, so it doesn't represent simulated time inside nor outside
> the aircraft. ??? :D
>
>
> No, but nothing anywhere says that it should represent either of those
> things (unless we have even more misleading comments or docs?)
>
> If it is not a bug, I guess we can agree that the context surrounding this
> property is, at least, confusing.
>
>
> Very likely.
>
> Personally, I tend to agree with James' explanation. It makes sense to me,
> assuming the ability to warp environment time independently of local
> aircraft time is a feature. How each system should interact with this
> concept, even how both timelines should interact to each other, I guess
> that requires careful thinking.
>
>
> Note I figured out that explanation by reading the code and guessing, it's
> not based on anything 'official' :)
>
> I tend to agree with what Torsten wrote - given that these are unphysical
> things we're doing, there are lots of differing use cases and any link
> between 'speed-up' and 'warp' is likely to be problematic. I do think
> including speed-up in sim-dt would be valuable, if it could be done safely,
> but I'd want to see a pretty convincing audit of Nasal/ and fgdata/Aircraft
> to establish how the value is being used and what kind of / quantity of
> bugs we might produce by making such a change.
>
> Kind regards,
> James
>
>
>
> ------------------------------------------------------------------------------
> Android is increasing in popularity, but the open development platform that
> developers love is also attractive to malware creators. Download this white
> paper to learn more about secure code signing practices that can help keep
> Android apps secure.
> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> _______________________________________________
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel
>
>

[Attachment #5 (text/html)]

<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">&gt; but \
nothing anywhere says that it should represent either of those \
things</span><br><div><span style="font-family:arial,sans-serif;font-size:13px"><br> \
</span></div><div style><span \
style="font-family:arial,sans-serif;font-size:13px">Yes, that&#39;s right \
:)</span></div><div style><br></div><div style><font face="arial, sans-serif">Anyway, \
this started with the question of: how do you know how much simulated time has \
elapsed since your last visit? If you can check every frame, that quantity becomes \
sim/elapsed-sec * sim/speed-up. At least from the aircraft point of view. But if you \
are updating at 10 Hz for example, then you can not know exactly. (Or perhaps there \
is a different property that exposes that value, that I haven&#39;t \
seen).</font></div> <div style><font face="arial, sans-serif"><br></font></div><div \
style><font face="arial, sans-serif">If there is a feeling that time management could \
be improved, I would be happy to have a look at it. But of course if we can agree on \
how the user experience should look like.</font></div> <div style><font face="arial, \
sans-serif"><br></font></div><div style><font face="arial, \
sans-serif">Anton</font></div><div style><font face="arial, \
sans-serif"><br></font></div><div style><font face="arial, sans-serif">P.S. Just in \
case: I do realize this is a rather critical/sensible part of the sim. \
:)</font></div> </div><div class="gmail_extra"><br><br><div class="gmail_quote">On \
Wed, Oct 30, 2013 at 11:44 AM, James Turner <span dir="ltr">&lt;<a \
href="mailto:zakalawe@mac.com" target="_blank">zakalawe@mac.com</a>&gt;</span> \
wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div \
class="im"><div>On 30 Oct 2013, at 10:33, Anton Gomez Alvedro &lt;<a \
href="mailto:galvedro@gmail.com" target="_blank">galvedro@gmail.com</a>&gt; \
wrote:</div> <br><blockquote type="cite"><div \
style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;fo \
nt-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
 <span style="font-family:arial,sans-serif;font-size:13px">I don&#39;t know! :D It \
looked like so after this short discussion: </span><a \
href="http://forum.flightgear.org/viewtopic.php?f=14&amp;t=21020&amp;start=30#p192454" \
target="_blank">http://forum.flightgear.org/viewtopic.php?f=14&amp;t=21020&amp;start=30#p192454</a></div>
 <div style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:nor \
mal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
 <br></div><div style="font-family:Helvetica;font-size:medium;font-style:normal;font-v \
ariant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:- \
webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"> \
The comments in the code suggest a different concept however:<br></div><div \
style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;fo \
nt-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
 <br></div><div style="font-family:Helvetica;font-size:medium;font-style:normal;font-v \
ariant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:- \
webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"> \
<div>class FGGlobals {</div><div>...</div><div>    // Number of milliseconds elapsed \
since the start of the program.<br></div><div>    double \
sim_time_sec;</div><div><br></div><div>But the name given to the variable again \
suggests &quot;simulated time in seconds&quot;, not milliseconds since start.</div> \
</div></blockquote><div><br></div></div><div>To be honest I wish we did not have \
those cumulative values - the comments are wrong, the property names are misleading. \
For &#39;real&#39; dt (not simulated) we can of course offer elapsed seconds or msec \
since the program started, but I can&#39;t imagine many use cases where that&#39;s a \
genuinely interesting value.</div> <br><blockquote type="cite"><div \
style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;fo \
nt-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
 <div>In practice, the variable doesn&#39;t grow when the simulator is paused, so the \
comment doesn&#39;t really hold, and it doesn&#39;t honour either speed-up nor warp \
settings, so it doesn&#39;t represent simulated time inside nor outside the aircraft. \
??? :D</div> </div></blockquote><div><br></div><div>No, but nothing anywhere says \
that it should represent either of those things (unless we have even more misleading \
comments or docs?)</div><div class="im"><br><blockquote type="cite"> <div \
style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;fo \
nt-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
 If it is not a bug, I guess we can agree that the context surrounding this property \
is, at least, confusing.</div></blockquote><div><br></div></div><div>Very \
likely.</div><div class="im"><br><blockquote type="cite"><div \
style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;fo \
nt-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
 Personally, I tend to agree with James&#39; explanation. It makes sense to me, \
assuming the ability to warp environment time independently of local aircraft time is \
a feature. How each system should interact with this concept, even how both timelines \
should interact to each other, I guess that requires careful thinking.</div> \
</blockquote><br></div></div><div>Note I figured out that explanation by reading the \
code and guessing, it&#39;s not based on anything &#39;official&#39; \
:)</div><div><br></div><div>I tend to agree with what Torsten wrote - given that \
these are unphysical things we&#39;re doing, there are lots of differing use cases \
and any link between &#39;speed-up&#39; and &#39;warp&#39; is likely to be \
problematic. I do think including speed-up in sim-dt would be valuable, if it could \
be done safely, but I&#39;d want to see a pretty convincing audit of Nasal/ and \
fgdata/Aircraft to establish how the value is being used and what kind of / quantity \
of bugs we might produce by making such a change.</div> <div><br></div><div>Kind \
regards,</div><div>James</div><div><br></div></div><br>------------------------------------------------------------------------------<br>
 Android is increasing in popularity, but the open development platform that<br>
developers love is also attractive to malware creators. Download this white<br>
paper to learn more about secure code signing practices that can help keep<br>
Android apps secure.<br>
<a href="http://pubads.g.doubleclick.net/gampad/clk?id=65839951&amp;iu=/4140/ostg.clktrk" \
target="_blank">http://pubads.g.doubleclick.net/gampad/clk?id=65839951&amp;iu=/4140/ostg.clktrk</a><br>_______________________________________________<br>


Flightgear-devel mailing list<br>
<a href="mailto:Flightgear-devel@lists.sourceforge.net">Flightgear-devel@lists.sourceforge.net</a><br>
 <a href="https://lists.sourceforge.net/lists/listinfo/flightgear-devel" \
target="_blank">https://lists.sourceforge.net/lists/listinfo/flightgear-devel</a><br> \
<br></blockquote></div><br></div>



------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk

_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic