Raw Sensor Data ?

Former Member
Former Member
Hi

could you make the HRM sensor data available in RAW form?
And also for the accelerometer?

Then, it could be used to also analyse the waveform itself.

Thanks
Marco
  • There is no access to the internal accelerometer data. You should be able to use the Ant module to listen to data from the heart rate monitor, but you'll have to do some reading to determine exactly how to do it. I'm pretty sure that the HRV app does exactly this.
  • Former Member
    Former Member
    Travis is right.

    egvar antCh;


    function onAntMsg(msg)
    {
    var payload = msg.getPayload();


    if( Ant.MSG_ID_BROADCAST_DATA == msg.messageId ) {

    var livePulse = payload[7].toNumber();
    var beatEvent = ((payload[4] | (payload[5] << 8)).toNumber() * 1000) / 1024;
    var beatCount = payload[6].toNumber();
    }
    else if( Ant.MSG_ID_CHANNEL_RESPONSE_EVENT == msg.messageId ) {
    var event = payload[1].toNumber();
    if( Ant.MSG_CODE_EVENT_RX_FAIL == event ) {
    }
    else if( Ant.MSG_CODE_EVENT_RX_FAIL_GO_TO_SEARCH == event ) {
    }
    else if( Ant.MSG_CODE_EVENT_RX_SEARCH_TIMEOUT == event ) {
    }
    }
    }


    function openCh() {
    // Get the channel
    var chanAssign = new Ant.ChannelAssignment(
    Ant.CHANNEL_TYPE_RX_NOT_TX,
    Ant.NETWORK_PLUS);


    // Set the configuration
    var deviceCfg = new Ant.DeviceConfig( {
    :deviceNumber => 0,
    :deviceType => 120,
    :transmissionType => 0,
    :messagePeriod => 8070,
    :radioFrequency => 57,
    :searchTimeoutLowPriority => 2,
    :searchTimeoutHighPriority => 2,
    :searchThreshold => 0} );


    antCh = new Ant.GenericChannel(method(:onAntMsg), chanAssign);
    antCh.setDeviceConfig(deviceCfg);
    antCh.open();
    }
  • Former Member
    Former Member
    great. do you have some documentation at hand for the ant specification ?
    i.e. what are the various entries payload[1] ... [8] ?
  • Former Member
    Former Member
    It's all in here http://www.thisisant.com/developer/resources/downloads/#documents_tab You will need to create a developers account to access the resources.
  • would like low-level, raw sensor data (e.g. analyze the waveforms). Is this solution only for an external heart rate monitor strap or can it be used to get the raw sensor data from a watch?