Page 2 of 2

Re: Chart JS error

Posted: Tue Jul 01, 2014 2:26 am
by key
thank you for your advice.
It seems to be two problems.

1. Chart html can not upload csv to upload.php

Missing jQuery link.
I modified html as below:

Code: Select all

--- Freematics OBD-II GPS Data Charting Service-orig.html   2014-07-01 01:13:41.000000000 +0900
+++ Freematics OBD-II GPS Data Charting Service.html   2014-07-01 01:06:14.000000000 +0900
@@ -4,6 +4,8 @@

 <title>Freematics OBD-II/GPS Data Charting Service</title>
 <!-- Le styles -->
+<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
+
 <link href="http://freematics.com/chart/css/bootstrap.css" rel="stylesheet">
 <link href="http://freematics.com/chart/css/bootstrap-responsive.css" rel="stylesheet">
 <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->


CSV file seems to be uploaded to upload.php, but I got error "Data of Engine RPM is not available in this log file."


2. Doesn't parse csv file in upload.php or chartdata.js

upload.php responded to me redirect response.
chartdata.js responds to me broken json data...


I want to fix it because I think the first problem is easily resolved.
For Problem 2, I do not know how they are processed on the server, please let me know the situation.


Thanks.

Re: Chart JS error

Posted: Thu Jul 03, 2014 10:37 pm
by orpheus88
key wrote:thank you for your advice.
It seems to be two problems.
1. Chart html can not upload csv to upload.php
Missing jQuery link.
I modified html as below:

Code: Select all

--- Freematics OBD-II GPS Data Charting Service-orig.html   2014-07-01 01:13:41.000000000 +0900
+++ Freematics OBD-II GPS Data Charting Service.html   2014-07-01 01:06:14.000000000 +0900
@@ -4,6 +4,8 @@
 <title>Freematics OBD-II/GPS Data Charting Service</title>
 <!-- Le styles -->
+<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
+
 <link href="http://freematics.com/chart/css/bootstrap.css" rel="stylesheet">
 <link href="http://freematics.com/chart/css/bootstrap-responsive.css" rel="stylesheet">
 <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->

CSV file seems to be uploaded to upload.php, but I got error "Data of Engine RPM is not available in this log file."
2. Doesn't parse csv file in upload.php or chartdata.js
upload.php responded to me redirect response.
chartdata.js responds to me broken json data...
I want to fix it because I think the first problem is easily resolved.
For Problem 2, I do not know how they are processed on the server, please let me know the situation.
Thanks.

Upload seems to have some problems here too, the first one worked fine, but the next ones all got
504 Gateway Time-out
nginx/1.1.19
when uploading. But I remembered something that was "wrong" with my old log files that made them incompatible with the charting service and is also the same in your 5 lines.

It expects no "," inside the values-field, but the original firmware/sketch creates them if there is more than one value per line, like in the ACC/Gyro-lines and in the parsed GPS lines,it wants the multiple values separated by a blank.
like those (from the data2kml sample csv)
113,F020,-492 16744 -1540
0,F021,78 43 -44

53,10B,37
16,10C,529
48,F010,13541220.000000 251013.000000
0,F00D,166
0,F00A,-34.211570 151.010314
0,F00C,17550
114,F020,-328 16516 -1548
0,F021,75 61 5

57,10D,0
15,10D,0
15,10D,0
15,111,11
23,10B,37
14,10C,532
52,10C,532
46,F020,-588 16404 -1568
0,F021,-29 65 3

55,10D,0
16,10D,0
52,10D,0
13,111,11
21,10B,37
14,10C,528
46,F020,-372 16524 -1460
0,F021,56 57 -3

Re: Chart JS error

Posted: Thu Jul 03, 2014 10:45 pm
by orpheus88
Its simple to fix in the sketch though, just search in datalogger.h for the logdata functions that take multiple input values and replace the "," between the values with a " ", that way your new log files should be compatible.

I can't fix the timeouts in the charting service though, thats on stanley, I just installed a local highcharts-installation on my pc, because of the log-files-too-big problem.

Re: Chart JS error

Posted: Fri Jul 04, 2014 9:33 pm
by stanley
Sorry the service was down just now. I will check what's the reason for that.
Meanwhile, you can always use my open-source utility Data2KML to view the data locally with Google Earth.

Re: Chart JS error

Posted: Sun Jul 06, 2014 12:14 pm
by key
stanley wrote:Sorry the service was down just now. I will check what's the reason for that.
Meanwhile, you can always use my open-source utility Data2KML to view the data locally with Google Earth.


Stanley, sorry I didn't use this application cause I am using a Mac :-(

Re: Chart JS error

Posted: Sun Jul 06, 2014 12:18 pm
by key
OK. I'll try to process the file in the local environment.
I hope that the chart service will be fixed.

Re: Chart JS error

Posted: Tue Jul 08, 2014 5:34 pm
by stanley
The Data2KML utility is open-source. The online service will be improved shortly.