paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] Scaling factor: uint16_t into float


From: Gautier Hattenberger
Subject: Re: [Paparazzi-devel] Scaling factor: uint16_t into float
Date: Thu, 16 Oct 2008 14:05:30 +0200
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

The ADC uses a 10 bits converter. So it gives values between 0 (0V) and 1023 (3V, unless you use adc 5 or 6 of a Tiny2.x).

For your problem, it all depends of the way you want to use these values.
- You can display them in a real time plotter with a scaling factor.
- You can use the values in the log file after your flight.
- You can write a small Ivy agent (C,Ocaml) that read the values coming from the telemetry and do whatever you want. - You can write a piece of airborne code that reads the adc value, define a new message and send it to the ground.

Gautier


Brendan Chen a écrit :
Hi all,

Anyone know where and how to convert the downlinked ADC_GENERIC value into a 
more meaningful value?

I could be wrong but from what i understand, the ADC_GENERIC function returns a 
uint16_t value... I would like to scale that down by a factor of 208.3 
(adc_generic_val1 / 208.3) and give a return in 2 decimal float number.

How and where would I do that?


Thanks
Brendan


_______________________________________________
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]