This site Web
Home Page | The Sun API | Gallery | InfoSearch | News | Links | Contact Us

Sunlit Design > The Sun API > Documentation > sdD2Text Function


Index


- Introduction
+ Using the Functions
+ User Guide
+ Function Reference
+ Constants

Contact Developer

Downloads

sdD2Text Function

Description

Returns a string representation of a degree value in Degree:Arcminute:Arcsecond (d:m:s) format. 

Syntax

sdD2Text(degree)
degree   

A numeric degree value.

Return Values

sdD2Text returns a String value.  The string is of the following format:

positive degree values:    " d:mm:ss.ssss" (with a leading space)
negative degree values    "-d:mm:ss.ssss" (with a leading "-" sign)

ss.ssss means that the arcsecond is returned with 4 decimal places.

Errors

If the function detects an error in any of it's input parameters then it returns: "-99999999"

Remarks

The sdD2Text function can also be used to convert an hour value to Hour:Minute:Second format.  See below

Example

Solar Declination is -0.56 degrees.  What is it as a d:m:s value:
    sdD2Text(-0.56) equals "-0:33:36.0000" (i.e. negative 33 arcminutes and 36 arcseconds.)

Solar Hour Angle is 123.34 degrees.  What is it as a d:m:s value:
    sdD2Text(123.34) equals "123:20:24.0000" (i.e. 123 degrees, 20 arcminutes and 24 arcseconds.)

This function works also for hours!
Convert 5.7347 hours to a string Hour:Minute:Second format:
    sdD2Text(5.7347) equals "5:44:04.9200"