gotzl / ldparser

Parser for MoTec ld files
GNU General Public License v3.0
60 stars 14 forks source link

Found a new conversion value #3

Closed j-antunes closed 4 years ago

j-antunes commented 4 years ago

Hello gotzl,

I was playing with your code and on my files for the channel RPM I noticed that the value is wrong. As an example the real value is 6000RPM but what I get is 1000RPM.

I noticed that the value is wrong by a factor of 6. When looking at the data I noticed that in this section of the code:

self.shift, self.u1, self.scale, self.dec = \ np.fromfile(f, dtype=np.int16, count=4) # .astype(np.int32) image

the self.u1 shows the value 6.

For that reason I modified the function to this: image

I noticed that after doing this modification my RPM channel is working and my other channels are still correct. The reason is that self.u1 is 1 for all the other channels except for the RPM channel which is 6.

What do you think? I think It makes sense to make this modification in your code.

Hope this is helpful. Best regards.

gotzl commented 4 years ago

This looks good to me! Thanks alot!