Position at a given time

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.

axios({
	"method": "GET",
	"url": "https://api.radiantdrift.com/body-position/DATE_TIME_FROM",
 	"params": {
		"body": "[BODIES]"
	},
})
curl "https://api.radiantdrift.com/body-position/DATE_TIME_FROM/?body=BODIES"

Example

Here is the response for the query:

GET https://api.radiantdrift.com/body-position/2023-06-25T17:04:02Z/?body=sun,moon
{
  "query": {
    "name": "body-position",
    "start-date": "2023-06-25T17:04:02.000Z",
    "obs": null,
    "alg": "default",
    "high-accuracy": false,
    "body": [
      "sun",
      "moon"
    ],
    "ra-decl": null,
    "extras": [],
    "interval": 60
  },
  "response": {
    "2023-06-25T17:04:02.000Z": {
      "sun": {
        "dateTD": "2023-06-25T17:05:11.157Z",
        "jde": 2460121.2119346876,
        "eclipticCoordinates": {
          "λ": 93.89663542937978,
          "β": 0
        },
        "apparentCoordinates": {
          "decl": 23.38102409695048,
          "ra": 94.24584067466517
        },
        "apparentLongitude": 93.89663542937978,
        "radiusVector": 1.0164662084675626,
        "obliquityOfEcliptic": 23.436237679727896,
        "equatorialHorizontalParallax": 0.0024032060860899635
      },
      "moon": {
        "dateTD": "2023-06-25T17:05:11.157Z",
        "jde": 2460121.2119346876,
        "eclipticCoordinates": {
          "λ": 177.04245513872277,
          "β": 2.9084870004880736
        },
        "geocentricSphericalCoordinates": {
          "λ": 177.04245513872277,
          "β": 2.9084870004880736,
          "Δ": 400430.97518737416
        },
        "apparentCoordinates": {
          "ra": 178.4417120295634,
          "decl": 3.8455405824505817
        },
        "apparentLongitude": 177.04009669930034,
        "obliquityOfEcliptic": 23.43829458272879,
        "radiusVector": 15430.415187374168,
        "nutationInLongitude": -0.002358439422450305,
        "nutationInObliquity": 0.0020565238968814482,
        "equatorialHorizontalParallax": 0.912656133327504,
        "meanElongation": 88.29813566282974,
        "meanAnomalySun": 170.24599990349998,
        "meanAnomalyMoon": 223.11234450782652,
        "argOfLatitude": 150.98331171029713
      }
    }
  }
}

This endpoint calculates coordinates and related values for the Sun, Moon, and/or Galactic Center for the given [DATE_TIME] parameter.

Last updated