FitContributor and pool swim activity .fit file

Former Member
Former Member
Hi ConnectIQ,

I am completely new to this platform (got my F5X a week ago) so I apologize in advance if questions I am going to ask already have been covered. Please point me in the right direction then.

It seems that Garmin is very insisting in not allowing live heart rate data to be collected from internal/external sensors during pool swim activity. While researching this on Garmin forums I saw some posts which were saying that it is technical problem of collecting this data and writing into .fit file. Initially I could not understand what was the problem, but after closer investigation and examining some examples of .fit files I understood that pool swim records are totally different from any other activity, because pool swim records based not on time, but rather on strokes and other swim events, which means they are probably generated by completely different source and with different rate then other activity. Given this, it seems it is not that simple to add new custom data fields for swim activity in such way that it could be visualized in Garmin Connect, but still you guys are doing that for HRM-Swim data. I have examined some .fit files which contains this data and it seems that it is appended to the end of the file in very special format. Now, knowing this I can think of few ways to achieve my goal:
- create new data field which would connect to external sensor and then create new session and write this heart rate data into this new session (which I believe would create separate .fit file on the device, right?) and then find the way to merge this collected data into swim activity file.
- create new data field, connect to sensor, collect the data and then write this data into activity .fit file in some special way (probably the same way how it is done with HRM-Swim data), that it could be visualized by Garmin Connect
- buy some cheap Garmin wrist band which has an ability to collect heart rate data and wear it along with my F5X to record separate activity while swimming and then somehow merge those 2 together (ugliest way)

Of course I would prefer #2, as it would be the cleanest way to get what I want, but I am very skeptical that ConnectIQ can support such scenario or maybe I am wrong? I have tried to create some test data field which was using FitContributor to add data into .fit file and I got nothing in .fit file which was recorded during pool swim activity, which means that either you don't support this at all, or I need to specify some secret option to make this happen or if my conclusions are correct there might be special way to add custom data to pool swim .fit file. Could you please shed some light on this subject? I am willing to spend my time to figure this out, as I believe there are a lot of people who would benefit from this feature.

While on this topic I have couple more questions:
1. I wonder why did you choose completely different format for pool swim activity (meaning using strokes as record generator) instead of using some record attribute which would tell if there is a stroke on specific second or not, seems it would achieve the same amount of information in more homogeneous way.
2. Is there any detailed guide on how to use ConnectIQ simulator? I have tried almost all options to generate simulated data in swimming activity (Simulation->Activity Select->Swimming), but it always generate something in Running mode (when I save fit session it doesn't have anything in common with swim activity). Is there a secret recipe or sequence of action to simulate swimming activity?

Thanks
  • 1. I wonder why did you choose completely different format for pool swim activity (meaning using strokes as record generator) instead of using some record attribute which would tell if there is a stroke on specific second or not, seems it would achieve the same amount of information in more homogeneous way.


    Just guessing here. It's because nothing of interest happens between strokes, so there is no point in generating data points. This allows for extremely compact fit files, and you have to remember that first swimming-capable watches (like for example the Garmin Swim) were very limited memory-wise. Of course, adding heart rate data into the equation made things a little more complicated, but since HR data is downloaded into the watch post-activity anyway, it is again simpler to attach it to the end of the file rather than interweave it into existing swimming data.
  • According the description, this data field shows the hr during swimming, but does not record it in the fit file

    https://apps.garmin.com/es-ES/apps/51a89af1-c7b5-486e-8cb7-e0463ae471fb#0

    I think, the developer might be able to actually create a developer field, and write the hr into the fit file using that developer field.
    The he would be shown not in the native hr chart, but in a connectiq one. But otherwise would do the trick
  • Former Member
    Former Member over 8 years ago
    @tmk2: I can see why it could be attractive solution at a time, but from platform point of view it is terrible solution, because it forks supporting code everywhere, you have to make exception for pool swim activity to handle it in a special way and that is what create platform fragmentation and inconsistency. In my humble opinion sometimes you have to sacrifice something (like having extra records in .fit file) for better good.

    @danielp27: F5X when paired with external HR monitor is able to show current heart rate on its own and it works great but it doesn't store this data into .fit file for pool swim activity. I did bunch of testing and verified it. There are other ConnectIQ data fields which are able to connect to external heart rate monitor and log it into .fit file successfully and then make it shown in Garmin Connect, but not for pool swim activity and that is what I am trying to figure out!
  • Interesting, thanks for sharing.

    I am the developer of a swim pool app for the fr230. And I have struggled a lot with the format. Garmin swim and garmin 920 send length messages, while connectiq only allows to send record, lap and session. Besides, if one sets the subsport type lap swimming, the fit file is totally empty.

    The pool swim fit file is cursed ;-)
  • Former Member
    Former Member over 8 years ago
    Yes, I agree that pool swim file is completely separate beast and requires completely different handling and that is why I think it was bad decision on Garmin part to make it this way. Pool swim activity is extremely popular as everyone is tired to count laps and want the watch to do that, but at the same time you can't really extend this in the same way how you extend running or cycling. Thant is why I would love to hear some clarification on this problem from Garmin official source and maybe some solution?
  • @tmk2: I can see why it could be attractive solution at a time, but from platform point of view it is terrible solution, because it forks supporting code everywhere, you have to make exception for pool swim activity to handle it in a special way and that is what create platform fragmentation and inconsistency. In my humble opinion sometimes you have to sacrifice something (like having extra records in .fit file) for better good.


    But maybe it was the only feasible solution back then? I guess no one had your convinience in mind while designing fit format for pool swimming. Besides pool swimming is a different paradigm in that it's event-triggered rather than time interval triggered. Making it consistent with other type of activities would make for larger data sets containing less useful information. That would be a loose-loose situation, except of course a situation where you allow someone from the outside to poke into the internals of the fit file, but years ago no one imagined that a user will be allowed to manipulate a fit file directly - either manually or by an IQ app.
  • I have just bought a Polar OH1 optical heart rate that save heart rate data in TCX format during swimming session, but i'm not able to combine the FIT swim file of 5X with TCX file of OH1 in order to have heart rate data in pool swim activity... is there any program or app that can merge the 2 file together? It seems that sporttracks desktop can do this but it's a non free program...