Accelerometer Data

Former Member
Former Member
The initial slideshow referenced that Connect IQ would have access to the acceleratometer data however I see no reference to it in the current SDK docs. Is it a feature that is coming or is it something that was abandoned?
  • Accelerometer feature available in IQ Connect 1.2! Now what about storing data?

    I am just checking back to see what happens with the accelerometer feature. Are there any plans to do anything in that regard? Would it be feasible with the current hardware, it would you need improved hardware? Access to the accelerometer would be the kind of feature Connect IQ needs to get some traction.


    I was delighted to see that accelerometer support is now available in IQ Connect 1.2. I digged out the Forerunner 920XT and tried it out, and it works very nicely to show accelerometer and magnetometer values on the display. So thanks a lot for listening and implementing the feature! Now as far as I can see there is still no way to store the data at all? I know it is not possible to FIT-files, but not to any other files etc. (csv, anything..) either as far as I understand? But as far as I could read at DC Rainmaker the possibility to write to FIT-files should become available at the end of Q1 2016?
  • You're correct--right now there isn't a good way to save the data. We do plan to bring FIT recording into a future release, but I don't have any exact dates on that yet.
  • You're correct--right now there isn't a good way to save the data. We do plan to bring FIT recording into a future release, but I don't have any exact dates on that yet.


    "Not a good way to save the data" implies that there is some way to save the data. Is there a bad way to save the data? For now I would be prepared to use any way just for my own experimenting, in anticipation of saving to fit-files being available in the future?
  • "Not a good way to save the data" implies that there is some way to save the data. Is there a bad way to save the data? For now I would be prepared to use any way just for my own experimenting, in anticipation of saving to fit-files being available in the future?


    For testing, you could use "Sys.println()". On a real device it will write to a file called <appname>.txt in the \garmin\apps\log directory, but the file must be pre-created. After the file reach a certain size, it be be renamed to "<appname>.bak" and move to a new <appname>.txt
  • For testing, you could use "Sys.println()". On a real device it will write to a file called <appname>.txt in the \garmin\apps\log directory, but the file must be pre-created. After the file reach a certain size, it be be renamed to "<appname>.bak" and move to a new <appname>.txt


    Thanks a lot, this was very, very close to what I needed in order to do some real life testing with storing accelerometer data. I have now made a small app that stores 10 Hz accelerometer-data in the log-file. The only issue is that the max size of <appname>.txt and <appname>.bak is around 5 Kb each, thus limiting to around a minute or two of data. If there would just have been some debug switch to increase the max filesize of the log-file I could have done all the development I needed in my test environment.

    Connect IQ staff: Any chance for something like that happening, a possibility to increase log file size? Just a tiny (undocumented) feature?
  • I didn't want to suggest using the log file initially since it's intended to be used for debugging and not as a data storage method. :) That said, we do have at least one app that has made use of the logging feature to store data from the app for later use. We don't have any plans to increase the max file size on the debug files since we don't encourage this kind of use. Some devices have limited storage, and we'd like to avoid apps filling up the storage on the device with arbitrary text files. Plus, we already have better methods for storing recorded data in the works.

    In the meantime, I'm glad this is working out for you. I know you've been waiting a while for accelerometer data, and I'm sure it's frustrating to get some movement forward only to encounter another roadblock.
  • In the meantime, I'm glad this is working out for you. I know you've been waiting a while for accelerometer data, and I'm sure it's frustrating to get some movement forward only to encounter another roadblock.


    This is definitely a big step forward. Enough to look at feasibility, algorithms etc. - and as long as I know that the platform will give me what I need (possibility to write to fit-file) later on, it is worth to start putting in some work here. If somebody is interested, here is the central part of the code (based on the AccelMag sample).

    var str="";
    var count=0;
    [...]
    function timerCallback() {
    var info = Sensor.getInfo();
    accel = info.accel;
    xAccel = accel[0];
    yAccel = accel[1];
    zAccel = accel[2];

    str=str+xAccel.toString()+" "+yAccel.toString()+" "+zAccel.toString()+" ";
    count++;
    if (count>=10)
    {
    Sys.println(str);
    str="";
    count=0;
    }
    }


    BTW: Does the Epic or some of the other watches allow for bigger log-files? Would maybe be enough for me to pick one up...
  • Another possible hack might be to stream the data out of the watch using the generic ANT channel and a suitable ANT+ profile where you could stuff your data. Then use something like the SimulANT simulator as a data collector for the stream of bits and then write some code to unstuff it. The limit would be something less than 64 bits at 4 Hz.

    I have not actually done this so not sure if it's even possible but I can't think of why it wouldn't be right now.
  • Another possible hack might be to stream the data out of the watch using the generic ANT channel and a suitable ANT+ profile where you could stuff your data. Then use something like the SimulANT simulator as a data collector for the stream of bits and then write some code to unstuff it. The limit would be something less than 64 bits at 4 Hz.


    64 bits at 4 Hz would be perfectly OK. I am not sure I understand how this actually works, though. As far as I understand, I can use Connect IQ on the watch to send data on a generic ANT channel using Toybox::Ant::GenericChannel::sendBroadcast(data). I would then need another unit/watch to pick up that data? (As I guess it would not be possible to pick up that data by the watch itself to have it written to the fit-file.) Is there a good example availabel of streaming data out of the watch using the generic ANT channel?