FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Aether/include/transform.h at develop · AetherModel/Aether · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
AetherModel
/
Aether
Public
Notifications
You must be signed in to change notification settings
Fork
31
Star
25
Code
Issues
21
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
Aether
/
include
/
transform.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
73 lines (57 loc) · 2.92 KB
Breadcrumbs
Aether
/
include
/
transform.h
Copy path
File metadata and controls
73 lines (57 loc) · 2.92 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//
Copyright 2020, the Aether Development Team (see doc/dev_team.md for members)
//
Full license can be found in License.md
#
ifndef
INCLUDE_TRANSFORM_H_
#
define
INCLUDE_TRANSFORM_H_
//
The armadillo library is to allow the use of 3d cubes and other
//
array types, with array math built in. This eliminates loops!
#
include
<
armadillo
>
#
include
"
aether.h
"
using
namespace
arma
;
std::string
mklower
(std::string inString);
std::string
mkupper
(std::string inString);
void
copy_cube_to_array
(arma_cube cube_in,
precision_t
*array_out);
void
copy_mat_to_array
(arma_mat mat_in,
precision_t
*array_out,
bool
isFortran);
void
copy_array_to_mat
(
precision_t
*array_in,
arma_mat &mat_out,
bool
isFortran);
void
copy_vector_to_array
(std::vector<
precision_t
> vector_in,
int64_t
nElements,
precision_t
*array_out);
//
This is needed when sending strings to Fortran.
//
We do this by copying the ascii numbers into an integer array,
//
then in fortran copy them back into a character array.
int
*
copy_string_to_int
(std::string inString);
arma_cube
calc_magnitude
(std::vector<arma_cube> xyz);
std::vector<arma_cube>
transform_llr_to_xyz_3d
(std::vector<arma_cube> llr);
std::vector<arma_cube>
transform_xyz_to_llr_3d
(std::vector<arma_cube> xyz);
std::vector<arma_cube>
rotate_around_x_3d
(std::vector<arma_cube> XYZ_in,
precision_t
angle);
std::vector<arma_cube>
rotate_around_y_3d
(std::vector<arma_cube> XYZ_in,
precision_t
angle);
std::vector<arma_cube>
rotate_around_z_3d
(std::vector<arma_cube> XYZ_in,
precision_t
angle);
void
transform_llr_to_xyz
(
precision_t
llr_in[
3
],
precision_t
xyz_out[
3
]);
void
transform_rot_z
(
precision_t
xyz_in[
3
],
precision_t
angle_in,
precision_t
xyz_out[
3
]);
void
transform_rot_y
(
precision_t
xyz_in[
3
],
precision_t
angle_in,
precision_t
xyz_out[
3
]);
void
transform_float_vector_to_array
(std::vector<
precision_t
> input,
precision_t
output[
3
]);
void
transform_vector_xyz_to_env
(
precision_t
xyz_in[
3
],
precision_t
lon,
precision_t
lat,
precision_t
env_out[
3
]);
//
These are not really transformations, but are placeholders
void
vector_diff
(
precision_t
vect_in_1[
3
],
precision_t
vect_in_2[
3
],
precision_t
vect_out[
3
]);
//
-----------------------------------------------------------------------
//
Simple 3-element vector addition
//
-----------------------------------------------------------------------
void
vector_add
(
precision_t
vect_in_1[
3
],
precision_t
vect_in_2[
3
],
precision_t
vect_out[
3
]);
#
endif
//
INCLUDE_TRANSFORM_H_
Back
|
FazBrowse Home
|
New Git URL