trilateration icon indicating copy to clipboard operation
trilateration copied to clipboard

Port to C

Open Triuman opened this issue 7 years ago • 9 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.

Triuman avatar Jan 06 '18 09:01 Triuman

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?

lemmingapex avatar Jan 08 '18 17:01 lemmingapex

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#.

Triuman avatar Jan 08 '18 18:01 Triuman

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

lemmingapex avatar Jan 08 '18 18:01 lemmingapex

Ok I will dig into that. Thank you.

Triuman avatar Jan 08 '18 18:01 Triuman

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 :)

MGasztold avatar Jan 31 '18 12:01 MGasztold

Ok I will dig into that. Thank you.

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

xixilight avatar Jul 29 '19 02:07 xixilight

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.

bartfer avatar Dec 16 '20 16:12 bartfer

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

bleckers avatar Dec 17 '20 03:12 bleckers

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!

bartfer avatar Dec 17 '20 08:12 bartfer