# Besselian Elements

[Besselian elements](https://en.wikipedia.org/wiki/Besselian_elements) are used to calculate data related to the circumstances and observation of solar eclipses. They are represented by a set of numeric values which can be used in conjunction with standard methods developed by Bessel, Chauvenet, Comrie, Meeus and others to perform a variety of eclipse related computations.

If you are performing your own eclipse calculations, the Besselian elements are almost certainly a required input.

For an explanation of the astronomical significance of the numbers included in the Besselian elements, please consult one of the standard sources, such as the *Explanatory Supplement to the Astronomical Almanac*.

{% hint style="info" %}
Acknowledgement:&#x20;

* Eclipse Predictions by Fred Espenak, NASA's GSFC, [NASA/Goddard Space Flight Center](https://support.photoephemeris.com/hc/en-us/articles/eclipse.gsfc.nasa.gov)
  {% endhint %}

### Availability

Besselian elements are available for all solar eclipses occurring between the years 1500 and 2500

### Delta T Predictions

For eclipses occurring in within the coming 12 months, the Delta T values included in the Besselian elements are periodically updated from values predicted by [IERS Bulletin-A](https://datacenter.iers.org/data/latestVersion/bulletinA.txt).&#x20;

As an eclipse  approaches, the predicted value of Delta T may be subject to (typically) minor revisions of the order of a fraction of a second. Such changes, applied to eclipse calculations, change local circumstances timings, position angles, and the location of paths - however, such changes are usually relatively minor.&#x20;

### Request format

Given the midnight UTC on the date of the eclipse, converted to a Julian Day, the request is made as shown:

{% tabs %}
{% tab title="JavaScript" %}
{% code overflow="wrap" lineNumbers="true" %}

```javascript
axios({
	"method": "GET",
	"url": "https://api.radiantdrift.com/solar-eclipse/elements/[JULIAN_DAY",
	"params": {
		"apiKey": [YOUR_API_KEY]
	},
	"headers": {
		"Accept-Encoding": "deflate, gzip, br"
	}
})
```

{% endcode %}
{% endtab %}

{% tab title="cURL" %}
{% code overflow="wrap" lineNumbers="true" %}

```bash
curl "https://api.radiantdrift.com/solar-eclipse/elements/[JULIAN_DAY]?apiKey=[YOUR_API_KEY]" \
     -H 'Accept-Encoding: deflate, gzip, br'
```

{% endcode %}
{% endtab %}
{% endtabs %}

If no elements are available for the given `JULIAN_DAY`, a `404 Not Found` response is given.

### Example

The following request returns the Besselian elements for the total solar eclipse of Apr 20 2023:

{% code overflow="wrap" %}

```
GET https://api.radiantdrift.com/solar-eclipse/elements/2460054.5
```

{% endcode %}

The expected response is as follows:

{% code overflow="wrap" lineNumbers="true" %}

```json
{
  "query": {
    "name": "solar-eclipse/elements",
    "jd": 2460054.5,
    "credit": "Eclipse Predictions by Fred Espenak, NASA/Goddard Space Flight Center Emeritus, http://eclipse.gsfc.nasa.gov/"
  },
  "response": {
    "tMax": 2460054.67912,
    "t0": 4,
    "dT": 69.2,
    "x": [
      0.02685,
      0.49501821,
      0.0000135,
      -0.00000706
    ],
    "y": [
      -0.42736599,
      0.2441992,
      -0.0000494,
      -0.00000368
    ],
    "d": [
      11.41178989,
      0.013741,
      -0.000003,
      0
    ],
    "l1": [
      0.54680401,
      0.0001216,
      -0.0000116,
      0
    ],
    "l2": [
      0.000663,
      0.000121,
      -0.0000115,
      0
    ],
    "mu": [
      240.24293518,
      15.00341988,
      0,
      0
    ],
    "tanF1": 0.004655,
    "tanF2": 0.0046318,
    "latGreatestEclipse": -9.6,
    "lngGreatestEclipse": 125.8
  }
}
```

{% endcode %}

### Raw data

By including the query parameter `raw=1` in the request, the API will return raw data. For example for the request

{% code overflow="wrap" %}

```
GET https://api.radiantdrift.com/solar-eclipse/elements/2460231.5?raw=1
```

{% endcode %}

the expected response is:

{% code overflow="wrap" lineNumbers="true" %}

```json
{
  "query": {
    "name": "solar-eclipse/elements",
    "jd": 2460231.5,
    "credit": "Eclipse Predictions by Fred Espenak, NASA/Goddard Space Flight Center Emeritus, http://eclipse.gsfc.nasa.gov/"
  },
  "response": [
    2460232.25047,
    18,
    69.1,
    [
      0.16965801,
      0.45855331,
      0.0000278,
      -0.00000543
    ],
    [
      0.33485901,
      -0.2413671,
      0.000024,
      0.00000303
    ],
    [
      -8.24419022,
      -0.014888,
      0.000002,
      0
    ],
    [
      0.56431103,
      -0.0000891,
      -0.0000103,
      0
    ],
    [
      0.018083,
      -0.0000886,
      -0.0000103,
      0
    ],
    [
      93.50173187,
      15.00352955,
      0,
      0
    ],
    0.0046882,
    0.0046648,
    11.4,
    -83.1
  ]
}
```

{% endcode %}

In this case, the array included in the `response` property conforms to the following Typescript type:

{% code overflow="wrap" lineNumbers="true" %}

```typescript
export type BesselianElementsRaw = [
  number,
  number,
  number,
  [number, number, number, number],
  [number, number, number, number],
  [number, number, number, number],
  [number, number, number, number],
  [number, number, number, number],
  [number, number, number, number],
  number,
  number,
  number,
  number,
];
```

{% endcode %}

This, in turn can be mapped to the following type as follows:

```typescript
export type Degrees = number;

export type BesselianElements = {
  tMax: number;
  t0: number;
  dT: number;
  x: Array<number>;
  y: Array<number>;
  d: Array<number>;
  l1: Array<number>;
  l2: Array<number>;
  mu: Array<number>;
  tanF1: number;
  tanF2: number;
  latGreatestEclipse: Degrees;
  lngGreatestEclipse: Degrees;
};

function createElements(rawElements: BesselianElementsRaw): BesselianElements | null {

  try {

    const result: BesselianElements = {
      tMax: rawElements[0],
      t0: rawElements[1],
      dT: rawElements[2],
      x: rawElements[3],
      y: rawElements[4],
      d: rawElements[5],
      l1: rawElements[6],
      l2: rawElements[7],
      mu: rawElements[8],
      tanF1: rawElements[9],
      tanF2: rawElements[10],
      latGreatestEclipse: rawElements[11],
      lngGreatestEclipse: rawElements[12],
    }

    return result;
  } catch (error: any) {
    console.log('createElements: %s', (error as Error)?.message);
  }

  return null;
}
```

You can request whichever format (raw or structured) is most suitable for your application and adapt the example code above to convert from raw to your own typed language implementation.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.radiantdrift.com/solar-eclipses/besselian-elements.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
