lincomatic / kalenji-gps-watch-reader

Automatically exported from code.google.com/p/kalenji-gps-watch-reader
0 stars 0 forks source link

error while converting a gpx to kalenji format #43

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.configure the rc configuration file with outputs set on Kalenji
2.run the command line 
kalenji_reader -D GPX -i /home/user/running/export.gpx
3.the result is : 
Error: couldn't export to output Kalenji:USB device not found !

What is the expected output? What do you see instead?
My device is an onmove710, i thought it could be possible to import inside it, 
a GPX file, once it has been converted to the Kalenji format
i have tested the Kalenji outpus value in two ways : 
 - expected that it could convert and copy directly to my device, in this case, i tried to put the -p option with the path to my OnMove710, but i get an "segmentation error"
 - expected that it could just create the files in Kalenji format, that i could then copy to my device

What version of the product are you using? On what operating system?
my device is an onmove710, and i run your program using linux mageia 
3.14.24-desktop-1.mga4

Please provide any additional information below.
The import operation that aims to get the file from my device and convert them 
into gpx format works very well

Original issue reported on code.google.com by xdzialos...@gmail.com on 23 Nov 2014 at 11:21

GoogleCodeExporter commented 9 years ago
Hello,

in order to upload to an OnMove710, you need to use OnMove710 as output, not 
Kalenji.

Note that the support of this feature is experimental: I coded it based on some 
information I got from someone who own the watch but I didn't get any feedback 
on it yet, so it may work or not.

Can you please try replacing Kalenji by OnMove710 as output and tell me what it 
gives ?

Note that you may want to use some filter when exporting to the watch, in 
particular ReducePoints that reduce the number of points your GPX contains if 
it's above the limit (200 for OnMove710).

Can you please also tell me if you read some information that is not clear on 
the site leading you to the wrong command (so that I can improve it) ?

Regards,
Colin

Original comment by colin.pi...@gmail.com on 23 Nov 2014 at 9:13

GoogleCodeExporter commented 9 years ago
Hi, 

Thank you for your help, i am aware that it is experimental although, there is 
no program for linux currently to do simply these tasks.

I have done the tests using OnMove710 outputs format (i even tried using 
combination lower/uppercase on this label), and applied the ReducePoints 
filter, that is not needed for my gpx file, because it has only 76 points.
Finally, it seems that the problem comes from the output format that is not 
recognized.

Here is my configuration file : 
directory=/home/guest/running
import=ask
outputs=OnMove710

/usr/local/kalenji-gps-watch-reader/kalenji_reader -D GPX -i 
/home/guest/running/export.gpx -f ReducePoints
  Applying filter ReducePoints
    Reduced session from 76 to 76 points (min angle = pi/64).
Output does not exist: OnMove710

Concerning improvements on your documentation, i think it is clear enough, we 
just have to read it carrefully, maybe it could be nice to have all the README 
file coming with a long help option -h all, something like a short help and a 
long help.
 - You could add something on the (OnMove710) outputs value, in the -o outputs section
 - add something on the -p option in the long help, i understand that it is required only for OnMove710, but when trying to upload, this parameter is not required

Although, i tried to use the -p option like that (with the same configuration 
file)
/usr/local/kalenji-gps-watch-reader/kalenji_reader -D GPX -i 
/home/guest/running/export.gpx -p /run/media/guest/ONMOVE51-71/

and i get the error below
Erreur de segmentation

Regards, 
Xavier

Original comment by xdzialos...@gmail.com on 24 Nov 2014 at 8:48

GoogleCodeExporter commented 9 years ago
Hello,

I don't have much time for now (I'm at work :-)) but I'll have a deeper look at 
your comment in the week.
Can you just confirm if you build the software from SVN ? Or if you use a tar 
from the download section, which version ? If you build from the source, isn't 
there a file OnMove710 in src/output ?

Regards,
Colin

Original comment by colin.pi...@gmail.com on 24 Nov 2014 at 9:04

GoogleCodeExporter commented 9 years ago
Hi, 

You are right, i used the source files coming from the download section and not 
the latest (kalenji-gps-watch-reader-4.9.tar.gz), this release does not 
contains the OnMove710 files in src/output section).
I will try with the latest coming from SVN like you said and i tell you if it 
works.

Regards,
Xavier

Original comment by xdzialos...@gmail.com on 24 Nov 2014 at 9:50

GoogleCodeExporter commented 9 years ago
Hi, 

I tried with the latest release, but i got an error. 
My config file remained the same (outputs OnMove710)

then i tried
/usr/local/kalenji-gps-watch-reader/kalenji_reader -D GPX -i 
/home/guest/running/export.gpx -p /run/media/dzialoszynski/ONMOVE51-71
Erreur de segmentation

and then without the -p option
/usr/local/kalenji-gps-watch-reader/kalenji_reader -D GPX -i 
/home/guest/running/export.gpx
  Applying filter UnreliablePoints
  Applying filter EmptyLaps
Error: path '' does not exist (check option -p <path> on command line or line 
path=<path> in configuration file).
Error: couldn't export to output OnMove710:std::exception

Regards, 
Xavier

Original comment by xdzialos...@gmail.com on 24 Nov 2014 at 10:34

GoogleCodeExporter commented 9 years ago
Hi Colin, 

A little up on this topic

Regards
Xavier

Original comment by xdzialos...@gmail.com on 9 Dec 2014 at 11:42

GoogleCodeExporter commented 9 years ago
Hello,

sorry for having forgotten this issue for some time !

I just did a test. The first one was working. Then I tried with a command line 
more similar to yours and reproduced your issue. I'm a bit ashamed of the 
problem you seem to face, but could you try running with -p option before the 
-i option:

/usr/local/kalenji-gps-watch-reader/kalenji_reader -D GPX -p 
/run/media/dzialoszynski/ONMOVE51-71 -i /home/guest/running/export.gpx

Regards,
Colin

Original comment by colin.pi...@gmail.com on 9 Dec 2014 at 7:43

GoogleCodeExporter commented 9 years ago
I just commited a fix for this issue in SVN. 
Export to OnMove710 is still not validated however, tell me if you have other 
issues.

Original comment by colin.pi...@gmail.com on 9 Dec 2014 at 7:56

GoogleCodeExporter commented 9 years ago
Hello, 

No problem, it's nice of you to take time for this issue.

I have built the program with your last version from SVN.

I have done 4 tests, using two export file, and playing with the option order 
as you were asking.
One comes from a web site, that give the ability the make it from a map => 
export.gpx
the other one comes from the OnMove710 device => 20141206_160517.gpx

Each time the result is the same i get => Document not parsed successfully, and 
nothing is visible when starting the device. However, i could see the attached 
file below while mounting the device, this file seems to be created by the 
import (DBSYSCM.GHB).

Here are the commands line
/home/guest/Documents/running/prg/trunk/kalenji_reader -D GPX -p 
/run/media/guest/ONMOVE51-72 -i /home/guest/running/export.gpx
/home/guest/Documents/running/prg/trunk/kalenji_reader -D GPX -i 
/home/guest/running/export.gpx -p /run/media/guest/ONMOVE51-72 
/home/guest/Documents/running/prg/trunk/kalenji_reader -D GPX -p 
/run/media/guest/ONMOVE51-72 -i /home/guest/running/20141206_160517.gpx
/home/guest/Documents/running/prg/trunk/kalenji_reader -D GPX -i 
/home/guest/running/20141206_160517.gpx -p /run/media/guest/ONMOVE51-72

Regards,
Xavier

Original comment by xdzialos...@gmail.com on 10 Dec 2014 at 1:15

Attachments:

GoogleCodeExporter commented 9 years ago
Hello,

the file DBSYSCM.GHB is not created by kalenji_reader, it should be on the 
watch from the beginning.

The error "Document not parsed successfully" means that the GPX file is not 
valid xml (e.g: a tag not closed). Can you attach one example with which you 
have this issue ?

You can try to validate your file to check if you can find an error. In command 
line, you may have a tool install to do it, typically the commands:
xml <file>
or
xmllint <file>

I attach an example that works for me (to parse and generate, but not tested 
with the watch as I don't have one !), you can compare it if you wish to see if 
you find an obvious difference, or try it with your watch.

Regards,
Colin

Original comment by colin.pi...@gmail.com on 10 Dec 2014 at 8:21

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hello, 

I have verified my files and yours before doing the import another time, with 
xmlstarlet on mageia.
All the files are valid, there is a minor difference, sometime the encoding 
format is written, sometime not (encoding="UTF-8")

Finally i was importing from a bad folder, ... Sorry
/home/guest/Documents/running/prg/trunk/kalenji_reader -D GPX -p 
/run/media/guest/ONMOVE51-72 -i /home/guest/running/export.gpx
In fact my files are in /home/guest/Documents/running/

Now there is no more error message, but the files are not created on the 
device, only on my pc.
Is it due to my configuration files?
directory=/home/dzialoszynski/Documents/running
import=ask
outputs=GoogleMap,GPX

Two files are created, one is a gpx and the other an html file.

Here are the command and result when i use your file
[guest@localhost ~]$ /home/guest/Documents/running/prg/trunk/kalenji_reader -D 
GPX -p /run/media/guest/ONMOVE51-72 -i 
/home/guest/Documents/running/Tour_etang_viry.gpx
  Applying filter UnreliablePoints
  Applying filter EmptyLaps
Creating 
/home/guest/Documents/running/-1216898280-122001552389881091_-1418772363-1080834
09628.html
Creating 
/home/guest/Documents/running/-1216898280-122001552389881091_-1418772363-1080834
09628.gpx

Regards
Xavier

Original comment by xdzialos...@gmail.com on 10 Dec 2014 at 10:16

Attachments:

GoogleCodeExporter commented 9 years ago
Hello

funny, I tried with your files before reading your full message, and I did the 
same error, providing a wrong path (~/export.gpx instead of 
~/Download/export.gpx) ! Therefore I had the same error.

The message is not clear at all: I fixed this by handling the non-existing file 
case. Sorry for the time lost.

The issue you have is that you're missing the -o OnMove710 option in your 
command line.

Regards,
Colin

Original comment by colin.pi...@gmail.com on 11 Dec 2014 at 9:15

GoogleCodeExporter commented 9 years ago
Hi Colin, 

Finally it worked fine thanks to your last tip (-o OnMove710) option.
My last sucessfull command to import on the device was : 
[guest@localhost ~]$ /home/guest/Documents/running/prg/trunk/kalenji_reader -D 
GPX -p /run/media/guest/ONMOVE51-71 -i /home/guest/Documents/running/test.gpx 
-o OnMove710

I will try as soon as possible to see if the track imported can be well played 
by the watch to drive me on a path

Regards
Xavier

Original comment by xdzialos...@gmail.com on 11 Dec 2014 at 9:51

GoogleCodeExporter commented 9 years ago
Hi,

great news ! I hope this will work well.

One thing that could help me, whether it works or not, is if you could try to 
import some gpx files on the watch once with the official software and once 
with kalenji_reader and save the result each time so that I can compare the 
result.

One thing that I would like to test in particular is around different sessions 
names (from a few letters to more than 20 letters). I don't remember if it's 
the file name or the <name> field in the GPX that is used so changing both 
would be nice :-)

For the result you could send me a zip in which you put files without changing 
their name (it's part of the info) with folders like:
test1/kalenji_reader/XXXXXX.GHR
test1/official/XXXXXX.GHR
test1/xxxxxx.gpx
test2/kalenji_reader/XXXXXX.GHR
test2/official/XXXXXX.GHR
test2/xxxxxx.gpx

If you don't have time for this or can't easily use the official software, 
don't worry it's not a problem, just tell me if it works for your usage. But if 
you can proceed with this thorough testing this would ensure the implementation 
is working well.

Regards,
Colin

Original comment by colin.pi...@gmail.com on 12 Dec 2014 at 8:46

GoogleCodeExporter commented 9 years ago
Hi, 

I will try to do this from a laptop at work, with seven, because at home i have 
only linux and for now, it has become impossible either with virtualbox nor 
with wine to use my usb port that are however necessary to plug the watch. 
Meanwhile, i went on this particular website(http://callardin.free.fr/), which 
propose to generate easily a gpx, and then i tried to import it in the watch. I 
had to use the -f ReducePoints filter because this website generate 
automatically the points.

With the same path i generated two gpx having only a difference in the filename 
(<20 or >20 characters)
Here are the commands and results

[guest@localhost ~]$ /home/guest/Documents/running/prg/trunk/kalenji_reader -D 
GPX -p /run/media/guest/ONMOVE51-71 -i 
/home/guest/Téléchargements/little_round.gpx -o OnMove710 -f ReducePoints
Warning: parsing of element 'cmt' in trk not implemented in device::GPX
  Applying filter ReducePoints
    Reduced session from 314 to 169 points (min angle = pi/63).
Transferred session little_round

[guest@localhost ~]$ /home/guest/Documents/running/prg/trunk/kalenji_reader -D 
GPX -p /run/media/guest/ONMOVE51-71 -i 
/home/guest/Téléchargements/long_filename_more_than_twenty_characters_but_litt
le_round.gpx -o OnMove710 -f ReducePoints
Warning: parsing of element 'cmt' in trk not implemented in device::GPX
  Applying filter ReducePoints
    Reduced session from 314 to 169 points (min angle = pi/63).
Transferred session long_filename_more_than_twenty_characters_but_little_round

In each case, the result on the watch is far from reality : 
 - if i go in the detail section on the watch for each path 
              => one is said to be 1952409km, with 30.58km up and 28.26down
              => the other has 0km, with 43,45km up and 0 down
it's strange that the result is different while it is the same gpx excepted for 
the file name

 - the preview is also strange for each path, and has nothing in common with the one i made on the website.

I you need, i could try to export them to GPX from the watch to see how 
kalenji_reader interpret it, but i dont know if there is an option to do that.

Regards
Xavier

Original comment by xdzialos...@gmail.com on 13 Dec 2014 at 1:49

Attachments:

GoogleCodeExporter commented 9 years ago
One more thing you can try under linux is using a name with exactly 15 
characters (like my_little_round) to see if the data you get is more coherent.

Original comment by colin.pi...@gmail.com on 13 Dec 2014 at 10:05

GoogleCodeExporter commented 9 years ago
I patched to make the session name a fix width field (from your comment, I 
think it might be the case). You can test to see if it works better (consistant 
info between imports of your two GPX).

Original comment by colin.pi...@gmail.com on 13 Dec 2014 at 10:34

GoogleCodeExporter commented 9 years ago
Hello, 

Thank you for your last update :)

I have build the kalenji_reader from it, and i have made two gpx with 15 
characters file name.
I took them from two different websites : 
 - my_little_round.gpx => http://callardin.free.fr/
 - export123456789 => http://www.openrunner.com/
(Actually, openrunner feeds the name tag with something larger than 15 
characters.)

However, in the first case, the name is exactly 15chrs. 
Something works better, because now, the track preview is correct! :)
The figures are still wrong if i go in the details section i can see that the 
track has 0km but rises 60.02km and goes down 59.97km. But i should test the 
track to verify if it can be played as it.
I have attached some photos of these screens

Regards
Xavier

Original comment by xdzialos...@gmail.com on 14 Dec 2014 at 11:32

Attachments:

GoogleCodeExporter commented 9 years ago
Here are the GHR files

Original comment by xdzialos...@gmail.com on 14 Dec 2014 at 12:07

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,

thanks, that's great news. I think the guiding should be correct.
For the ascent, descent and distance, I coded it the way I guessed it was 
working from a single example, I'm not surprised it's not working well the 
first time :-)

Your files should help me to understand how to fix it. I'll have a look at it 
in the coming days.

Thank you very much for the time you're spending on testing it.

Regards,
Colin

Original comment by colin.pi...@gmail.com on 14 Dec 2014 at 5:02

GoogleCodeExporter commented 9 years ago
Hello,

I think the distance, ascent and descent are not right because you didn't use 
the filter ComputeSessionStats.

For exporting to the watch, I advise the usage of the following filter, in this 
order:
FixElevation,ComputeSessionStats,ReducePoints

I think this should work well.

Regards,
Colin

Original comment by colin.pi...@gmail.com on 16 Dec 2014 at 8:58

GoogleCodeExporter commented 9 years ago
Hello, 

I've made two tests which seem to work using your advise.
The preview is still ok
The ascent, descent and distance are now ok.

I will test it in real condition as soon as possible, and i ve also to give you 
files coming from the onconnect program when i will have a computer with 
windows.

I'll let you know in few days.

Thank you a lot for your advise, i wrote carrefuly into my instructions for the 
next use of your program.

Regards
Xavier

Original comment by xdzialos...@gmail.com on 16 Dec 2014 at 9:25