Hi,
I´m trying to adapt the example location-source for my project.
After looking through th source code and the datasheets I´m a bit confused. The data sheet says to write the RSSI-values
as absolute values from 40(best) to 95(worst). So if this is true I simply have to:
- subtract 45 from the RSSI-value read from a RF-packet
- multiply with (-1) to get rid of the negative-sign
-multiply by 2 to shift the value by one bit to fit the fixed point format (XXXXXXX.X) required by the datasheet
- make sure to cut off values beyond 95 respectively below 40
Of course those steps could be combined for simplicity.
In the example source however there is a completely different algorithmus with different offsets.
Second point is the data format of the positions.
Am I right that all positions (also the result calculated by the engine) are in meters, where the two LSbs represent the ammount of .25m steps?
And do I have to add this offset (X = (XLOCX - xmin +1) % ( xdelta+ 1) + xmin) ? In my case the limits are 0,255 so this would result in a offset of:
(XLOC - 0 + 1) %(255 + 1) + 0 --> -1
To my set-up: The CHVER-register says "4" so I guess it´s the new revision with up to 16 reference-nodes. All nodes are whitin a range of about 4m which is too close I know, but the sample application provides reasonable positions in this set-up whereas my app tells me that I am at 30,20, right outside the office ;-)
Thanks in advance
Alex