# Lunar Libration

Use the `lunar-libration` end point to obtain either geocentric or topocentric [lunar libration](https://en.wikipedia.org/wiki/Libration) values.&#x20;

### Request format

The `lunar-libration`end point requires a date, and optionally accepts an observer latitude and longitude:

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

```javascript
axios({
	"method": "GET",
	"url": "https://api.radiantdrift.com/lunar-libration/[DATE_TIME]",
	"params": {
		["obs": "[LAT,LNG]"]
	}
})
```

{% endcode %}

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

```bash
curl "https://api.radiantdrift.com/lunar-libration/[DATE_TIME][?obs=[LAT,LNG]]
```

{% endcode %}

### Example 1: without observer location

The following request returns the lunar libration for March 20 2015 at 10:11:57.7 UTC:

{% code overflow="wrap" %}

```
GET https://api.radiantdrift.com/lunar-libration/2015-03-20T10:11:57.7Z
```

{% endcode %}

The expected response is:

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

```json
{
  "query": {
    "name": "lunar-libration",
    "date": "2015-03-20T10:11:57.700Z"
  },
  "response": {
    "physicalObservations": {
      "physicalLibration": {
        "lat": 0.03829045,
        "lng": -0.03277045
      },
      "opticalLibration": {
        "lat": -1.22533368,
        "lng": 1.2851531
      },
      "totalLibration": {
        "lat": -1.18704323,
        "lng": 1.25238265
      },
      "selenographicPosition": {
        "lat": 0.26167655,
        "lng": 180.87616357
      },
      "selenographicColongitude": 269.12383643,
      "positionAngle": 335.07160049
    }
  }
}
```

{% endcode %}

### Example 2: with observer location

If the observer location is given, the end point additionally calculates the total topocentric lunar libration. For example, in Svalbard in March 2015 for the total solar eclipse:

{% code overflow="wrap" %}

```
GET https://api.radiantdrift.com/lunar-libration/2015-03-20T10:11:57.7Z?obs=78.222133,15.650467
```

{% endcode %}

Expected response:

```
{
  "query": {
    "name": "lunar-libration",
    "date": "2015-03-20T10:11:57.700Z",
    "observer": {
      "lat": 78.222133,
      "lng": 15.650467
    }
  },
  "response": {
    "physicalObservations": {
      "physicalLibration": {
        "lat": 0.03829045,
        "lng": -0.03277045
      },
      "opticalLibration": {
        "lat": -1.22533368,
        "lng": 1.2851531
      },
      "totalLibration": {
        "lat": -1.18704323,
        "lng": 1.25238265
      },
      "selenographicPosition": {
        "lat": 0.26167655,
        "lng": 180.87616357
      },
      "selenographicColongitude": 269.12383643,
      "positionAngle": 335.07160049
    },
    "topocentricLibration": {
      "libration": {
        "lat": -0.25992041,
        "lng": 0.87406513
      },
      "positionAngle": 335.07397418
    }
  }
}
```

The topocentric libration is typically required for the purposes of simulating the appearance of the Moon at a given time/place, and for determining the effect of the lunar limb on solar eclipse circumstances.
