1 Pages (1 items)
Definition of units using xml files - Messages
#1 Posted: 3/1/2017 2:42:37 PM
I try to adjust the units of the portable distribution by a custom xml file in the entries folder.
What I want to do:
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 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.
radpm is declared as unit of frequency (id 265) but should be angular velocity (540), as it is correctly done for rpm and rph
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.
However, not really. The selector box shows the new category, but the dynamic assistant does not.
![2017-03-01 18_25_14-SMath Studio 0.98.6179 - [Page1_].png](/en-US/file/5Qy35d/2017-03-01-18_25_14-SMath-Studio-0_98_6179---_Page1___png)
Here is the custom xml file. place it in the entries folder of the installation directory.
THB.zip (1 KiB) downloaded 32 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.
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
<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
<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>
<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.
<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 (1 KiB) downloaded 32 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.
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 Pages (1 items)
-
New Posts
-
No New Posts