Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
ITABase
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Institute of Technical Acoustics (ITA)
ITABase
Commits
342f2263
Commit
342f2263
authored
Dec 07, 2017
by
Dipl.-Ing. Jonas Stienen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding angle projection method for -90 to 90 degrees
parent
01a43cb1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
CMakeLists.txt
CMakeLists.txt
+3
-0
include/ITANumericUtils.h
include/ITANumericUtils.h
+3
-0
src/ITANumericUtils.cpp
src/ITANumericUtils.cpp
+12
-0
No files found.
CMakeLists.txt
View file @
342f2263
...
...
@@ -214,6 +214,9 @@ endif( )
if
(
ITA_VISTA_BUILD_STATIC
)
add_definitions
(
-DVISTABASE_STATIC -DVISTAMATH_STATIC -DVISTAASPECTS_STATIC -DVISTATOOLS_STATIC -DVISTAINTERPROCCOMM_STATIC
)
if
(
WIN32
)
list
(
APPEND VISTA_USE_PACKAGE_LIBRARIES Ws2_32
)
endif
(
)
endif
(
)
if
(
NOT WIN32
)
...
...
include/ITANumericUtils.h
View file @
342f2263
...
...
@@ -288,6 +288,9 @@ ITA_BASE_API float anglef_proj_0_360_DEG( const float alpha );
*/
ITA_BASE_API
float
anglef_proj_N180_180_DEG
(
const
float
alpha
);
//! Project an angle into interval of -90 and 90 degree
ITA_BASE_API
float
anglef_proj_N90_90_DEG
(
const
float
alpha
);
//! (Gerichtete) minimale Winkeldifferenz für zwei Winkel [°] im Intervall [0°,360°)
/**
* Für zwei gegebene Winkel 0°<= alpha, beta < 360° im Interval [0°,360°) berechnet
...
...
src/ITANumericUtils.cpp
View file @
342f2263
...
...
@@ -254,6 +254,14 @@ float anglef_proj_NPI_PI( const float alpha )
return
x
;
}
float
anglef_proj_NPIH_PIH
(
const
float
alpha
)
{
float
alpha_temp
=
fmodf
(
alpha
,
PI_F
);
if
(
alpha_temp
<
-
PI_F
/
2.0
f
)
alpha_temp
+=
PI_F
;
return
alpha_temp
;
}
float
anglef_mindiff_0_2PI
(
const
float
alpha
,
const
float
beta
)
{
float
gamma
=
anglef_proj_0_2PI
(
beta
)
-
anglef_proj_0_2PI
(
alpha
);
...
...
@@ -278,6 +286,10 @@ float anglef_proj_N180_180_DEG( const float alpha ) {
return
rad2gradf
(
anglef_proj_NPI_PI
(
grad2radf
(
alpha
)
)
);
}
float
anglef_proj_N90_90_DEG
(
const
float
alpha
)
{
return
rad2gradf
(
anglef_proj_NPIH_PIH
(
grad2radf
(
alpha
)
)
);
}
float
anglef_mindiff_0_360_DEG
(
const
float
alpha
,
const
float
beta
)
{
return
rad2gradf
(
anglef_mindiff_0_2PI
(
grad2radf
(
alpha
),
grad2radf
(
beta
)
)
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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