comparison autocal/txvout.c @ 79:394daa4ad6e8

fc-rfcal-txband: dBm to Vout function implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 15 Jul 2017 21:06:43 +0000
parents
children 4c3f4231a021
comparison
equal deleted inserted replaced
78:1d3dd589a857 79:394daa4ad6e8
1 /*
2 * This module contains the function that converts Tx power values in dBm
3 * (either measured or set targets) to Vout for the purpose of piecewise
4 * linear modeling of APC.
5 */
6
7 #include <math.h>
8 #include "txband.h"
9
10 vout_t
11 dbm_to_vout(dbm)
12 double dbm;
13 {
14 double milliwatts, vout;
15
16 milliwatts = pow(10.0, dbm / 10.0);
17 vout = sqrt(milliwatts * 0.050);
18 return vout;
19 }