Initialize on /sim/signals/fdm-initialized instead of /sim/signals/nasal-dir-initialized. This happens later on, and ensure we have a valid /sim/time/delta-sec value for the filters.
This commit is contained in:
parent
c78327ee21
commit
b703e21db9
1 changed files with 4 additions and 4 deletions
|
@ -31,9 +31,9 @@ var run = func {
|
||||||
GCurrent = getprop("/accelerations/pilot-g[0]");
|
GCurrent = getprop("/accelerations/pilot-g[0]");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GCurrent == nil)
|
if (GCurrent == nil)
|
||||||
{
|
{
|
||||||
GCurrent = 1.0;
|
GCurrent = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Updated the GDamped using a filter.
|
# Updated the GDamped using a filter.
|
||||||
|
@ -114,7 +114,7 @@ var check_params = func() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_setlistener("/sim/signals/nasal-dir-initialized",
|
_setlistener("/sim/signals/fdm-initialized",
|
||||||
func {
|
func {
|
||||||
fdm = getprop("/sim/flight-model");
|
fdm = getprop("/sim/flight-model");
|
||||||
check_params();
|
check_params();
|
||||||
|
|
Loading…
Add table
Reference in a new issue