{"action":"opened","issue":{"url":"https://api.github.com/repos/jonblack/cmpgpx/issues/4","labels_url":"https://api.github.com/repos/jonblack/cmpgpx/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/jonblack/cmpgpx/issues/4/comments","events_url":"https://api.github.com/repos/jonblack/cmpgpx/issues/4/events","html_url":"https://github.com/jonblack/cmpgpx/issues/4","id":126345223,"number":4,"title":"First coordinate skipped when populating alignment arrays","user":{"login":"atarsha","id":381173,"avatar_url":"https://avatars.githubusercontent.com/u/381173?v=3","gravatar_id":"","url":"https://api.github.com/users/atarsha","html_url":"https://github.com/atarsha","followers_url":"https://api.github.com/users/atarsha/followers","following_url":"https://api.github.com/users/atarsha/following{/other_user}","gists_url":"https://api.github.com/users/atarsha/gists{/gist_id}","starred_url":"https://api.github.com/users/atarsha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atarsha/subscriptions","organizations_url":"https://api.github.com/users/atarsha/orgs","repos_url":"https://api.github.com/users/atarsha/repos","events_url":"https://api.github.com/users/atarsha/events{/privacy}","received_events_url":"https://api.github.com/users/atarsha/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-13T05:31:17Z","updated_at":"2016-01-13T05:31:17Z","closed_at":null,"body":"Hi Jon,\r\n\r\nI'm not sure if I've followed your code exactly right, but in the align_tracks() routine while loop, you maintain i > 0 || j > 0.\r\n\r\nThe children if statements then decide which alignment sequence to apply the coordinate to.\r\n\r\nIf I'm right, this means the final coordinate track1[0] and track2[0] NEVER get prepended onto a1 and a2\r\n\r\nMy testing seems to support this, but I have rewritten a lot of this in PHP so it may be a flaw on my part, but logically I see the same issue with the python code.\r\n\r\nYour images on your blog seem to support this as well with the initial coordinate not being blue.\r\n\r\n\r\nI'm trying to figure this out on my end, unfortunately, I'm not extremely familiar with these matrixes, and obviously if i == 0, i-1 is an undefined index which would break these if statements.\r\n\r\nAny insight?"}}