Thanks for your quick reply. I neglected the fact that the value was
being stored in flash as an unsigned number. Thanks for pointing this
out for me.
- Sean
Michael Schippling wrote:
200 (decimal) is a negative number in an 8 bit signed int...about -55.
Does that make more sense for your level?
MS
Sean Casey wrote:
Hello,
I'm working with mica2 motes and I would like to know if it's
possible to calculate the rssi value in dBm on the mote locally. I
had been sending the rssi value to the UART and then calculating the
dBm value with a java program, but now I would like to calculate it
locally on the mote, and store it in flash. I've attempted this and
I'm not getting a value in the right range. This is what I've been
using:
/* Calculate the RSSI Value */
V_RSSI = 3.0 * (RSSI_VAL/1024);
RSSI_dBM = (int8_t) ((-50.0 * V_RSSI) - 45.5);
Where V_RSSI and RSSI_VAL are of type double. Using this I'm getting
a value of around 200, which is much higher than the range I'd
expect. Does anyone know what data types I could use to locally
compute this?
Thanks for any replies.
- Sean
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help