paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] a way to measure time?


From: antoine drouin
Subject: Re: [Paparazzi-devel] a way to measure time?
Date: Thu, 12 Nov 2009 18:06:21 +0100

Hi Chris

I'm not sure in which context this code is used.
A first approach would be to arm a timer to trigger an interrupt.
Another way to be even more accurate and get rid of interrupt latency
would be to use the timer to trigger the ADC conversion.
Anyway the biggest problem I see here is not in the accuracy of
timing, but in the principle itself. You're differentiating
measurements,  which is going to create alot of noise.

Regards

Poine

On Thu, Nov 12, 2009 at 5:51 PM, Chris <address@hidden> wrote:
> Hi.
> I have a question for Antoine or Pascal (and of course anyone who might know
> this)
> Is the below method for timing between two events valid?
>
>  SysTimeChronoStop();
>  time_from_last_measurement = 1e6/(sys_time_chrono /SYS_TICS_OF_USEC(1));
>  maxsonar_fclimb = ( ((float)adc_generic_val1 / 100.) -
> ((float)adc_generic_last_val / 100.) )* time_from_last_measurement;
>  SysTimeChronoStart();
>
> I want to measure the climb rate so i need to be able to measure time
> accurately enough.
> Chris
>
>
>
> _______________________________________________
> Paparazzi-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]