Skip to content
Snippets Groups Projects
Commit b7f634d2 authored by Olivier Bertrand's avatar Olivier Bertrand
Browse files

correct spherical to cartesians

parent 65766f17
No related branches found
No related tags found
No related merge requests found
......@@ -18,12 +18,9 @@ def cartesian_to_spherical(x, y, z):
def spherical_to_cartesian(elevation, azimuth, radius=1):
cartesian = np.zeros_like(elevation)
cartesian = np.tile(cartesian[..., np.newaxis], (3,))
x = np.cos(elevation) * np.cos(azimuth)
y = np.cos(elevation) * np.sin(azimuth)
z = np.sin(elevation)
cartesian = radius * cartesian
x = radius*np.cos(elevation) * np.cos(azimuth)
y = radius*np.cos(elevation) * np.sin(azimuth)
z = radius*np.sin(elevation)
return x, y, z
......
......@@ -65,8 +65,7 @@ setup_dict = {'name': 'navipy',
'Pillow',
'tables',
'nbsphinx',
'opencv-python',
'coverage'],
'opencv-python'],
'package_data': {'navipy':
package_data_files("navipy")},
'include_package_data': True,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment