ratal / mdfreader

Read Measurement Data Format (MDF) versions 3.x and 4.x file formats in python
Other
169 stars 73 forks source link

Incorrect data conversion #205

Closed seanLiu716 closed 1 year ago

seanLiu716 commented 1 year ago

Python version

Please write here the output of printing sys.version 3.9

Platform information

Please write here the output of printing platform.platform() Windows 11

Numpy version

Please write here the output of printing numpy.__version__

mdfreader version

Please write here the output of printing mdfreader.__version__ V4.1

Description

I read a signal (LMotSpd) with MDFReader V4.1.

yop.get_channel('LMotSpd')

Out[32]: {'unit': 'rpm', 'description': ' Motor Present Speed\nºóÇý¶¯µç»úתËÙ·´À¡', 'master': 't_8_8', 'masterType': 0, 'data': array([24999, ..., 24999], dtype=uint16),

The data did not consider the offset of 25000. The signal definition in CAN database is uint16, factor =1, offset = -25000.

So the first data point is -1 RPM, instead of 24999 RPM.

Commercial software, e.g. AVL Concerto, Vector CANalyzer can process the mdf file correctly.

Please fix the issue.

Thanks,

seanLiu716 commented 1 year ago

Thanks @max3-2 for solving my problem.

seanLiu716 commented 1 year ago

Refer to https://github.com/ratal/mdfreader/issues/204