Skip to content

Commit

Permalink
hotfix: fix tx gain link budget calc
Browse files Browse the repository at this point in the history
  • Loading branch information
ojdf committed Jul 4, 2024
1 parent 65a663f commit 7d5e58b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion fast/fast.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,7 @@ def compute_link_budget(self):
dx_r = self.dx_sat
pupil_t = self.pupil
pupil_r = self.pupil_sat
w0 = self.W0
else:
D_t = self.D_sat
D_r = self.D_ground
Expand All @@ -696,14 +697,20 @@ def compute_link_budget(self):
dx_r = self.dx
pupil_t = self.pupil_sat
pupil_r = self.pupil
w0 = self.W0_sat

self.link_budget = {}

self.link_budget['power'] = 10*numpy.log10(self.power/1e-3)

self.link_budget['free_space'] = 10*numpy.log10((self.wvl/(4*numpy.pi*self.L))**2)

G_t = 10*numpy.log10((pupil_t.sum() * dx_t**2)**2 * 4*numpy.pi / self.wvl**2)
# eq 9, Klein et al Applied Optics 1974
# TODO: make this work for axicon (bessel) beams
alpha = D_t / w0
gamma = obsc_t / D_t
g_t = 2/alpha**2 * (numpy.exp(-alpha**2) - numpy.exp(-gamma**2 * alpha**2))**2
G_t = 10*numpy.log10((numpy.pi * D_t**2) * 4*numpy.pi / self.wvl**2 * g_t)
self.link_budget['transmitter_gain'] = G_t

A = numpy.pi * ((D_r/2)**2 - (obsc_r/2)**2)
Expand Down

0 comments on commit 7d5e58b

Please sign in to comment.