|
|
|
|
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:
- Formulas
should be universal and therefore work in both hemispheres and with East and
West longitudes.
-
When measuring North-South Direction: North is positive, South is negative.
- 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.
- Angular
measure and time differences are measured in degrees. This is done through
the convention that 1 day = 1 rotation or 24hours = 360degrees.
- Time is measured in days.
- Functions should be of high accuracy over a long period of time.
- All functions are 'pure-functions'. This means that:
- All functions provided are completely independent of each
other.
- There are no 'side effects' of function execution and
- There is no 'hidden state'.
- No function changes the values of it's parameters. I.E. There are no
'by reference' parameters to functions
- 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)
|
|