Experienced developer, new to Garmin, looking for SOE

We had a fully features yacht racing app ready to go on a pebble (RIP) and want to migrate to Garmin Vivoactive HR.
No prior experience with the platform so big learning curve.
Biggest issue is understanding Garmin's "Standard Operating Environment" (SOE)
As our sailing app is deeply involved in tracks, courses and routes I am interested to discover the details of the facilities available to me as a developer to interact with these features.
For example,
  • is it possible to record the GPS values of SOG and COG in the GPX track file?
  • Can I persist other data that may be downloaded from our web site, such user ID, yacht name, yacht characteristics etc?
  • What are the characteristics of a "course" or "route"?
  • What facilities are there for a user to define a course?
  • Is there any documentation at a level between the very high level Programmers Guide and the API Docs which assumes a detailed understanding of Garmin SOE?

Need help!
  • Also as mentioned in other threads, a lot of memory can be taken up using the "layout" mechanism of CIQ. It can be much more memory efficient to do all the drawing yourself with dc.draw... Just gets a bit trickier to run on multiple devices with different screen shapes/sizes.


    Actually, if you plan for being able to support multiple devices in the beginning, it's not bad with dc calls.

    What I do in in onLayout, I figure out the device I'm running on (based on width/height, etc), and then when I want to position something on the screen, I set what I need for that device in onLayout, and just use that variable in onUpdate(). When a new device comes out, I've added the code for that (maybe 10 lines of code in onLayout()) in just a few minutes.

    IIRC, the OP is doing a sailing app, and right now on the va-hr, but if it were me, I'd plan for multiple devices at the start, as after it's done, the requests will come in like "can you support the forerunner 23x/630/737", "Can you add support for the fenix 3", and maybe even for the non wearables - "can you add support for the Oregon?" (the much larger screen in either portrait or landscape, and the the ability to mount it to the boat might appeal to some)
  • I have scanned the FIT SDK reference which explains the structure of the file, and I think I have seen where to add fields to the FIT file, but I'm not clear on how to get the FIT file to POST to my web site. Could you point me to the doco please?

    BTW: cog/sog: course over ground and speed over ground - values usually provided from the GPS. Probably available by default in the FIT file, I'll need to check.
  • With the .fit file, you'll have to do some kind of a script to get it to your website. The .fit will be in the \garmin\activity directory on the watch, or once it's uploaded to Garmin Connect, you can export the .fit and upload that (over BT it will be synced to GC automatically).

    not sure about cog (still not sure what it means), but when you record a .fit with GPS on, the distance and speed is based on GPS, and both are in the .fit already.

    If that's not what you want, in the apps I've been referencing, I do some things where I calculate the distance between two lan/lon pairs, and if you know the time, you can calculate the speed quite easily.. (one of the pairs is the current lan/lon, and the other is either the start location or a waypoint the user marked.)
  • there is no directional information in the .fit file like COG (I assume course over ground?), just the GPS coordinates. So you can calculate the direction but it might not be as accurate second to second as you show on your watch. Probably could get a decent number by smoothing (averaging). As for SOG (speed over ground?), that's just the speed value from the GPS, and yes, that is in the file, although it can also be a bit jumpy so also may need some smoothing. This is no different than any smart watch.

    What is your target audience? Just you? Or are your customers likely to be willing to do the step of connecting the watch to the computer or manually downloading the file from Garmin Connect? Are they likely to have a PC/Mac to do this? There are ways to directly have your server get the .FIT file from Garmin Connect, but a bit more involved.
  • RaceQs. Do you have the watch? If you haven't done it yet, spend a bit of time, use the native app to record a short walk, loot at GC for that walk, etc. Then look at the RecordSample in the SDK, and built it for your watch (last I used it that app was something like 5k - it's tiny). It too will sync it's .fit to GC. With both, you'll get .fit files you can look at (FITtoCSV in the FIT SDK) and see what's there.

    The RecordSample shows that the basics are pretty simple, and with that you get the typical data you expect (based on if GPS is on or off, etc).
  • No I don't have a watch, so am working on what I can glean from the emulator, the doco and this thread.

    Yes COG is course over ground. I have been messing with GPS data for many years and have found that deriving course and speed from successive GPS locations is inadequate for the analysis I'm doing: yacht racing at 6-15 knots (12-25 kps). Smoothing just makes the values more delayed and no more accurate.

    Does the FIT file contain a heading value? Wouldn't that be the GPS COG?

    My target audience is the many thousands of racing sailors, in dinghies, catamarans, sport boats and keelboats who need tactical advice on their wrists. They probably do have their own PC/Mac/tablets, but the world really has moved past users having to connect their watches to computers and doing manual uploads after the race.
    I was able to do all that automatically on the pebble and was really hoping to be able replicate the functionality on the new platform.

    I know I could do it with a companion app on the phone, but don't want to have to write a separate app for Android and iPhone.
  • Menu button on emulator

    I have installed recordSample into Eclipse but it instructs the user to "Press Menu.." and I can't find a Menu button on the emulator.
  • Nope, no directional information in the .FIT file as far as I know. Just the GPS track. I assumed the GPS data wasn't sufficient. How are you getting the COG to view on the watch? Is the compass enough? Did the Pebble provide something sufficient? Given the movement of the watch, I'm guessing any of these watches would just do something with GPS and filtering to compute a current heading. But as Jim mentioned, it's pretty easy to add your own field to the .FIT file and then read it when processing the file on the server.

    If you have the resources, I'd look into the partnership program with Garmin (it used to be $5000 one time fee, not sure what it is now) that would then give you direct access to the users Garmin Connect (GC) .FIT files. You'd obviously still need the watch connected via the phone, but then uploads to GC would happen automatically, and you could get everything you need without a companion app or needing to physically connect the device. You already can do direct web requests from within the CIQ app without writing your own companion app, as long as the mobile GC is running on the users phone.

    I'm guessing this clientele would generally be fine with a device like the Fenix in terms of cost. Also, the Fenix is definitely Garmin's most durable device. I also wonder in this extreme environment if using buttons would be a better bet than the touch screen of the VAHR which could get erroneous clicks. Having it work on both, though, would give the user that choice.
  • I have installed recordSample into Eclipse but it instructs the user to "Press Menu.." and I can't find a Menu button on the emulator.


    click and hold the right button for a couple seconds.
  • "I assumed the GPS data wasn't sufficient." - Not sure what you're getting at here. GPS position is too noisy to derive reliable course and speed.
    "How are you getting the COG to view on the watch?" : I was getting GPS data from the javascript in the phone which was updating the watch at 1Hz.
    "Is the compass enough? Did the Pebble provide something sufficient?" Compass is no good I need the actual course of the boat - the compass only provides the direction it's heading and doesn't allow for current, leeway or the inability of the user to hold the compass correctly.

    The a partnership program would probably the way to go to access users data, but the $5,000 fee is a bit stiff. After all we'll be opening up a whole new customer base for Garmin.