HARLEY: Reformatting Data Output by Street Tuner
#1
Reformatting Data Output by Street Tuner
Not sure anyone has done this but collected data from the street tuner has a file extension of ".hdx" but is really based on XML (hdx - HD XML?) . Simply relabeling the file to XML allows it to be imported into Excel. The data is all there but not really in a format that makes it easy to look at.. Is there an easy way to format the data so that the name appears as a heading and the data values appear below the name. It would make looking at the data much more convenient then what the data display tool does inside street tuner.
I'm thinking the right xml schema file might work but have no idea on how to generate it.. For me the easiest way would be to write something in C# that reads in the file and simply runs through the records pulling out the pertinent data then formating into a CSV file.
Thanks for any ideas.
Pic of file read into Excel.
I'm thinking the right xml schema file might work but have no idea on how to generate it.. For me the easiest way would be to write something in C# that reads in the file and simply runs through the records pulling out the pertinent data then formating into a CSV file.
Thanks for any ideas.
Pic of file read into Excel.
#2
Don't know if anyone is interested in this but I wrote a program to extract the data names out of the HDX log file.. Wasn't too hard. Kinda rusty at C# tho. Next I'll build a reader to pull the data records of interest and plot in columnar format with labels at the top.
Data name extraction
Data name extraction
#3
#5
#6
Yeah I noticed that.. I suspect that the reason for it is emissions when cold. I started the bike and ran it only long enough to collect about 20 seconds of data so that I had something to work with.. Will probably collect some real data on Wednesday.
#7
If you have a run file I'll see if I can get it working with the other tuner. What I have works for the street tuner but don't know about how the data is collected for the other tuner. The method is adaptable but a bit of a hack. A person that knows XML would have done a better job..
Output from the version that works.
Trending Topics
#8
Have you seen this XML to csv conversion site (one of several web converters)?
http://www.convertcsv.com/xml-to-csv.htm
or this one
http://www.luxonsoftware.com/converter/xmltocsv
http://www.convertcsv.com/xml-to-csv.htm
or this one
http://www.luxonsoftware.com/converter/xmltocsv
#9
Those 2 were better than the few that I found. The problem is that the data is not formatted correctly and it does not remove the extraneous data..
You can get a xml structure viewer from Microsoft called "XML notepad" to view the structure. It's free from MS.. Reading the file in you find the data in the "recording/dataFrames" called a "dataFrame". Each "dataframe" has "cumulativeTmsec" and elements called "dataItems" The "dataItems" have the "Name"and "ItemValue".. You need to walk through the data and pull out all the "cumulativeTmsec" and "dataItem/itemValue"s then reformat in a columnar fashion.
It turned out to not be too hard to parse the xml data in C# once I figured out the class methods to do so.. I also needed a configuration file to reassign data labels to something MLV can use. For instance the data label for "MAP" is "d_map" in the xml file.. It's better to give that data the label "MAP" as MLV has features that recognize that label.
You can get a xml structure viewer from Microsoft called "XML notepad" to view the structure. It's free from MS.. Reading the file in you find the data in the "recording/dataFrames" called a "dataFrame". Each "dataframe" has "cumulativeTmsec" and elements called "dataItems" The "dataItems" have the "Name"and "ItemValue".. You need to walk through the data and pull out all the "cumulativeTmsec" and "dataItem/itemValue"s then reformat in a columnar fashion.
It turned out to not be too hard to parse the xml data in C# once I figured out the class methods to do so.. I also needed a configuration file to reassign data labels to something MLV can use. For instance the data label for "MAP" is "d_map" in the xml file.. It's better to give that data the label "MAP" as MLV has features that recognize that label.
#10