Re: Questions: IIO type for absorbance and float values in channels?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 21 Jun 2022 16:13:25 +0200
Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote:

> On Tue, Jun 21, 2022 at 2:29 PM Jonathan Cameron
> <Jonathan.Cameron@xxxxxxxxxx> wrote:
> > On Tue, 21 Jun 2022 14:18:55 +0200
> > Stefan Lengfeld <stefan.lengfeld@xxxxxxxxx> wrote:  
> 
> ...
> 
> > > Question 1:
> > >
> > > The sensor measures the absorbance[1] of a material. It's the negative
> > > logarithmic quotient of the received and emitted light. It's a unit-less value.
> > >
> > > As far as I can see there is currently no predefined IIO type in the kernel for
> > > this.  I have search the list [2], but nothing matches.
> > >
> > > Do I overlook something or what channel type should I use for this sensor
> > > measurement value?  
> >
> > So the closest we've seen to this is some of the health sensors (pulse oximeter
> > targeting devices) but in that case the processing is done with a custom userspace
> > library so we just pass values on in fixed point.
> >
> > So probably needs a new channel type.  
> 
> Wouldn't this be a particular case of ambient (light) sensor?
> 

Not IIO_LIGHT / illuminance (which is the human eye profile corrected light reading we
tend to care about), but could probably be considered intensity
with a modifier. The snag is we have colour modifiers for that and so
this is one of those corner cases where we would ideally allow
modifiers to stack, but we don't (and can't retrofit that because
of the space in the IIO_EVENT definition - there is no where to
put it :(  So it is like illuminance in the sense that it is a computed
value (or that's one implementation anyway) based on intensity channels.
I've never seen a sensor actually measure illuminance directly - they tend
to combine multiple sensors with different frequency responses using some
secret sauce (or attempt to bodge something reasonable from one reading based
on assumptions about the light source).  Arguably it's also like the
proximity devices that just use intensity of response relative to a light
source the control (the cheap ones :)

There isn't really a good answer as there is a bit too much to describe about this
channel type... 

Jonathan

 



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux