Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Singular matrix With your code #8

Open
tejastank opened this issue Apr 8, 2020 · 1 comment
Open

Singular matrix With your code #8

tejastank opened this issue Apr 8, 2020 · 1 comment

Comments

@tejastank
Copy link

Traceback (most recent call last):
File "RSSI_Localizer.py", line 269, in
p = o.getNodePosition([4, 2 , 3])
File "RSSI_Localizer.py", line 235, in getNodePosition
position = self.computePosition(a, b)
File "RSSI_Localizer.py", line 210, in computePosition
inv_at_a = numpy.linalg.inv(at_a)
File "/usr/lib/python3/dist-packages/numpy/linalg/linalg.py", line 513, in inv
ainv = _umath_linalg.inv(a, signature=signature, extobj=extobj)
File "/usr/lib/python3/dist-packages/numpy/linalg/linalg.py", line 90, in _raise_linalgerror_singular
raise LinAlgError("Singular matrix")
numpy.linalg.linalg.LinAlgError: Singular matrix

Default your code when try to run

accessPoints = [{
'signalAttenuation': 3,
'location': {
'y': 1,
'x': 1
},
'reference': {
'distance': 4,
'signal': -50
},
'name': 'dd-wrt'
},
{
'signalAttenuation': 4,
'location': {
'y': 1,
'x': 7
},
'reference': {
'distance': 3,
'signal': -41
},
'name': 'ucrwpa'
}]

print(accessPoints)
o = RSSI_Localizer(accessPoints)
p = o.getNodePosition([4, 2 , 3])

@jvillagomez
Copy link
Owner

Hi @tejastank., allow me to investigate what is going on here. Will report shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants