added code_unit attribute to section defines in airframe file parsing

always convert degrees to radians, unless explicitly stated otherwise
* if unit and code_unit are specified the value is converted to code_unit and then written to the generated airframe.h file
* this works for default units like deg<->rad, m<->mm, etc.
* only works if the contents of the value attribute can be converted to float, otherwise string is simply copied
* special treatment for unit="deg": if code_unit is not specified, will be converted to rad nevertheless, if this is not wanted explicitly specify code_unit="deg"
This commit is contained in:
Felix Ruess
2011-12-01 01:12:25 +01:00
parent 9d71e49f85
commit fd058ee7d4
2 changed files with 30 additions and 8 deletions
+1
View File
@@ -97,6 +97,7 @@ value CDATA #REQUIRED>
name CDATA #REQUIRED
value CDATA #IMPLIED
unit CDATA #IMPLIED
code_unit CDATA #IMPLIED
integer CDATA #IMPLIED>
<!ATTLIST configure