ni / niveristand-aim-milStd1553-custom-device

Custom device for AIM MIL-STD-1553 hardware
MIT License
1 stars 2 forks source link

Time Conversion Ignores Milliseconds #109

Open KHsu2 opened 11 months ago

KHsu2 commented 11 months ago

The milliseconds of the IRIG time stamp input is ignored by "Source/Custom Device Support/Shared/Convert AIM Time Stamp to NI Time Stamp.vi". This can be reproduced by running the VI in isolation and observing that the milliseconds field of the Time Stamp output does not match the milliseconds field of the input.

Bugfix in screenshot below. image

KHsu2 commented 11 months ago

Same applies to the reverse operation, "Convert NI Time Stamp to AIM Time Stamp.vi"

KHsu2 commented 11 months ago

There is a bug with the suggested implementation above. The AIM IRIG time stamp represents millliseconds as an integer. Consider the time 10.56 and 10.05 where the notation is seconds.milliseconds. The way the IRIG time stamp would represent this is (10, 55) and (10, 5) where the notation is (seconds, milliseconds). The suggested implementation would turn the IRIG time stamp into 10.55 and 10.5. The solution would be to convert the milliseconds field into a floating point and dividing by the number of significant digits required.