public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
* SRF04.c - wrong range for filter (line 145)
@ 2019-06-17 19:21 Zbyněk Kocur
  2019-06-22 10:52 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Zbyněk Kocur @ 2019-06-17 19:21 UTC (permalink / raw)
  To: linux-iio

Hello,

I try to use linux kernel module for proximity sensor SRF04 and i was not able to measure distance longer than 1.5 m. The problem is on implementation maximum range filter in function srf04_read, line 145. The reasoning assumes that the distance to 3 meters is limited, but the direction back and forth is neglected. Therefore, the resulting limit is a maximum of 1.5 meres and not a required 3 meters. The solution is to come out of the formula:

                 *         distance       2 * 3 m
                 * time = ---------- = --------- = 18808777 ns
                 *          speed       319 m/s
                 *


Best Regards,
Zbyněk Kocur
---
email: zbynek.kocur@fel.cvut.cz
phone: +420 224 354 054
web: http://www.fel.cvut.cz
Department of Telecommunications Engineering
Faculty of Electrical Engineering


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: SRF04.c - wrong range for filter (line 145)
  2019-06-17 19:21 SRF04.c - wrong range for filter (line 145) Zbyněk Kocur
@ 2019-06-22 10:52 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2019-06-22 10:52 UTC (permalink / raw)
  To: Zbyněk Kocur; +Cc: linux-iio, Andreas Klinger

+CC Andreas.

On Mon, 17 Jun 2019 21:21:37 +0200
Zbyněk Kocur <zbynek.kocur@fel.cvut.cz> wrote:

> Hello,
> 
> I try to use linux kernel module for proximity sensor SRF04 and i was not able to measure distance longer than 1.5 m. The problem is on implementation maximum range filter in function srf04_read, line 145. The reasoning assumes that the distance to 3 meters is limited, but the direction back and forth is neglected. Therefore, the resulting limit is a maximum of 1.5 meres and not a required 3 meters. The solution is to come out of the formula:
> 
>                  *         distance       2 * 3 m
>                  * time = ---------- = --------- = 18808777 ns
>                  *          speed       319 m/s
>                  *
> 
> 
> Best Regards,
> Zbyněk Kocur
> ---
> email: zbynek.kocur@fel.cvut.cz
> phone: +420 224 354 054
> web: http://www.fel.cvut.cz
> Department of Telecommunications Engineering
> Faculty of Electrical Engineering
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-22 10:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-17 19:21 SRF04.c - wrong range for filter (line 145) Zbyněk Kocur
2019-06-22 10:52 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox