Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lysonar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
isac .
lysonar
Commits
5f6dabf5
Commit
5f6dabf5
authored
10 months ago
by
Irreq
Browse files
Options
Downloads
Patches
Plain Diff
Added unit dome and updated bf runtime
parent
3ca06089
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/antenna.cpp
+20
-1
20 additions, 1 deletion
src/antenna.cpp
src/antenna.h
+3
-1
3 additions, 1 deletion
src/antenna.h
with
23 additions
and
2 deletions
src/antenna.cpp
+
20
−
1
View file @
5f6dabf5
...
...
@@ -26,7 +26,7 @@ inline float to_radians(float degree) { return degree * (M_PI / 180.0); }
* @param antenna Antenna object
* @return the point in 3D space of its center
*/
inline
Vector3f
find_middle
(
const
Antenna
&
antenna
)
{
inline
Position
find_middle
(
const
Antenna
&
antenna
)
{
return
antenna
.
points
.
colwise
().
mean
();
// return antenna.points.rowwise().mean();
}
...
...
@@ -163,3 +163,22 @@ int main() {
// cout << create_antenna(position, COLUMNS, ROWS, DISTANCE) << endl;
}
#endif
MatrixXf
generate_unit_dome
(
const
int
n
)
{
MatrixXf
points
(
n
,
3
);
// (id, X|Y|Z)
double
phi
,
theta
;
double
magic
=
2.0
*
M_PI
/
1.618033988749
;
for
(
int
i
=
0
;
i
<
n
;
i
++
)
{
phi
=
acos
(
1.0
-
(
double
)
i
/
double
(
n
));
theta
=
(
double
)
i
*
magic
;
points
(
i
,
X_INDEX
)
=
(
float
)(
cos
(
theta
)
*
sin
(
phi
));
points
(
i
,
Y_INDEX
)
=
(
float
)(
sin
(
theta
)
*
sin
(
phi
));
points
(
i
,
Z_INDEX
)
=
(
float
)(
cos
(
phi
));
}
return
points
;
}
This diff is collapsed.
Click to expand it.
src/antenna.h
+
3
−
1
View file @
5f6dabf5
...
...
@@ -34,7 +34,7 @@ VectorXf compute_delays(const MatrixXf &antenna);
/**
* Find the center of antenna
*/
Vector3f
find_middle
(
const
Antenna
&
antenna
);
Position
find_middle
(
const
Antenna
&
antenna
);
/**
* Place the antenna by positioning the center @ new position
...
...
@@ -88,4 +88,6 @@ VectorXf steering_vector(const Antenna &antenna, float phi, float theta);
*/
VectorXf
steering_vector
(
const
Antenna
&
antenna
,
const
Position
point
);
MatrixXf
generate_unit_dome
(
const
int
n
);
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment