SMath Studio Forum
»
SMath Studio
»
Questions
»
Definition of units using xml files
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,986 Was thanked: 1124 time(s) in 721 post(s)
|
I try to adjust the units of the portable distribution by a custom xml file in the entries folder. What I want to do: - mark the angular units as Angle (id 252)
- mark the number units as Quantity (no id yet)
- mark the corresponding units as Angular velocity (id 540)
- add some local units
Marking means to assign the category shown in the dynamic assistant and used in the unit selector box. Observations: in Units.xml, the angular and numeric units are declared as dimensionless (id 613) and having an id=252 (which is Angle). This is the only <property> entry with an additional id specified. The id attribute seems to be ignored, as the category Angle isn't offered in the unit selector dialog. Code: <units>
<property dimension="613" id="252">
<add factor="1" exp="-2" system="All" id="634">
<synonym name="%" />
</add>
radpm is declared as unit of frequency (id 265) but should be angular velocity (540), as it is correctly done for rpm and rph Code: <property dimension="265">
<add factor="1" system="Metric" id="324">
<synonym name="Hz" lang:rus="Гц" />
<extension for="Hz" lang:rus="Гц">
<prefix name="G" id="325" />
<prefix name="M" id="326" />
<prefix name="k" id="327" />
</extension>
</add>
<add factor="1/60" system="All" id="466">
<synonym name="radpm" />
</add>
</property>
Code: <property dimension="265" id="540">
<add factor="π/30" system="All" id="465">
<synonym name="rpm" />
</add>
<add factor="π/1800" system="All" id="541">
<synonym name="rph" />
</add>
</property>
However, all three units (radpm, rpm, rph) are offered under frequency in the selector box and labeled as frequency in the dynamic help. This is wrong and doesn't really help in the frequent discussions on frequency vs angular velocity. Part of this can be mitigated by re-declaring the units in a custom xml file. Code: <units>
<property dimension="613" title="Angle" lang:ger="Winkel">
<add factor="1" system="All" id="294">
<synonym name="rad" lang:rus="рад" />
</add>
However, not really. The selector box shows the new category, but the dynamic assistant does not. Here is the custom xml file. place it in the entries folder of the installation directory. THB.zip (2kb) downloaded 18 time(s).Summary of the questions: 1. Why can't I use id's for specifying the property titles in the custom xml file? Some of the required strings are already available in the localization files. 2. Why doesn't changing the property title the category displayed in the dynamic assistant? That would be helpful for the angular velocity/frequency confusion. 3. Could the base unit of dimension frequency be set to 1/s instead of Hz? The latter is confusing if angular velocity or whatever dimensionless rates are displayed. Any help is welcome. |
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
Definition of units using xml files
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.