Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayitzin committed Nov 30, 2023
2 parents 163112c + 084ed62 commit 761ff0e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ahrs/filters/flae.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,9 +512,10 @@ def estimate(self, acc: np.ndarray, mag: np.ndarray, method: str = 'symbolic') -
t2 = -8*np.linalg.det(H.T)
t3 = np.linalg.det(W)
if method.lower() == 'newton':
lam = lam_old = 1.0
lam = 1.0
lam_old = 0.0
i = 0
while abs(lam_old-lam) > 1e-8 or i <= 30:
while abs(lam_old-lam) > 1e-8 and i < 6:
lam_old = lam
f = lam**4 + t1*lam**2 + t2*lam + t3 # (eq. 48)
fp = 4*lam**3 + 2*t1*lam + t2 # (eq. 50)
Expand Down

0 comments on commit 761ff0e

Please sign in to comment.