Comments (6)
Aha!
It seems to only happen when using a third position (altitude) in the Positions array. When you remove this it calculates both of these just fine.
Creating a separate function to calculate the error with only a two element position (lat/lng) allows you to calculate this just fine.
from trilateration.
Hi Blair,
I have seen this exception before when requesting the error information. It likely means that this information is meaningless.
When you request sigma, the covariance of the Jacobian matrix is determined in a QRDecomposition. The double threshold argument you provide to getSigma is a way for the caller to specify that the result of this computation should be considered meaningless, and thus trigger an exception. In your above example, change optimum.getSigma(0); and optimum.getCovariances(0); to optimum.getSigma(-1); and optimum.getCovariances(-1); respectively. This will likely cause you to obtain NaN entries in your results. Meaningless, right?
Do you think if the above information was better documented, this would avoid confusion in the future? What do you think?
Thanks,
Scott
from trilateration.
I think a brief explanation in the readme on the threshold value and an example on how to handle a meaningless result/exception should suffice. It just threw me because the optimum was calculated just fine.
from trilateration.
@bleckers, I put a short comment in the README. Take a look, let me know what you think. Can I close this issue?
from trilateration.
Maybe something about what input variables might constitute a SingularMatrixException? Most people will be using this library without going into detail about the maths involved and it would be useful to know when they might experience the error (like for example above when using a 3D coordinate space).
from trilateration.
Everything related to SingularMatrixException is well documented in apache's docs:
https://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math3/fitting/leastsquares/LeastSquaresProblem.Evaluation.html#getSigma(double)
Users looking to find out more about how these methods should look there.
from trilateration.
Related Issues (20)
- Odd behaviour when "triangulating" using two beacons. HOT 2
- Excepted output of the example HOT 1
- Little Doubt HOT 2
- How to get ellipse from trilateration? HOT 6
- Trilateration package with DWM1000 HOT 6
- Packaged JAR file for Processing HOT 2
- How do i get coordinate of esclipe's point HOT 4
- Getting error rate HOT 5
- Port to C HOT 9
- Swift/Objective-C version? HOT 1
- How to determine the accuracy of the coordinate HOT 1
- What are the positions for? HOT 3
- which is better for residuals define?
- Is "weighted" nonlinear least squares fitting possible? HOT 1
- Incompatibles type LevenbergMarquardtOptimizer cannot be converted to LeastSquaresOptimizer NonLinearLeastSquaresSolver HOT 2
- Not issue, just question about accuracy HOT 1
- How to use it in R³ localization? HOT 2
- Question about distances HOT 7
- Possibility to use relative distances HOT 2
- How to do that with multi-processing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trilateration.