1. precious-json(7)
  2. precious-json(7)


precious-json - tells precious what is wanted


Data format / expectations about what goes in and out of precious.


A precious sample of valid json input / request:

{ "utc": "1974-06-30T21:45:00.000Z"
, "stuff": [[0], [0, 1], null]

This query is about where on the ecliptic (0) the Sun (0) and Moon (1) would be found, given a moment of time. And here is The corresponding sample of precious output / response:

{"1": {"0": {"0": 98.70827783123845}, "1": {"0": 238.13984880619816}}}


Specification of the request / instructions (or else defaults) - the precious can take.


A relative or absolute path to the Swiss Ephemeris data files.


We get "json" by default anyway (same as null). A bit more human-readable output is "pprint". Even better is Eden's command line interface.


The kind of stuff to be returned, or null, or empty array(s) [] - mean all the same default equivalent. The first array [0, 3] respectively yields ecliptic position and speed for each item of interest. These map directly to results of the swe.calc_ut function. The second array contains the main kind of things - returned with key of '1'. The third array contains the minor kind of things - offset by 10,000 and returned with key of '2'.


Undefined (or null) utc time - means the current moment will be used. Otherwise provide a string in ISO-8601(7) format (which must end with a Z). Seconds are optional, plus even more optional precision after a decimal. The default is 3 digit precision, i.e. milliseconds.


Besides the utc semi-convenience, this ut array of time fragments will be passed on directly to the swe.utc_to_jd function (as its arguments). It takes precedence over any utc value that it is otherwise derived from. Such option exists in case an intermediate conversion is not wanted.


Given geo location with its lat / lon coordinates such as "geo": { "lat": 43.2166667, "lon": 27.9166667 } means there can and will be angles (e.g. Asc / Mc) keyed as '3'. These come from the swe.houses function, however there may or may not be house cusps in the final results output - read about the next option.


A value of false for the houses means we are not interested in any cusps, rendering any house system irrelevant (for the particular request). None will be returned, even if the prerequisite geo coordinates are provided. Check the swiss ephemeris manual for a list of valid house system codes. Anyway, the 12 cusps array would be keyed as '4'.


An object of various predefined what (0 or more) hashed things - e.g. "extra": {"<what>": {<with-optional-config>}}. So, this asks for extra info - to be keyed as "0" in the response, directly corresponding to any of the following what(s), with possible config settings:

"re": preserves a copy of the json input, i.e. the request {object}

"time": (to be implemented) time stamps / performance metrics, e.g. includes [<start-time>, <end-time>]


A hash of (string-numbered) things, the precious yields.

0: {<Object>}

what corresponds to the extra(s), for post-processing

1: {<Object>}

major stuff from swe.calc_ut below the 10K items

2: {<Object>}

minor stuff from swe.calc_ut above the 10K items

3: [<Array>]

the angles, also depend on geo-location

4: [<Array>]

the houses, since being handed anyway -- otherwise mostly irrelevant


precious(1), JSON(7), ISO-8601(7)


Index(7), Base(7)

  1. September 2012
  2. precious-json(7)