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

The range of latitude angle #1

Open
ziye3001 opened this issue Feb 22, 2020 · 1 comment
Open

The range of latitude angle #1

ziye3001 opened this issue Feb 22, 2020 · 1 comment

Comments

@ziye3001
Copy link

Hi Philippe,
I just tried to use your code for spherical data interpolation and it worked very well! While I was trying to figure out which coordinate system is being used, it occured to me that the range of your altitude angle is between [-90,90]. However, in your __polar_to_cartesianfunction, you use
z = r * np.cos(lat)
that means, the z-coordinate is always positive? I'm not sure if this will affect the result.

Thank you very much!

@TillLeiden
Copy link

TillLeiden commented May 29, 2020

I think Ziye is right.
The __polar_to_Cartesian function calculates from spherical to cartesian coordinates, but you use longitude and latitude, where latitude has an offset of np.pi/2 to the polar angle. This means also the x and y values are not correct.

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