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

List:       flightgear-devel
Subject:    Re: [Flightgear-devel] FG1000 ADF/DME option
From:       Stuart Buchanan <stuart13 () gmail ! com>
Date:       2023-07-31 18:43:41
Message-ID: CAP3ntyto7324GgJ1DT+OJue2x8poo5-wFwW=jG3Y-ftcjLu1fQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Dany,

On Mon, Jul 31, 2023 at 4:29 PM Dany wrote:

> Le 31/07/2023 à 17:09, Dany a écrit :
> > Hi Stuart,
> >
> > (if I understand your code well)
> >
> > The adf/indicated-bearing-deg movement is jerky (once every 0.5 sec),
> > declared as "obj._periodicPublisher". Which is unpleasant.
> >
> > I think declaring it as "obj._triggeredPublisher" would be much better.
> >
>
> I don't know.... I notice that even this one change is very detrimental
> to the fps....


Yes.  That's because with the _triggeredPublisher every time the underlying
ADF property changes (which will be every frame), the listener will be
triggered, a message passed through Emesary and then an update to the BRG
made.  That's quite expensive, so we use the _periodicPublisher for
properties that will change frequently, which reads a whole set of
properties at once every 0.5s.

As you can see, there's a balance here because we need to minimize the
impact of the FG1000 while keeping it sufficiently responsive.  It would be
straightforward to make the periodic publishing frequency configurable
in-sim if you wanted to do so.

IIRC the real G1000 updates at 30Hz.  I think we do pretty well simulating
it within the constraints we have.

-Stuart

[Attachment #5 (text/html)]

<div dir="ltr"><div dir="ltr">Hi Dany,</div><br><div class="gmail_quote"><div \
dir="ltr" class="gmail_attr">On Mon, Jul 31, 2023 at 4:29 PM Dany \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Le 31/07/2023 Ã  \
17:09, Dany a écrit  :<br> &gt; Hi Stuart,<br>
&gt;<br>
&gt; (if I understand your code well)<br>
&gt;<br>
&gt; The adf/indicated-bearing-deg movement is jerky (once every 0.5 sec), <br>
&gt; declared as &quot;obj._periodicPublisher&quot;. Which is unpleasant.<br>
&gt;<br>
&gt; I think declaring it as &quot;obj._triggeredPublisher&quot; would be much \
better.<br> &gt;<br>
<br>
I don&#39;t know.... I notice that even this one change is very detrimental <br>
to the fps....</blockquote><div><br></div><div>Yes.   That&#39;s because with the \
_triggeredPublisher every time the underlying ADF property changes (which will be \
every frame), the listener will be triggered, a message passed through Emesary and \
then an update to the BRG made.   That&#39;s quite expensive, so we use the \
_periodicPublisher for properties that will change frequently, which reads a whole \
set of properties at once every 0.5s.</div><div><br></div><div>As you can see, \
there&#39;s a balance here because we need to minimize the impact of the FG1000 while \
keeping it sufficiently responsive.   It would be straightforward to make the \
periodic publishing frequency configurable in-sim if you wanted to do so.    \
</div><div><br></div><div>IIRC the real G1000 updates at 30Hz.   I think we do pretty \
well simulating it within the constraints we \
have.</div><div><br></div><div>-Stuart</div><div><br></div><div>  </div></div></div>





_______________________________________________
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