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

Sunlit Design > The Sun API > Documentation > Foundational Concepts


Index


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

Contact Developer

Downloads

Foundational Concepts

The Sun API is designed around a few simple principles inspired, in part, by the work of Fer J. de Vries (see http://www.de-zonnewijzerkring.nl/eng/index-vlakke-zonw.htm).  These are:

  1. Formulas should be universal and therefore work in both hemispheres and with East and West longitudes.
  2. When measuring North-South Direction: North is positive, South is negative.
  3. When measuring time: Later times are represented by numbers more positive that the numbers representing earlier times.  Which implies that when measuring East-West direction: West is positive, East is negative.
  4. Angular measure and time differences are measured in degrees. This is done through the convention that 1 day = 1 rotation or 24hours = 360degrees.
  5. Time is measured in days.
  6. Functions should be of high accuracy over a long period of time.
  7. All functions are 'pure-functions'. This means that:
    1. All functions provided are completely independent of each other.  
    2. There are no 'side effects' of function execution and 
    3. There is no 'hidden state'.
    4. No function changes the values of it's parameters. I.E. There are no 'by reference' parameters to functions
  8. Functions are designed to be equally useful in a functional composition environment (e.g. Excel) and in a procedural programming environment (e.g. Basic language)