Skip to content

Commit

Permalink
PIRE and PER values shown
Browse files Browse the repository at this point in the history
  • Loading branch information
luzxyz committed Apr 9, 2024
1 parent feb85fb commit 9027554
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ <h3>Antena</h3>
<label class="form-label" for="comentario">Comentario:</label>
<textarea class="form-control" placeholder="Coloque aqui sus comentarios." id="comentario" name="comentario" rows="4" cols="50"></textarea>
</div>
<h5 id="valorPIRE">PIRE: ? dBm</h5>
<h5 id="valorPER">PER: ? dBm</h5>
<button type="button" class="btn btn-success" onclick="darResultados()">Evaluar mi antena</button>
</form>
</div>
Expand Down
19 changes: 14 additions & 5 deletions scripts/main.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//import { minDistanciaPublico, minDistanciaOcupacional } from "./evaluar_ANE_3-2.js";
//import { minDistanciaPublico, minDistanciaOcupacional } from "./evaluar_ANE_3-2.js";

class Antena {
class Antena {

potTrans = 0;
antena_dbi = 0;
antena_dbd = 0;
potTrans = 0;
antena_dbi = 0;
antena_dbd = 0;
atenuacion = 0;
amplificador = 0;

Expand Down Expand Up @@ -97,6 +97,14 @@ function limpiarResultadosViejos(){
}
}

function escribirPIREPER(antena){
const per = document.getElementById('valorPER');
const pire = document.getElementById('valorPIRE');

per.innerHTML = `PER: ${antena.WtodBm(antena.per)}dBm`;
pire.innerHTML = `PIRE: ${antena.WtodBm(antena.pire)}dBm`;
}

function darResultados(){
const potenciaTrans = parseFloat(document.getElementById('potenciaTransmisor').value);
const amplificador = parseFloat(document.getElementById('amplificador').value);
Expand All @@ -116,6 +124,7 @@ function darResultados(){

limpiarResultadosViejos();
ponerResultados(antena);
escribirPIREPER(antena);


debug(antena);
Expand Down

0 comments on commit 9027554

Please sign in to comment.