lms-org / lms

Lightweight Modular System
Apache License 2.0
10 stars 4 forks source link

Calculate in configs #87

Open Phibedy opened 8 years ago

Phibedy commented 8 years ago

Calculate in configs,

<config>
 <a>6*4+7</a>
 <a>6^2+7</a>
<fancy>4rad*20degree</fancy>
<awesome>5m+3cm+4mm</awesome>
<legendary>5m*3cm + 2m^2</legendary>
</config>

The framework would calculate in SI-units and rad

syxolk commented 8 years ago

Units to convert:

Phibedy commented 8 years ago

We could also add some constants: https://en.wikipedia.org/wiki/Physical_constant

<a unit="mbar/K*J>5cm</a>

We should remove lconfs

Phibedy commented 8 years ago

Might be useful:

syxolk commented 8 years ago
<config id="environment">
  <unit name="street_width">12m</unit>
</config>

<module>
  <config>
    <int name="id">12</int>
    <raw src="lookup_table.csv" />
    <int name="road_width">${street_width} / 2</int>
  </config>
  <config use="environment" />
</module>