Skip to content

Commit

Permalink
fix: TEB comparison for NRZ was wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanbmrd committed Oct 26, 2024
1 parent 558f4d6 commit 01f618e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/simulateur/Simulateur.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public Simulateur(String[] args) throws ArgumentsException {

this.emetteur = new Emetteur(nbEch, aMax, aMin, form);
// Sonde de l'émetteur
if (affichage)
if (affichage)
this.emetteur.connecter(new SondeAnalogique("Émetteur " + form));

// Connexion du codeur si l'option est définie
Expand Down Expand Up @@ -206,7 +206,7 @@ public Simulateur(String[] args) throws ArgumentsException {
}

// Sonde du transmetteur analogique
if (affichage)
if (affichage)
this.transmetteurAnalogique.connecter(new SondeAnalogique("Transmetteur analogique " + form));

if (ti != null) {
Expand All @@ -219,7 +219,7 @@ public Simulateur(String[] args) throws ArgumentsException {
this.transmetteurMultiTrajets.connecter(this.transmetteurAnalogique);

// Sonde du transmetteur multi-trajets
if (affichage)
if (affichage)
this.transmetteurMultiTrajets.connecter(new SondeAnalogique("Transmetteur multi-trajets " + form));
} else {
// Connexion de l'émetteur au transmetteur analogique
Expand Down Expand Up @@ -511,7 +511,7 @@ public float calculTauxErreurBinaire() {

public double calculProbaErreur() {
// Conversion du rapport Eb/N0 en linéaire
float ebN0Lin = (float) Math.pow(10, this.transmetteurAnalogique.getEbN0dB() / 10);
float ebN0Lin = (float) Math.pow(10, this.snrpb / 10);

// Formule de calcul de la probabilité d'erreur
return 0.5 * Erf.erfc(Math.sqrt(ebN0Lin));
Expand Down
4 changes: 2 additions & 2 deletions src/utils/ExportCSVTEBComparaison.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public ExportCSVTEBComparaison() {
private void lancerSimulations() {
System.out.println("Lancement des simulations pour " + this.fichierCSV + "...");

// Calcul du nombre total d'itérations (Eb/N0 de -10 à 9, soit 20 valeurs)
int totalIterations = 20;
// Calcul du nombre total d'itérations (Eb/N0 de -10 à 15, soit 25 valeurs)
int totalIterations = 25;
int currentIteration = 0;

try (FileWriter csvWriter = new FileWriter(fichierCSV)) {
Expand Down

0 comments on commit 01f618e

Please sign in to comment.