Merge pull request #70 from merspieler/master
Applied fixes to autopush
This commit is contained in:
commit
2bdb70c600
2 changed files with 3 additions and 3 deletions
|
@ -42,7 +42,7 @@ var _loop = func() {
|
|||
var time = getprop("/sim/time/elapsed-sec");
|
||||
var prop = math.min(math.max(_K_p * deltaV, -_F_p), _F_p);
|
||||
var speedup = getprop("/sim/speed-up");
|
||||
var deriv = 0;
|
||||
var deriv = 0.0;
|
||||
dt = time - _time;
|
||||
# XXX Sanitising dt. Smaller chance of freakout on lag spike.
|
||||
if(dt > 0.0) {
|
||||
|
@ -50,7 +50,7 @@ var _loop = func() {
|
|||
_int = math.min(math.max(_int + _K_i * dV * dt, -_F_i), _F_i);
|
||||
}
|
||||
if(dt > 0.002) {
|
||||
var deriv = math.min(math.max(_K_d * dV / dt, -_F_d), _F_d);
|
||||
deriv = math.min(math.max(_K_d * dV / dt, -_F_d), _F_d);
|
||||
}
|
||||
}
|
||||
var accel = prop + _int + deriv;
|
||||
|
|
|
@ -34,7 +34,7 @@ var _loop = func() {
|
|||
D *= NM2M;
|
||||
# FIXME Use _K_V and total remaining distance.
|
||||
var V = _F_V;
|
||||
if ((D < _D_min) or (abs(geo.normdeg180(A - psi) > 90.0))) {
|
||||
if ((D < _D_min) or (abs(geo.normdeg180(A - psi) > 45.0))) {
|
||||
_to_wp += 1;
|
||||
if (_to_wp == size(_route)) {
|
||||
_done();
|
||||
|
|
Reference in a new issue