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

Input as cartesians? #1

Closed
JulianSchuette opened this issue Oct 16, 2015 · 7 comments
Closed

Input as cartesians? #1

JulianSchuette opened this issue Oct 16, 2015 · 7 comments

Comments

@JulianSchuette
Copy link

Hi,

just to make sure, I assume TrilaterationFunction expects the position argument to be in cartesian coordinates, not in lat/lon or anything else?

Cheers,
Julian

@lemmingapex
Copy link
Owner

Julian,

Yes, you are correct. Positions should be valid cartesian coordinates. In full: Inputs identified as tuples (lists) of n real numbers should exist in a euclidean space of dimension n.

If you are using lat/lon, you will need to convert to a cartesian coordinate system. Depending on the range of latitudes and longitudes inputs, and the desired accuracy, you will want to be cognisant of this conversion.

If accuracy is not a concern, you can model the earth as a sphere:
http://stackoverflow.com/questions/1185408/converting-from-longitude-latitude-to-cartesian-coordinates/1185413#1185413

If you have large lat/lon ranges or you are using an ellipsoid model of the earth (like WGS-84), you will want to look into solutions that account for this.

Does this answer your question?

  • Scott

@JulianSchuette
Copy link
Author

Perfect, Scott. Thanks a lot.
I am using pretty small lat/lon scales (<100m) and can accept minor conversion errors, so I will go the simple route first.

Cheers.

@kliewkliew
Copy link

Using the linked SO equations, the input positions would be composed of x and y (throwing away z)?

@lemmingapex
Copy link
Owner

Why would you throw away z?

@kliewkliew
Copy link

The positions are arrays of two doubles but there are three axes in the SO answer. I don't understand how to coerce the SO answer into the required input positions.

@kliewkliew
Copy link

Thanks! Much appreciated

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

3 participants