I wrote a Referee App which records time and goals in a simple array. Is there a possibility to export this data with the activity which is saved automatically once the match is finished.
I wrote a Referee App which records time and goals in a simple array. Is there a possibility to export this data with the activity which is saved automatically once the match is finished.
You can't really record arbitrary structured data like that to a FIT activity file. And even though the FIT spec supports arrays, there's a limit to how much data can be saved (it's a moot point since CIQ won't let you save arrays and Garmin Connect won't display them.)
What you can store is:
- (MESG_TYPE_RECORD) Numerical data that continuously changes during an activity (data is recorded once per second). e.g. Heart rate
- (MESG_TYPE_LAP) Numerical data that's associated with each lap. e.g. Lap heart rate (the average value for each lap)
- (MESG_TYPE_SESSION) Numerical or string data that's associated with entire activity. (There's a strict limit on the length of the string, though, so there's not enough room to list all the goals in human readable form, for example) e.g. Maximum heart rate
See the MoxyField SDK sample for more details.
In your case, if I'm understanding your reqs, and if I'm correctly understanding that you're already recording an activity:
- create two FIT fields of type UINT16 (this is enough to handle 65535 goals for each team haha) - e.g. "Team 1 Goals" and "Team 2 Goals"
- at any point in time, the value of each field is the number of goals the corresponding team has scored
- when a team scores, increment the value of the corresponding field
You will get graphs for each team's goals when you view the activity in Garmin Connect. In each graph, there'll be a spike whenever the team scores a goal, otherwise the graph will be flat.
Yeah, I know this kind of continuously-graphed value isn't really ideal for something like "goals scored" but I can't think of a better solution. If you're able to export the FIT data from Garmin Connect and analyze it with your own software, you should be able to spit out a human-friendly table of goals scored.