Positions for a time range

Get body positions at intervals between two dates

Use the body-position end point to obtain the position (and related values) of the Sun, Moon, and/or the Galactic Center in a variety of astronomical coordinate systems.

If both DATE_TIME_FROM and DATE_TIME_TO are specified, the API returns values for the given time range at a default time interval of 60 seconds.

You can override the default interval by supplying your own value for the intervalquery parameter.

The following example calculates the position of Sun every five minutes from 12pm UTC to 1pm UTC on Sep 1 2023:

GET https://api.radiantdrift.com/body-position/2023-09-01T12:00:00Z/2023-09-01T13:00:00Z/?body=sun&interval=300

The response property is a dictionary of calculated body positions at the request times/intervals. An excerpt of the response is:

{
  "query": {
    "name": "body-position",
    "start-date": "2023-09-01T12:00:00.000Z",
    "end-date": "2023-09-01T13:00:00.000Z",
    "obs": null,
    "alg": "standard",
    "high-accuracy": false,
    "body": [
      "sun"
    ],
    "ra-decl": null,
    "extras": [],
    "interval": 300
  },
  "response": {
    "2023-09-01T12:00:00.000Z": {
      "sun": {
        "dateTD": "2023-09-01T12:01:09.140Z",
        "jde": 2460189.00080023,
        "eclipticCoordinates": {
          "λ": 158.80751482,
          "β": 0
        },
        "apparentCoordinates": {
          "decl": 8.26737356,
          "ra": 160.41792175
        },
        "apparentLongitude": 158.80751482,
        "radiusVector": 1.00927514,
        "obliquityOfEcliptic": 23.43621354,
        "equatorialHorizontalParallax": 0.00242033
      }
    },
    "2023-09-01T12:05:00.000Z": {
      "sun": {
        "dateTD": "2023-09-01T12:06:09.140Z",
        "jde": 2460189.00427245,
        "eclipticCoordinates": {
          "λ": 158.81087415,
          "β": 0
        },
        "apparentCoordinates": {
          "decl": 8.26611461,
          "ra": 160.42106895
        },
        "apparentLongitude": 158.81087415,
        "radiusVector": 1.00927432,
        "obliquityOfEcliptic": 23.43621354,
        "equatorialHorizontalParallax": 0.00242033
      }
    },
    "2023-09-01T12:10:00.000Z": {
      "sun": {
        "dateTD": "2023-09-01T12:11:09.140Z",
        "jde": 2460189.00774468,
        ...

Last updated