fixed INS when no GPS fix

This commit is contained in:
Djeeberjr 2023-08-05 11:42:15 +02:00
parent 0540cc465a
commit 44772557ba

View File

@ -69,8 +69,9 @@ class INS {
} }
private static function move(dir:Null<Pos3>) { private static function move(dir:Null<Pos3>) {
Log.debug('INS move: $dir');
var pos = GPS.getPosition(); var pos = GPS.getPosition();
if (pos == null || dir == null)
return;
var newPos = pos + dir; var newPos = pos + dir;
GPS.setINSPosition(newPos); GPS.setINSPosition(newPos);
} }