Beispiel #1
0
    def estUpdate(self):
        period = manage.now - self.__lastUpdateTime

        correctionNeeded = self.__amortizer.correctionNeeded()
        self.setPos(self.__lastKnownPos + (self.__lastPosDelta * period) +
                    self.__posCorrector.getCorrection(correctionNeeded))

        corPtr = positions.getCorrection(self.__attitudes, period)
        if bool(corPtr) is not False:
            cor = corPtr.contents
            self.setAttitude(Quaternion(cor.w, cor.x, cor.y, cor.z))
        mesh.updateCollider(self.getId(), self._pos, self._attitude)
Beispiel #2
0
 def update(self):
     #if self.getId()[0]%2==1:
     #    return
     timeDiff = self._getTimeDiff()
     (zenithVector, noseVector) = self._getVectors()
     self._updateVelFromControls(timeDiff, noseVector)
     self._updateFromEnv(timeDiff, zenithVector, noseVector)
     self.__pendingElevatorAdjustment = 0.0  #reset the pending pitch adjustemnt
     self.__pendingAileronAdjustment = 0.0  #reset the pending roll adjustment
     self._updatePos(timeDiff)
     mesh.updateCollider(self.getId(), self._pos, self._attitude)
     self.printDetails()
Beispiel #3
0
 def update(self):
     #if self.getId()[0]%2==1:
     #    return
     timeDiff=self._getTimeDiff()
     (zenithVector, noseVector)=self._getVectors()
     self._updateVelFromControls(timeDiff, noseVector)
     self._updateFromEnv(timeDiff, zenithVector, noseVector)
     self.__pendingElevatorAdjustment = 0.0 #reset the pending pitch adjustemnt
     self.__pendingAileronAdjustment = 0.0  #reset the pending roll adjustment
     self._updatePos(timeDiff)
     mesh.updateCollider(self.getId(), self._pos, self._attitude)
     self.printDetails()
Beispiel #4
0
    def estUpdate(self):
        period=manage.now-self.__lastUpdateTime

        correctionNeeded=self.__amortizer.correctionNeeded();
        self.setPos(self.__lastKnownPos+(self.__lastPosDelta*period)
                    +self.__posCorrector.getCorrection(correctionNeeded))

        corPtr=positions.getCorrection(self.__attitudes, period)
        if bool(corPtr) is not False:
            cor=corPtr.contents
            self.setAttitude(Quaternion(cor.w, cor.x, cor.y, cor.z));
        mesh.updateCollider(self.getId(), self._pos, self._attitude)
Beispiel #5
0
 def update(self):
     timeDiff = self._getTimeDiff()
     (zenithVector, noseVector) = self._getVectors()
     self._updateFromEnv(timeDiff, zenithVector, noseVector)
     self._updatePos(timeDiff)
     mesh.updateCollider(ident, self.getPos(), self.getAttitude())
Beispiel #6
0
 def update(self):
     timeDiff=self._getTimeDiff()
     (zenithVector, noseVector)=self._getVectors()
     self._updateFromEnv(timeDiff, zenithVector, noseVector)
     self._updatePos(timeDiff)
     mesh.updateCollider(ident, self.getPos(), self.getAttitude())