This query function converts given spherical coordinates to cartesian coordinates. The coordinate system uses z as the up-axis and measures the azimuthal angle from the x-axis.
This query function is not yet available, but expected to be released in a future version of Humio.
|string||false||_spherical2cartesian||Output prefix of fields to set with suffixes |
|string||true||Azimuthal angle measured from the x-axis.|
|number||true||Polar angle measured from the xy-plane.|
|string||true||1.0||Radius of the sphere.|
math:spherical2cartesian() query function
requires three parameters: the azimuth, the polar, and the radius. If no
radius is specified, a radius of 1.0 is used.
If the polar angle is set to 90 degrees, the returned coordinates will be (0.0, 0.0, 1.0). If both polar and azimuthal angles are set to 0, the returned coordinates will be (1.0, 0.0, 0.0).
For geographical coordinates, the azimuth corresponds to longitude and the polar angle to latitude. To convert from geographical coordinates to the cartesian coordinates of the point on the unit-sphere, you would enter a query into Humio like the one below:
lat := 90.0 | lon := 0.0 | math:spherical2cartesian(azimuth=lon, polar=lat, radius = 1.0, as=p)
The results will be in the fields