All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
To: "Zbyněk Kocur" <zbynek.kocur@fel.cvut.cz>
Cc: linux-iio@vger.kernel.org, Andreas Klinger <ak@it-klinger.de>
Subject: Re: SRF04.c - wrong range for filter (line 145)
Date: Sat, 22 Jun 2019 11:52:05 +0100	[thread overview]
Message-ID: <20190622115205.767777c2@archlinux> (raw)
In-Reply-To: <B08A7378-8CBD-4B77-B18D-B0C157FAEC07@fel.cvut.cz>

+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
> 


      reply	other threads:[~2019-06-22 10:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-17 19:21 SRF04.c - wrong range for filter (line 145) Zbyněk Kocur
2019-06-22 10:52 ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190622115205.767777c2@archlinux \
    --to=jic23@jic23.retrosnub.co.uk \
    --cc=ak@it-klinger.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=zbynek.kocur@fel.cvut.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.