Location info on iPhone from Imported DL logs?

Discussions about the smartphone versions
Post Reply
CompuDude
Posts: 18
Joined: Thu Nov 02, 2006 00:40

Location info on iPhone from Imported DL logs?

Post by CompuDude »

Hi, I've been using and liking (overall) DivingLog and the Dive Log app for some time now.

Currently I still use SmartTrak for my primary dive log, as it has more fields and options for me to work with, and easily imports directly from my Uwatec computer via IR. I used to use AquaDiveLog, which downloaded my dive computers logs directly into my Palm Treo, and then I could update the info live on the boat, and sync much more accurate info into SmartTrak, but this works well enough that I've given up carrying the deactivated Treo around just for diving.

Here is my workflow:

1) Dive. :)
2) Log basic information about the dive, such as site names, short description, buddy name, etc. into iPhone app, usually while still on the boat, or sometimes while in the car between shore dives
3) Download dive computer logs into SmartTrak via IR.
4) Transcribe short iPhone-based text description/comments/notes into SmartTrak notes field
5) Fill in missing info to flesh out logbook entries
6) Import new dives from SmartTrak log to DivingLog program
7) Export updated file to iPhone, overwriting everything there. (field-entered notes are over-written with the more formal logs from the PC)

And repeat as often as possible. ;)

The system is working well for me, although it's certainly a little unwieldy with all those steps.

The main stumbling block, however, is annoyances of entering dive info into the iPhone directly. The issue is the dive locations. Any locations have to be manually entered, no matter how many times I have dove their before. If I dive "Italian Gardens" and "Rock Quarry" and "Eel Cove", all sites on Catalina Island, I have to manually enter "Catalina Island" as a new (?!?!?) location, and then add each site (even though I have dove each many times) manually as well. If I do a second dive at that same location before completing my workflow, I can pick the island, dive site, etc. from the pick list, but once it's pull from the PC again, all quick lists are wiped out and I'm reduced to entering the sites again by hand (hoping for no typos or accidentally entering data a second way).

Second issue:
Since there is no way for me to pull data directly from the computer (iPhone has no IR, I realize, so this is not DL's fault) like I could with my Treo and ADL, I tend to enter rough times that I did each dive, rather than the precise times. When we stop for lunch for instance, I'll batch enter the first dive we did (roughly 8am, for roughly 60 min, max 90', site name and descriptive log), the second (roughly 10 am, for roughly 50 min, max 85', site name and descriptive log), and third (roughly 12 pm, for roughly 65 min, max 85', site name and descriptive log), all at once. Rather than actually paging through my computer screen by screen and trying to enter precise start/stop time + depth, etc., I use the approx info and merge the entries manually back and home when I'm updating everything at Steps 4+5, above. I assume there is no way to merge the entries automatically, is there? I see another thread discussing this but not quite from the same angle.

Final issue (much less important):
Probably not possible due to my multi-step workflow, but is there anyway to keep the iPhone buddies list linked to the address book contacts after the import? I suspect they are maintained on the Mac side, since the iPhone and Mac both share an address book and contact list, but when going to PC, since I currently am not actually syncing any info (other than manually re-typing), any contacts I choose for buddies are overwritten with the new, un-linked data from the PC.

Thanks!
gregm
Posts: 54
Joined: Tue Jan 06, 2009 23:04
Location: Bellingham, WA, USA
Contact:

Re: Location info on iPhone from Imported DL logs?

Post by gregm »

Hi,

Thanks for sharing your experiences with Dive Log on iPhone and Diving Log 4.0. I'm the developer of Dive Log on iPhone and I'll try to address some of your issues. Sven, the developer of Diving Log 4.0 is also planning to post and address your issues as well from the Diving Log 4.0 point of view.

Based on your stated work flow, I think that there might be one step that you could take that might improve the experience a little bit for you. As you point out, when you sync from Diving log 4.0 to Dive Log on iPhone the existing file on the iPhone is completely replaced by the data being synced from Diving Log 4.0. This model was chosen for a number of reasons (iPhone battery life, network connection reliability and keeping the heavy lifting on the more powerful desktop device). Therefore, if you were add the step of syncing your iPhone to Diving Log 4.0 prior to importing the data from SmartTrak and syncing back to the iPhone more of your location data and buddy data would be preserved (since the location data that you added on the iPhone originally would make the round trip back to the iPhone).

In order for the step above to work for you, you would be maintaining your logbook in Diving Log 4.0 in parallel with SmartTrak. I'll let Sven address the details of "automatic merging" of imported dives from SmartTrak, but as you have seen from the other thread that you mentioned, he has been working on this feature and has some support available for certain importers. You can have a look at Sven's Blog entry at: https://www.divinglog.de/blog/?p=253 for a little more information on this. I'm not familiar enough with the details of merging data using Diving Log 4.0 to know if it would be possible to override your "approximate" values using the exact values from SmartTrak. I do provide a similar feature for Mac users (using Dive Log Manager) and in that case, the data merged from the desktop always overrides the iPhone data if it is dive computer related (depth, time, entry time, etc.), preserves the iPhone data for things like Dive Sites, Buddies and environmental conditions (things that you capture at the dive site) and appends/merges some data like comments.

Here is a little background on why the above suggestion will improve your experience with the location data on the iPhone. (There is also a Blog post that goes into some detail on this at: http://moremobilesoftware.blogspot.com/ ... s-101.html). The database format supported by both Dive Log on iPhone and Diving Log on the PC supports two ways to encode information about things like Dive Sites, Countries, Cities and Buddies. The information can be stored "in line" with each dive log entry as a simple text string or it can be stored as a relational entry in a separate table that is linked to the appropriate dive log entries. The reason for having both ways to address these items in the database format is somewhat historical but also has some practical application when importing from various logbook formats (I'll not go into those here for the sake of brevity). Dive Log on iPhone and Diving Log 4.0 both support using both forms of this data, but in the case of iPhone, it always creates items that are of the relational type and more importantly only uses those relational entries when offering previous entries that you can select from (this is also true for the Statistics section of Dive Log on iPhone). The main reason for this is performance ... the iPhone is an amazing device, but in the end of the day it is still a phone with limited processing power and limited memory relative to the desktop ... it is much more expensive to prowl through the database looking for all the possible string entries and sorting the list to be unique than it is to look up the entries in the relational table (some of which might have the same name adding further confusion). So, if you have previously enter a dive site and dive that same site again, Dive Log on iPhone will offer that as a possible site when you go to enter a new dive (it will also populate the City and Country information automatically if you have previously used that site with a specific city and country in the past). Diving Log 4.0 offers this same support, but by default it's entries are created as the string only type entry unless you click the little "chain link" icon next to the Site/City/Country/Buddy field when you enter that information. When Dive Log on iPhone and Diving Log 4.0 are sync'ed, these linked references are maintained.

So, if you are able to sync the iPhone with Diving Log after you return from your trip and then sync with SmartTrak before syncing back to the iPhone, the relational entries will be maintained and all he additional information that you might have captured with your iPhone about a dive site (like the GPS coordinates) will be maintained as well. One other side note, in most cases, when you import a 3rd party log into Diving Log 4.0 (or Dive Log Manager on the Mac) the Site/City/Country/Buddy fields are usually entered as string only fields (so that the import can be more automatic ... otherwise the importer would have to confirm that each site (for example) actually corresponded to a particular entry in the site table). This is why importing your SmartTrak data causes the Dive Site to revert to a "string only" entry after you import it.

I hope that helps. Please feel free to follow up if you'd like me to clarify any of the above points.

I'll post a second reply to deal with the Buddy questions since this post is getting a little long :-)!

Cheers,

Greg
gregm
Posts: 54
Joined: Tue Jan 06, 2009 23:04
Location: Bellingham, WA, USA
Contact:

Re: Location info on iPhone from Imported DL logs?

Post by gregm »

Final issue (much less important):
Probably not possible due to my multi-step workflow, but is there anyway to keep the iPhone buddies list linked to the address book contacts after the import? I suspect they are maintained on the Mac side, since the iPhone and Mac both share an address book and contact list, but when going to PC, since I currently am not actually syncing any info (other than manually re-typing), any contacts I choose for buddies are overwritten with the new, un-linked data from the PC.
I'm not completely sure that I understand what is going on with Buddies in this case, but there are a couple of possibilities.

There are two senses in which Buddies are "linked" in Dive Log on iPhone. The first is along the lines addressed in my previous post where Buddy entries can either be stored as a string within a given dive or as a referenced list to another table of Buddies stored within the database format. The second (which I think we are talking about here) is the linking of Buddy entries in Dive Log on iPhone to the Contacts database on the iPhone (i.e. if a Buddy item shows up with a "green" linked icon or a "red" unlinked icon).

The first type of Buddy linking will be helped by adding the extra step that I proposed in my previous post. Again, the issue is that the Buddies entered on the iPhone to a dive are always created with the relational type of entry (rather than just the simple string). When the iPhone's log is replaced by syncing with Diving Log 4.0 without first syncing the iPhone's log to Diving Log 4.0 the Buddy table is lost (and all the relational references within the dives). If the iPhone log was first sync'ed to Diving Log 4.0, then the Buddy table would be intact and (assuming that merging the data with SmartTrak didn't replace the linked buddy entries for a given dive) so would the references within each dive.

The second type of linking is not related (for the most part) to syncing with Diving Log 4.0. Dive Log on iPhone has a couple of challenges when dealing with the Contact's database. There were some bugs in the early versions of iPhoneOS that caused problems when saving away references to a contact in a separate data store (the handles to these saved contacts would be changed when syncing with MobileMe or iTunes under certain circumstances causing the saved references to get the wrong contact or no contact at all). So, to be safe, I chose a different way to link Buddies stored in the Dive Log database to Contacts in the iPhone address book. When you first load the Buddy list on the iPhone, Dive Log looks through the Contacts database on the iPhone and tries to match up Buddies with Contacts. If it is successful, it then uses the information in the iPhone's contacts database for the Buddy information (like address, e-mail, etc.), otherwise it marks the contact as "not linked" and uses the information saved in the Dive Log database. This is also true when you look at a specific dive's Buddy list that is based on a string entry (rather than a relational entry) ... the list is parsed and the names are attempted to be matched to Contacts in the contacts database on the iPhone (this way if you tap on a Buddy with a "green" linked icon you will see the information about that Buddy from your Contacts database).

When you create a new Buddy within Dive Log on iPhone, you have two possibilities. You can either create a linked Buddy (in which case you either pick an existing iPhone contact or create a new one and the data is pulled into the Dive Log database so that it can be synced to Diving Log 4.0 on the PC) or you create an "unlinked Buddy" (in which case you enter all the data and it is only stored within the Dive Log database). It is worth noting that if you create an unlinked Buddy and the data matches a contact in your Contacts database on the iPhone it will show up as a linked Buddy the next time you open Dive Log on iPhone (this is a side effect or trying to work around the other bugs in iPhoneOS). Buddies that you create as linked will be saved into your Contacts on iPhone and these entries will later be synced (via iTunes) to your PC if you have that setting turned on within iTunes (typically with Outlook's address book).

So with that background, back to your point, with your current workflow, any Buddies that are entered in to the Dive Log on iPhone database will be lost once you sync back from Diving Log 4.0 and the references in a given dive will be replaced by "string only" Buddy lists imported from SmartTrak (any information also saved as a Contact is preserved on the iPhone in the Contacts database though). This means that the Buddy table will no longer show these Buddies (since it is reporting the contents of Dive Log's internal Buddy table). However, assuming that the name of the Buddy saved in the SmartTrak Buddy field that is synced back to the iPhone via Diving Log matches the name of a Contact on the iPhone (match means "first name and last name can be matched exactly ignoring capitalization". So "Joe Brown" will match "joe Brown" but will not match "Joseph Brown" or "Dr. Joe Brown".) the Buddy will show up as linked (i.e. a "green" icon) when you view any particular dive.

Assuming that you are able to add the step of syncing Dive Log on iPhone with Diving Log 4.0 before importing your dives from SmartTrak, then you should continue to see the Buddy table when you tap the Buddy Tab on the iPhone. Depending on how you merge the data from SmartTrak, the Buddy entries may still be maintained as relational entries or may be converted to string only entries. When you look at them within a dive they will still be "matched" to the Buddy list and display the appropriate "green" or "red" icon, however if they were converted to string only entries the dive would not show up in Statistics under the "Dives by Buddy" statistics.

I believe that some of the bugs in iPhoneOS that made the Buddy/Contacts integration so complicated have been fixed in iPhoneOS3.0. So once I am able to switch to deploying an iPhone3.0 specific version of Dive Log I should be able to simplify the Buddy handling a little bit. I can certainly appreciate how complicated all the above must seem (you should have seen what it was like to implement!), but in most cases it works without you having to think about it. Your case is a little more complicated (adding a third logbook application) and that is part of why it is more exposed.

Please feel free to post back (or contact me directly at "support at moremobilesoftware dot com") if I have missed your issue or if you have more questions.

Cheers,

Greg
divinglog
Site Admin
Posts: 5224
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: Location info on iPhone from Imported DL logs?

Post by divinglog »

Thank you very much for your great explanations and assistance, Greg!

Regarding the data merging during the import: I'm currently adding this feature for all importers, in the blog post which Greg has linked you can see the importers which are already done. The SmartTrak import is unfortunately not yet finished, but the Smart irda download is already finish. This feature enables entering the basic dive information on the iPhone directly after the dive, sync it back to the PC and then import/download the computer data. During the merging only empty fields will be updated, except the dive time, max depth, entry time and date will be updated, even if they are filled in, because these are usually more accurate from the computer (note: this is not yet included in the importer linked in the blog post).

Kind regards,
Sven
Post Reply