Hi. I am working on a project where i need to do calculations based on physical length measurements. The data i get can consist of three different measurement units (meters, feet, and inches), and there is an arbitrary amount of measurements. The format is
[measurement1][unitX][measurement2][unitX][measurement..n][unit..X]
[measurement1][unitZ][measurement2][unitX][measurement..n][unit..Y]
[measurement1][unitZ][measurement2][unitY][measurement..n][unit..Z]
and so on. My calculations expect the data to be meters, so i have to convert the measurements to meters before i begin my calculations.
How would you go about dynamically converting these measurements to meters, when the units can jump around all over the place?