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

feat: add OM navigation in the backend #11

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

shiipou
Copy link

@shiipou shiipou commented Dec 23, 2022

You'll probably need to use the OM database to get the OM coordinates of the container you use and pass it to the backend using the args I add in this PR. EDIT: done

Tell me if anything seems wrong in this PR, I'm not a mathematician so it can be wrong.

I suggest you to do some refactor to split the backend.py in multiples files for better readability. It's never a good choice to use a god-file that contain everything.

I also suggest you to add some tests using value of your database, if you know X,Y,Z coordinates and can calculate OM distance, etc... you can easily test this function using your database and transformation functions.

backend.py Outdated Show resolved Hide resolved
l = 2*(z3 - z2)

# Solve for x, y, and z using Cramers Rule
x = (e*l*b - f*k*b - e*i*c + f*h*c + d*k*c - d*l*a) / (d*k*i - d*l*h - e*j*i + e*l*g + f*j*h - f*k*g)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems I got divide by zero error here.

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

Successfully merging this pull request may close these issues.

1 participant