Baseline bug fix

LT1AB
sssangha 2020-06-03 17:24:09 -07:00
parent 7db07f3768
commit 87cffaaadd
2 changed files with 4 additions and 0 deletions

View File

@ -77,6 +77,8 @@ def runComputeBaseline(self):
mxyz = np.array(masterSV.getPosition())
mvel = np.array(masterSV.getVelocity())
sxyz = np.array(slaveSV.getPosition())
mvelunit = mvel / np.linalg.norm(mvel)
sxyz = sxyz - np.dot ( sxyz-mxyz, mvelunit) * mvelunit
aa = np.linalg.norm(sxyz-mxyz)
costheta = (rng*rng + aa*aa - slvrng*slvrng)/(2.*rng*aa)

View File

@ -103,6 +103,8 @@ class Baseline(Component):
mxyz = np.array(masterSV.getPosition())
mvel = np.array(masterSV.getVelocity())
sxyz = np.array(slaveSV.getPosition())
mvelunit = mvel / np.linalg.norm(mvel)
sxyz = sxyz - np.dot ( sxyz-mxyz, mvelunit) * mvelunit
aa = np.linalg.norm(sxyz-mxyz)