Metadata-Version: 2.1
Name: freesopy
Version: 1.0.3
Summary: This is a Python package for the implementation of various equations of Free Space Optical Communication
Author: Shoaib
Description-Content-Type: text/markdown
Requires-Dist: numpy

<p align="center">
  
</p>

<h1 align="center">Freesopy</h1>

<p align="center">
  <i>A Python package for the implementation of various equations of Free Space Optical Communication</i>
</p>

<hr>


`Freesopy` is designed to simplify the implementation of various mathematical equations used in Free Space Optical Communication. It provides easy-to-use functions that can be integrated into your projects.

## Usaage

You can import `Freesopy` as:

```bash
import freesopy as fso
```
## Some General Equations
P_t: Transmitted power in mW <br>
D_r: Receiver aperture diameter in meters<br>
d: Distance between transmitter and receiver in meters<br>
P_r: Received power in mW<br>
L_p: Path loss in dB<br>
N_0: Noise power spectral density in mW/Hz

<h3>Calculate Received Power</h3>
Power_received = fso.calculate_received_power(P_t, D_r, d)
<h3>Calculate Path Loss</h3>
Path_loss = fso.calculate_path_loss(P_t, P_r)
<h3>Calculate SNR</h3>
SNR = fso.calculate_snr(P_r, N_0)


## Calculation of Losses
wl = wavelength<br>
d= distance between transmitter and receiver<br>
alpha= atmospheric attenuation coefficient<br>
dt= diameter of transmitter antenna<br>
dr = diameter of receiver antenna<br>
pt = power total<br>
pn = power of ambient noise<br>
sigma_p = standard deviation of pointing error<br>
sigma_s= standard deviation due to scintillation<br>
gamma = initial intensity of optical beam<br>cn = refractive structure parameter<br>
theta= angle of divergence<br>
theta_mis = mismatch angle divergence<br>
<br><br>
<h3>Attenuation Loss</h3>

attenuation_loss = fso.atmospheric_attenuation_loss(gamma, alpha, d)

<h3>Geometric Loss</h3>

geo_loss = fso.geometric_loss(dr, dt, d, wl, pt)

<h3>Misalignment Loss</h3>

misalignment_loss = fso.pointing_misalignment_loss(d, sigma_p, pt)

<h3>Atmospheric Turbulence</h3>

turbulence_loss = fso.atmospheric_turbulence(pt, cn, d, wl)

<h3>Polarising Loss Power</h3>

polarising_loss_power = fso.polarising_loss_power(pt, theta_mis)

<h3>Ambient Noise</h3>

ambient_noise = fso.ambient_noise(pt, pn)

<h3>Beam Divergence Loss</h3>

divergence_loss = fso.beam_divergence_loss(theta, d, pt)

<h3>Scintillation Loss</h3>

scintillation_loss = fso.scintillation_loss(sigma_s, pt)

