view autocal/txvout.c @ 131:8e26cb57c7f8

doc/Test-system-interface: additions for Tx ramp testing
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 20 Dec 2021 03:29:23 +0000
parents 4c3f4231a021
children
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 "txvout.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;
}