Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
ITABase
Commits
01408a1c
Commit
01408a1c
authored
Aug 29, 2017
by
michael.kohnen
Browse files
Update SH functions for ambisonics
parent
b72e5aea
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ITANumericUtils.cpp
View file @
01408a1c
...
...
@@ -465,21 +465,20 @@ int SHKronecker( const int m )
}
std
::
vector
<
double
>
SHRealvaluedBasefunctions
(
const
double
elevation
,
const
double
azimuth
,
const
int
maxOrder
)
std
::
vector
<
double
>
SHRealvaluedBasefunctions
(
const
double
elevation
_rad
,
const
double
azimuth
_rad
,
const
int
maxOrder
)
{
std
::
vector
<
double
>
Y
;
Y
.
resize
(
(
maxOrder
+
1
)
*
(
maxOrder
+
1
)
);
Y
=
SHAssociatedLegendre
(
maxOrder
,
cos
(
elevation
)
);
Y
=
SHAssociatedLegendre
(
maxOrder
,
cos
(
elevation
_rad
)
);
for
(
int
n
=
0
;
n
<=
maxOrder
;
n
++
)
{
//Y[SHDegreeOrder2Linear(0,n)]*=Y[SHDegreeOrder2Linear(0,n)]*SHNormalizeConst(0,n);
Y
[
SHDegreeOrder2Linear
(
0
,
n
)
]
*=
SHNormalizeConst
(
0
,
n
);
for
(
int
m
=
1
;
m
<=
n
;
m
++
)
{
double
Normalizing
=
SHNormalizeConst
(
m
,
n
);
Y
[
SHDegreeOrder2Linear
(
m
,
n
)
]
*=
cos
(
m
*
azimuth
)
*
Normalizing
;
Y
[
SHDegreeOrder2Linear
(
-
m
,
n
)
]
*=
sin
(
m
*
azimuth
)
*
Normalizing
;
Y
[
SHDegreeOrder2Linear
(
m
,
n
)
]
*=
cos
(
m
*
azimuth
_rad
)
*
Normalizing
;
Y
[
SHDegreeOrder2Linear
(
-
m
,
n
)
]
*=
sin
(
m
*
azimuth
_rad
)
*
Normalizing
;
}
}
return
Y
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment