Date: Sat, 26 Jun 1999 15:32:40 -0600 From: lyndon@orthanc.ab.ca To: Frode Vatvedt Fjeld <frodef@acm.org> Cc: freebsd-multimedia@FreeBSD.ORG Subject: Re: bt848 channel frequencies Message-ID: <199906262132.PAA05313@orthanc.ab.ca> In-Reply-To: Your message of "26 Jun 1999 13:55:57 %2B0200." <2hzp1n9nw2.fsf@dslab7.cs.uit.no>
next in thread | previous in thread | raw e-mail | index | archive | help
> > Also, the datatype for 'frequency' should be wide enough for > > satellite and long-wave work, from few kHz to tens of GHz. > > I believe your typical "long" scales to 4.2 GHz if the unit is a > single Hz. Does anyone know of tuning applications that would require > a granularity smaller than one KHz? What about the different radio > bands, for example? For many applications on HF you need to tune with at least 0.1 Hz resolution. For precision applications I would want to be able to resolve to 0.001 Hz or better. Too much resolution in the API is better than not enough. > Or would it be better to use a 64-bit type to represent frequencies? > Then we could go from uHz to GHz without problems.. :-) Why not hide the implementation in the library and just pass the frequency (in around as an ASCII string? E.g. int tuner_set_freq(TUNER *t, char *freq); . . . rc = tuner_set_freq(t, "14313000.155"); /* rc = 0 */ rc = tuner_set_freq(t, "740000"); /* rc = -1, errno = ERANGE (tuner doesn't tune that low) */ rc = tuner_set_freq(t, NULL); /* rc = -1, errno = EFAULT */ Frequency strings are in Hz. If no '.nnn' appended assume '.0'. --lyndon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906262132.PAA05313>