Closed (works as designed)
Project:
Units API
Version:
7.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Oct 2014 at 04:25 UTC
Updated:
16 Oct 2014 at 02:53 UTC
Jump to comment: Most recent
Comments
Comment #1
laboratory.mikeIt sounds like you are getting kPa instead of bar, most likely it's a mis-entry of two values that likely would be next to each other in a table.
Comment #2
laboratory.mikeI checked the values; they have been entered correctly in the XML file, namely 1 bar = 100,000 Pa (1 E+5) and 1 psi ~ 6,894 Pa (6.894 E+3). I did notice that there are spaces in the decimals, i.e. for psi it's '6.894 757 E+03' . I would have to test and see if it's rendering as 6,894 or if it's rendering as something else. If so, there are several values that need to be changed.
Comment #3
laboratory.mikeWhat are the values shown on the help page? I am getting straight zeros (it's not reading the file), so maybe the read value is incorrect. If that's also right... hopefully we don't have to use drupal_set_message all over the place to find where it's going wrong.
Comment #4
r0nn1ef commentedAfter trying to find the problem for three days and eventually writing my own function for the conversions, i was still getting the same results. I then proceeded to inspect the source data; and XML file from my dive computer, and the pressure values are stored without the decimal value. I went back and verified the values in my dive log software from the manufacturer and compared that the the values stored in the XML. The solution was to multiply the source values by .01 to put the decimal in the correct position.