Merge branch 'next' of git://gitorious.org/fg/flightgear into next
This commit is contained in:
commit
929ef66fc8
3 changed files with 20 additions and 3 deletions
|
@ -265,9 +265,14 @@ void ExponentialFilterImplementation::initialize( double output )
|
|||
double ExponentialFilterImplementation::compute( double dt, double input )
|
||||
{
|
||||
input = GainFilterImplementation::compute( dt, input );
|
||||
double tf = _TfInput.get_value();
|
||||
|
||||
double output_0;
|
||||
double alpha = 1 / ((_TfInput.get_value()/dt) + 1);
|
||||
|
||||
// avoid negative filter times
|
||||
// and div by zero if -tf == dt
|
||||
|
||||
double alpha = tf > 0.0 ? 1 / ((tf/dt) + 1) : 1.0;
|
||||
|
||||
if(_isSecondOrder) {
|
||||
output_0 = alpha * alpha * input +
|
||||
|
|
|
@ -84,7 +84,7 @@ void TimeManager::init()
|
|||
|
||||
// frame/update-rate counters
|
||||
_frameRate = fgGetNode("/sim/frame-rate", true);
|
||||
_lastFrameTime = _impl->get_cur_time();
|
||||
_lastFrameTime = 0;
|
||||
_frameCount = 0;
|
||||
}
|
||||
|
||||
|
@ -97,6 +97,7 @@ void TimeManager::reinit()
|
|||
{
|
||||
globals->set_time_params(NULL);
|
||||
delete _impl;
|
||||
_impl = NULL;
|
||||
_inited = false;
|
||||
globals->get_event_mgr()->removeTask("updateLocalTime");
|
||||
|
||||
|
@ -119,6 +120,12 @@ void TimeManager::computeTimeDeltas(double& simDt, double& realDt)
|
|||
if (!wait_for_scenery) {
|
||||
throttleUpdateRate();
|
||||
}
|
||||
else
|
||||
{
|
||||
// suppress framerate while initial scenery isn't loaded yet (splash screen still active)
|
||||
_lastFrameTime=0;
|
||||
_frameCount = 0;
|
||||
}
|
||||
|
||||
SGTimeStamp currentStamp;
|
||||
currentStamp.stamp();
|
||||
|
@ -205,7 +212,7 @@ void TimeManager::update(double dt)
|
|||
void TimeManager::computeFrameRate()
|
||||
{
|
||||
// Calculate frame rate average
|
||||
if ((_impl->get_cur_time() != _lastFrameTime) && (_lastFrameTime > 0)) {
|
||||
if ((_impl->get_cur_time() != _lastFrameTime)) {
|
||||
_frameRate->setIntValue(_frameCount);
|
||||
_frameCount = 0;
|
||||
}
|
||||
|
|
5
utils/xmlgrep/.gitignore
vendored
Normal file
5
utils/xmlgrep/.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
generic_protocol_analyse
|
||||
printtree
|
||||
printxml
|
||||
testxml
|
||||
xmlgrep
|
Loading…
Add table
Reference in a new issue