FreeBSD/contrib/ntp/ntpd/refclock_wwv.c
/*
 * wwv_metric - compute station metric
 *
 * The most significant bits represent the number of ones in the
 * station reachability register. The least significant bits represent
 * the minute sync pulse amplitude. The combined value is scaled 0-100.
 */
compute station metric
The most significant bits represent the number of ones in the
station reachability register. The least significant bits represent
the minute sync pulse amplitude. The combined value is scaled 0-100.
compute station metric The most significant bits represent the number of ones in the station reachability register . The least significant bits represent the minute sync pulse amplitude . The combined value is scaled 0 - 100 .
double
wwv_metric(
	struct sync *sp		
	)
{
	double	dtemp;
	dtemp = sp->count * MAXAMP;
	if (sp->synmax < MAXAMP)
		dtemp += sp->synmax;
	else
		dtemp += MAXAMP - 1;
	dtemp /= (AMAX + 1) * MAXAMP;
	return (dtemp * 100.);
}
double wwv_metric ( struct sync * sp ) { double dtemp ; dtemp = sp -> count * MAXAMP ; if ( sp -> synmax < MAXAMP ) dtemp += sp -> synmax ; else dtemp += MAXAMP - 1 ; dtemp /= ( AMAX + 1 ) * MAXAMP ; return ( dtemp * 100. ) ; }
wwv_metric - compute station metric
 The most significant bits represent the number of ones in the
 station reachability register.
wwv_metric - compute station metric The most significant bits represent the number of ones in the station reachability register .
/* station pointer */