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

Port to C #19

Open
Triuman opened this issue Jan 6, 2018 · 9 comments
Open

Port to C #19

Triuman opened this issue Jan 6, 2018 · 9 comments

Comments

@Triuman
Copy link

Triuman commented Jan 6, 2018

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.

@lemmingapex
Copy link
Owner

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?

@Triuman
Copy link
Author

Triuman commented Jan 8, 2018

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

@lemmingapex
Copy link
Owner

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

@Triuman
Copy link
Author

Triuman commented Jan 8, 2018

Ok I will dig into that. Thank you.

@MGasztold
Copy link

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

@xixilight
Copy link

Ok I will dig into that. Thank you.

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

@bartfer
Copy link

bartfer commented Dec 16, 2020

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.

@bleckers
Copy link

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

@bartfer
Copy link

bartfer commented Dec 17, 2020

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!

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

6 participants