Syntax for Units

Registered by Eike

Converting between units is error prone and clutters formulas very much. Therefore the language should have support for units built into it. To have physical units as part of the language the syntax must be extended.

Blueprint information

Status:
Started
Approver:
None
Priority:
High
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
Drafting
Series goal:
Accepted for trunk
Implementation:
Started
Milestone target:
milestone icon 0.4.2
Started by
Eike

Related branches

Sprints

Whiteboard

Blog article about a language with units of measure:
http://blogs.msdn.com/andrewkennedy/archive/2008/08/29/units-of-measure-in-f-part-one-introducing-units.aspx

Syntax
--------
The unit should be written between curly braces, like this: {m/s}. This has the advantage of leaving the square braces for selecting a place/subspace in a distributed variable. It is also more or less correct, according to the German Wikipedia:
http://de.wikipedia.org/wiki/Zahlenwertgleichung

Other Units Packages to investigate
---------------------------------------------

units
    http://pypi.python.org/pypi/units/

quantities
    http://pypi.python.org/pypi/quantities/
    http://github.com/python-quantities/python-quantities

Unum
    License: LGPL
    http://home.scarlet.be/be052320/Unum.html

PhysicalQuantities
    Can really parse unit prefixes.
    http://dirac.cnrs-orleans.fr/ScientificPython/ScientificPythonManual/Scientific.Physics.PhysicalQuantities-module.html

simtk.physical.Quantity
    https://simtk.org/home/python_units

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.