| ||||
| Home Page | The Sun API | Gallery | InfoSearch | News | Links | Contact Us | ||||
|
Sunlit Design > The Sun API > Documentation > sdDUnpackx Function | ||||
|
- Introduction + Using the Functions + User Guide + Function Reference + Constants
|
sdDUnpackx FunctionDescriptionReturns the component parts of a degree value in an XML string format. The component parts are Sign, Degree, Arcminute, and Arcsecond. SyntaxsdDUnpackx(degree)
Return ValuessdDUnpackx returns an XML String value. The string is of the following format:
ErrorsIf the function detects an error in any of it's input parameters then it returns: "-99999999<Error>-99999999</Error>" RemarksThe sign of the d:m:s value is treated separately because of the "minus zero" problem that is a 'trap for the unwary' with the d:m:s format. The problem is this: on which value (d, m, or s) should the sign be attached? When the d:m:s value is greater than or equal to 1 degree then attaching it to the d value is a good idea. When the d:m:s value is small ie less than 1 degree or less than 1 arcminute attaching the sign to the d value would mean being able to distinguish between plus and minus 0! So the simplest solution is to separate it completely from the numerical values. The value of individual components of the degree value may be extracted from the returned value using the sdxGetv function. ExampleSolar Declination is -0.56 degrees. What are it's d:m:s
components?: Solar Hour Angle is 123.34 degrees. What are it's d:m:s
components?: |
|
||
| (c) 2001-2010 Sunlit Design www.sunlit-design.com Wed, 10 Mar 2010 07:51:10 PM +700 gives UT | ||||