cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

convert coordinate system

Hello, 

I have searched the internet and this forum for a quick and resource-efficeint way to do this but I cant find anything. Essentailly I want to convert an array of 3D data in spherical coordinates to an array of 3D data in different spherical coordinates. There seems to be a way to convert between spherical and XYZ, but not from one spherical to another spherical.

The input data set is like this

 

Phi | Theta  |  dBi

0        -180        x

0        -179        x

.             .           x

180    180        x

 

and how I want to convert it should look like this:

 

Azimuth | Tilt  |   dBi

0              -90         x

0              -89         x

.                  .           x

360         90          x

 

Thanks

0 kudos
Mensaje 1 de 23
5.619 Vistas

What are the conversion rules?

0 kudos
Mensaje 2 de 23
5.610 Vistas

What do you mean by rules? The format that I am ultimately trying to get is 3D Atoll format for Forsk's Atoll software.

0 kudos
Mensaje 3 de 23
5.604 Vistas

Well, you only have 2 coordinates, so doing 3D is a bit difficult. 😄 Are you just dealing with directions, ignoring distances and rotations around the vector?

 

The first coordinate seems to convert 0...180 to 0..360 so a simple multiplication by two would do it.

The second coordinate seems to covert -180..180 to -90..90, so a simple division by two would work.

I don't know the meaning of x in your table.

 

Your need to clarify your problem. I am not familiar with the 2D atoll format. Do you have a website link?

What is the coordinate system before conversion (e.g. euler angles, etc.).

0 kudos
Mensaje 4 de 23
5.580 Vistas

Hi,

   Just a guess:

 

Tilt = Phi - 90

Azimuth = Theta + 180

0 kudos
Mensaje 5 de 23
5.559 Vistas

Sounds to me that you may be talking about Rotation Matrices or Rotation Vectors.  Given an orientation of a Cartesian coordinate system (given by theta1 and phi1) and another orientation (given by theta2 and phi2), there is a (unique) single rotation (theta3, phi3) that can take the first coordinate system into the second.  Put another way, you can get from one orientation by a rotation about a single axis.

 

Does this sound like what you are trying to do?

 

BS

0 kudos
Mensaje 6 de 23
5.537 Vistas

Actually, since its spherical coordinates, it is 3D. The files I am working with are antenna pattern files which are ususally measured in spherical coordinates (2 axis of rotation), commonly called 4-pi steradians. The problem I'm having is I need to basically re-label the columns and have the pattern data match the new location so that it is still an antenna pattern and not random junk. The first column, phi, goes from 0 to 180. At each phi, the is an entire theta set going from -180 to +180, Thats how it can be 3D with only 2 coordinates. I have included a picture of the anechoic chamber's coordinate system for reference.

 

What I want to do is instead of going phi 0 - 180 with each theta going -180 - +180, is phi 0 - 360 with each theta going -90 - +90. 

 

x is a place holder for the antennas gain in dBi.

 

I have also attached sample files of data.

 

Hopefully I havn't fully confused everyone, Spherical coordinates are a hard thing.

Descargar todos
0 kudos
Mensaje 7 de 23
5.500 Vistas

You clearly do not understand Spherical Polar Coordinates.  The thing that makes it 3D is that the third component is Radius, which in your context is a constant, 1.  

 

Assume a Cartesian (X-Y-Z) coordinate system oriented using the usual Right Hand Rule convention (make the XY plane horizontal, with X "forward", Y "to the left", and Z "up", so that if you curl your right hand fingers as though moving the X axis into the Y axis, your thumb points to the Z axis.  Consider a point on the surface of the unit sphere (this takes only 2 coordinates, as we've "frozen" the radius).  Project it onto the XY plane and onto the Z axis.  What you call Theta is the angle that the component projected onto the XY plane makes with the X axis, and what you call Phi is the angle it makes with the +Z axis (actually, you don't have to define it this way, but this is the "usual" definition).

 

An easy way to see how these angles arise is to consider what you need to do to place the +Z axis on an arbitrary point on the surface of a sphere.  Let's pretend it's a Globe, and describe this point by "Latitude" (a circle parallel to the equator) and "Longitude" (great circles that pass through both poles).  Let's begin by rotating about the Y axis (using the right-hand rule, so a small rotation will yield a +X component) until our Latitude is correct.  Now rotate about the Z axis until you are at the right longitude.

 

Rotations about the X-Y-Z coordinate axes are simple matrix transformations, and a Y rotation followed by a Z rotation is a simple matrix multiplication.  Just Do the Math, it's really very simple.

 

BS

0 kudos
Mensaje 8 de 23
5.458 Vistas

Hi,

   Here is my second try. I'm going to call the old coordinates (p, t) and the new coordinates (p', t'). Your goal is to find a map from (p, t) to (p', t'), that preserves distances. In other words the distance between any two points in the (p, t) domain is the same as the distance between the two points which result from applying the map into the (p', t') domain. I think it has to be a piecewise map.

 

(0 < p < 180) && (-90 < t < 90)

p' = p

t' = t

 

(0 < p < 180) && (-180 < t < -90)

p' = p + 180

t' = -(t + 180)

 

(0 < p < 180) && (90 < t < 180)

p' = p + 180

t' = 180 - t

 

It's not that straightforward, at least to me. Its possible I mixed up the theta direction for the last two. I'll try to check at some point. Attached is the vi for converting, a screenshot and your "original example" after conversion. See if it works for you 😉

Descargar todos
0 kudos
Mensaje 9 de 23
5.430 Vistas

Here is the data...

0 kudos
Mensaje 10 de 23
5.426 Vistas