Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
antennaHF
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
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ftomi
antennaHF
Commits
7821964f
Commit
7821964f
authored
5 years ago
by
lmaresz
Browse files
Options
Downloads
Patches
Plain Diff
BalazsAperture inherited from Aperture, minor fixes
parent
3bad8d02
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
RTX class/Antenna.m
+3
-3
3 additions, 3 deletions
RTX class/Antenna.m
RTX class/BalazsAperture.m
+5
-24
5 additions, 24 deletions
RTX class/BalazsAperture.m
RTX class/FarField.m
+4
-3
4 additions, 3 deletions
RTX class/FarField.m
with
12 additions
and
30 deletions
RTX class/Antenna.m
+
3
−
3
View file @
7821964f
classdef Antenna
classdef Antenna
properties
properties
position Vect;
amplitude = ones(1, 1000);
amplitude = ones(1, 1000);
phase = zeros(1, 1000);
phase = zeros(1, 1000);
integral;
integral = zeros(1, 1000);
position Vect;
end
end
methods
methods
...
@@ -15,7 +15,7 @@ classdef Antenna
...
@@ -15,7 +15,7 @@ classdef Antenna
end
end
dPhi = 2 * pi / length(obj.amplitude);
dPhi = 2 * pi / length(obj.amplitude);
for j=1:length(obj.amplitude)
for j=1:length(obj.amplitude)
obj.integral(j) = sum(amplitude(1:j)*dPhi);
obj.integral(j) = sum(
obj.
amplitude(1:j)*dPhi);
end
end
end
end
...
...
This diff is collapsed.
Click to expand it.
RTX class/BalazsAperture.m
+
5
−
24
View file @
7821964f
classdef BalazsAperture
<
Barrier
classdef BalazsAperture
<
Aperture
properties
properties
center
Vect =
Vect;
%
center
position
size
double =
0;
%
full
size
of
reflector
(
end
to
end
)
color =
[0.5
0.5
0.5];
width =
2;
nslice =
1;
%
change
from
original
nslice =
1;
%
change
from
original
collisions =
0
;
collisions =
[]
;
end
end
methods
methods
function
obj =
BalazsAperture(center,
size
,
nslice
)
function
obj =
BalazsAperture(center,
size
,
nslice
)
...
@@ -16,22 +12,11 @@ classdef BalazsAperture < Barrier
...
@@ -16,22 +12,11 @@ classdef BalazsAperture < Barrier
obj.collisions =
zeros(1,
nslice
);
obj.collisions =
zeros(1,
nslice
);
end
end
end
end
function
col =
collide(obj,
ray
)
%
override
this
function
with
custom
collision
col =
Collision;
col.stop =
true;
k =
(obj.center.x
-
ray.start.x
)/
ray.dir.x
;
col.pos =
ray.start
+
k*ray.dir
;
col.reflDir =
Vect(-ray.dir.x,
ray.dir.y
);
if
abs
(
col.pos.y
-
obj.center.y
)
<
obj.size
/2
&&
k*ray.dir.mag
>
1e-6
col.collided = true;
else
col.collided = false;
end
end
function
histogram =
getCollisionHistogram(obj)
%
change
from
original
function
histogram =
getCollisionHistogram(obj)
%
change
from
original
histogram =
obj.collisions;
histogram =
obj.collisions;
end
end
function
post_collide
(
obj
,
col
,
trace
)
function
post_collide
(
obj
,
col
,
trace
)
if
(
col.collided
)
%
change
from
original
if
(
col.collided
)
%
change
from
original
i =
floor(obj.nslice*(col.pos.y-obj.center.y+obj.size/2)/obj.size)
+
1;
i =
floor(obj.nslice*(col.pos.y-obj.center.y+obj.size/2)/obj.size)
+
1;
...
@@ -39,10 +24,6 @@ classdef BalazsAperture < Barrier
...
@@ -39,10 +24,6 @@ classdef BalazsAperture < Barrier
obj.collisions(i) =
obj.collisions(i)
+
exp
(1
i*phase
);
obj.collisions(i) =
obj.collisions(i)
+
exp
(1
i*phase
);
end
end
end
end
function plot_self(obj)
plot([obj.center.x obj.center.x],...
[obj.center.y - obj.size/2, obj.center.y + obj.size/2],...
'LineWidth', obj.width, 'Color', obj.color);
end
end
end
end
end
This diff is collapsed.
Click to expand it.
RTX class/FarField.m
+
4
−
3
View file @
7821964f
...
@@ -18,6 +18,7 @@ classdef FarField
...
@@ -18,6 +18,7 @@ classdef FarField
r = linspace(0, apertureSize/2, nr);
r = linspace(0, apertureSize/2, nr);
c1 = (apertureSize/(2*nr))*2*pi/nfi;
c1 = (apertureSize/(2*nr))*2*pi/nfi;
c2 = 1i*2*pi/wavelength;
c2 = 1i*2*pi/wavelength;
for i = 1:ntheta
for i = 1:ntheta
if getappdata(progressBar2,'canceling')
if getappdata(progressBar2,'canceling')
break;
break;
...
...
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