Hi all,
I'm trying to get a speed out of the 07 raw message demo file.
I figure that I need to use the different integers given by the payload bytes?
ord(msg.payload[8]) would give "cumulative speed rev count MSB"
and
ord(msg.payload[7]) would give "cumulative speed rev count LSB"?
and 6 and 5 for the bike speed time event...
(section 6.2 of the ant+ device profile for the speed and cadence sensor)
I've figured out how to combine these to a hex number and then converted this back to an integer.
I also use the n-1 (rev count and time event) from a list to use in the following formula:
speed (m/s) = (2.07 * (rev_c - rev_p) * 1024)/(time_c - time_p)
2.07 is the wheel size
rev_c is current rev count
rev_p is past rev count (n-1)
The strange thing is the speed is always pretty much fixed at 24.359????
the parameters of the usb are:
ID is 121 (for the combined speed and cadence sensor - GSC10?)
ChannelPeriod is 8086
freq = 57
any clues would be really help me out or even tell me that I'm doing it totally wrong!
thanks,
Rob