view autocal/txvout.c @ 98:615df2fb1ec3

doc/Tx-cal-theory: update with both theory and practice
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 17 Jul 2017 22:49:35 +0000
parents 394daa4ad6e8
children 4c3f4231a021
line wrap: on
line source

/*
 * This module contains the function that converts Tx power values in dBm
 * (either measured or set targets) to Vout for the purpose of piecewise
 * linear modeling of APC.
 */

#include <math.h>
#include "txband.h"

vout_t
dbm_to_vout(dbm)
	double dbm;
{
	double milliwatts, vout;

	milliwatts = pow(10.0, dbm / 10.0);
	vout = sqrt(milliwatts * 0.050);
	return vout;
}