lemmingapex / trilateration

Solves a formulation of n-D space trilateration problem using a nonlinear least squares optimizer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Port to C

Triuman opened this issue · comments

Hi @lemmingapex, I need to use this in C. I checked to see whether I can port it to C but I couldn't find the functions you use with "commons-math". What I saw is only the interface for LeastSquaresOptimizer. Can you please provide link for the functions you used in the project?

Great work. Thank you very much.

This trilateration library only depends on apache commons math. If you find a port of apache commons math: https://github.com/Fylax/Apache-Commons-Math3-C- then it should easy to translate this library into c. Make sense?

Yeah but I could not find a C port. I understand C# better than Java. So I will see if I can port the necessary functions to C from C#.

Ha! Sorry, I didn't look closely at that Fylax library. Didn't realize it was C#. I see your issue now.

My 50 seconds of googling didn't turn much up for a apache commons math c port. The Levenberg–Marquardt algorithm is the key algorithm trilateration utilizes. Is there a library that has an implementation of LMA that might work for you?

http://www.alglib.net/optimization/levenbergmarquardt.php

Ok I will dig into that. Thank you.

Hello,

I am also actively looking for C/C++ implementation of multilateration using Levenberg–Marquardt algorithm. This project in java works really great!

Thank you for pointing the alglib option.

I also tried multilateration approach built in into IT++ library but it is super straightforward and does not handle the noise at all.

If anybody comes across full C++ implementation I would appreciate it a lot if he notifies us here. Thank you :)

Ok I will dig into that. Thank you.

hello,do you do it with c port? I am also use this in C.

Hello,

I am also actively looking for C/C++ implementation of multilateration using Levenberg–Marquardt algorithm. This project in java works really great!

Thank you for pointing the alglib option.

I also tried multilateration approach built in into IT++ library but it is super straightforward and does not handle the noise at all.

If anybody comes across full C++ implementation I would appreciate it a lot if he notifies us here. Thank you :)

Hi!

I agree that this project works great and also searched for c++ equivalent unfortunately couldn't find one. Did you manage to find any?
I've been exeperimenting with google's ceres-solver and eigen's LM library but the pieces are just not falling in the right place. For some inputs I get good results, almost to all the tests in this lib, but for real life data I'm having issues and this java lib has very good results. I understand how it works so now I will have to understand the c++ part as well in order to port but it's more different how you use it.

Not quite the same, but here's a trilateration solver in C++

https://github.com/Wayne82/Trilateration

If compiling for Arduino you'll need these too:

Eigen C++ - http://eigen.tuxfamily.org/index.php?title=Main_Page

StandardCplusplus - https://github.com/maniacbug/StandardCplusplus

Not quite the same, but here's a trilateration solver in C++

https://github.com/Wayne82/Trilateration

If compiling for Arduino you'll need these too:

Eigen C++ - http://eigen.tuxfamily.org/index.php?title=Main_Page

StandardCplusplus - https://github.com/maniacbug/StandardCplusplus

Oh yes I saw this, but it is just simply the linear solution which is not good enough.
Thanks for the reply though!