I had questioned the same long back. As we know that float takes 4 bytes and double takes 8 bytes, experimentally on mica2 motes, it had no effect on the number of bytes. It was fixed to 4 bytes for both float and double.. Is it platform specific??
Date: Sat, 25 Nov 2006 19:40:36 -0700
From: Michael Schippling <[EMAIL PROTECTED]> Subject: Re: [Tinyos-help] working with floats and tinyos1 To: Sankar Gorthi <[EMAIL PROTECTED]> Cc: [email protected] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-15; format=flowed As long as you remain on the same platform with the same math lib floats and doubles should be transparent, as described. However sending them to a base-station could be problematic. I believe the MIG message generator for Java can deal with both FP types, but I try to avoid them so I'm not sure...a couple experiments might be in order...under TOS floats should be 4 bytes and doubles 8, and I have some faith that they are standard IEEE format. So the only issue would be getting the byte ordering right. Or...as I keep reiterating, fixed-point integers can often do all the work at a much smaller cost. MS
_______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
