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

How the yaw value is calculated? #460

Open
SuhaibMaraqa opened this issue Sep 4, 2023 · 5 comments
Open

How the yaw value is calculated? #460

SuhaibMaraqa opened this issue Sep 4, 2023 · 5 comments

Comments

@SuhaibMaraqa
Copy link

I have a drone 360 images that I display with the marzipano viewer, when the yaw is 0 the image should be looking exactly to the north, but it's not the case as it might be looking the any of the four directions. So how does the yaw value get calculated in the marzipano viewer?

@jordyno
Copy link
Contributor

jordyno commented Sep 4, 2023

Marzipano is not aware of the panorama's orientation other then yaw 0 being exactly center of the equirectangular image. That is, if you have your source image 12 000 px wide, your yaw 0 will be at pixel 6000 on the x axis. In order for this to be actual North, you need to stitich your panorama in a way, that the center of your stitched equirect image will be at the actual North.

@SuhaibMaraqa
Copy link
Author

SuhaibMaraqa commented Sep 5, 2023

Okay I see, if I have the metadata of the image, like the drone yaw of the image coordinate. Can I calculate the north degree in Marzipano? @jordyno

@jordyno
Copy link
Contributor

jordyno commented Sep 5, 2023

I am not aware of metadata storing the drone yaw. What drone are you using? Normally there are only GPS position and altitude available and you need to find the North yaw manually.
For these calculations though you can use RectilinearView#screenToCoordinates or RectilinearView#coordinatesToScreen.

@SuhaibMaraqa
Copy link
Author

I use the Mavic3, this is a snippet of the metadata I can use,
GPS Position:
GPS Altitude:
Gimbal Yaw Degree : -172.30
Flight Yaw Degree : -162.20
can I use these values to calculate the north?
I couldn't get how to use RectilinearView#screenToCoordinates or RectilinearView#coordinatesToScreen with these values

@jordyno
Copy link
Contributor

jordyno commented Sep 7, 2023

Oh, maybe you mean the flight log, not the image metadata? The flight yaw changes by each column of images as the panorama is taken, so it's a bit tricky.

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

2 participants