H3C HEALPix library for PostgreSQL  (version 1.2)
h3c_math.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2012 Gilles Landais (CDS)
3 
4  Author: Gilles Landais, Strasbourg astronomical Data Center (CDS)
5  Email: gilles.landais@unistra.fr
6 
7  This file is part of H3C.
8 
9  H3C is free software; you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation; either version 2 of the License, or
12  (at your option) any later version.
13 
14  H3C is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with H3C; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23 
29 typedef double _h3c_vector[3];
30 
31 void h3c_2xyz(double lon, double lat, _h3c_vector vect);
32 void h3c_2radec(double *in, h3c_coord_t *out);
33 void h3c_vect_prod(_h3c_vector v1, _h3c_vector v2, _h3c_vector r);
34 double h3c_scalar_product(_h3c_vector v1, _h3c_vector v2);
35 void h3c_normalize(_h3c_vector u);
36 double h3c_vect_length(_h3c_vector v);
37 void h3c_unit_vector(double z, double phi, _h3c_vector res);
38 
h3c_normalize
void h3c_normalize(_h3c_vector u)
normalize in the united vector
Definition: h3c_math.c:101
h3c_2radec
void h3c_2radec(double *in, h3c_coord_t *out)
cartesian to polar
Definition: h3c_math.c:53
h3c_scalar_product
double h3c_scalar_product(_h3c_vector v1, _h3c_vector v2)
scalar product
Definition: h3c_math.c:92
h3c_vect_prod
void h3c_vect_prod(_h3c_vector v1, _h3c_vector v2, _h3c_vector r)
vectorial product
Definition: h3c_math.c:79
h3c_unit_vector
void h3c_unit_vector(double z, double phi, _h3c_vector res)
create a unit vector from a z coordinate and an azimuthal angle.
Definition: h3c_math.c:125
h3c_2xyz
void h3c_2xyz(double lon, double lat, _h3c_vector vect)
compute coord in cartesian
Definition: h3c_math.c:39
h3c_vect_length
double h3c_vect_length(_h3c_vector v)
get the length of a vector
Definition: h3c_math.c:114