← All procedures

geo.sunPosition

This function gives the place of the sun at an instant, with the low-precision formulas of The Astronomical Almanac.

CLI
Package
@procedures/geo · README
Path
["geo","sunPosition"]
CLI
mark geo sunPosition --at <number>
As data
{"$proc":["geo","sunPosition"],"input":{}}

Use it

In TypeScript

import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/geo/register"; // registers its procedures

const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["geo","sunPosition"], { at: 1 });
console.log(JSON.stringify(result));

From the command line

$ mark geo sunPosition --at <number>

As data, in a program

{ "$proc": ["geo", "sunPosition"], "input": { "at": 1 } }

Input

FieldTypeRequiredDefaultDescription
atnumberyesThe instant, in milliseconds from the Unix epoch

Output

FieldTypeRequiredDefaultDescription
declinationDegnumberyesThe declination, in degrees. It is from approximately -23.44 to 23.44.
rightAscensionDegnumberyesThe right ascension, in degrees from 0 to less than 360.
equationOfTimeMinnumberyesThe equation of time: the apparent solar time minus the mean solar time, in minutes.
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "at": {
        "type": "number",
        "description": "The instant, in milliseconds from the Unix epoch"
      }
    },
    "required": [
      "at"
    ],
    "additionalProperties": false
  },
  "output": {
    "type": "object",
    "properties": {
      "declinationDeg": {
        "type": "number",
        "description": "The declination, in degrees. It is from approximately -23.44 to 23.44."
      },
      "rightAscensionDeg": {
        "type": "number",
        "description": "The right ascension, in degrees from 0 to less than 360."
      },
      "equationOfTimeMin": {
        "type": "number",
        "description": "The equation of time: the apparent solar time minus the mean solar time, in minutes."
      }
    },
    "required": [
      "declinationDeg",
      "rightAscensionDeg",
      "equationOfTimeMin"
    ],
    "additionalProperties": {}
  }
}