# Fresnel Zone API
> Fresnel-zone and line-of-sight clearance maths for radio-link planning as an API, computed locally and deterministically. The radius endpoint computes the Fresnel-zone radius at any point along a path, rₙ = √(n·λ·d1·d2/(d1+d2)) with λ = c/f, together with the wavelength and the 60 % clearance that a near-free-space link needs. The midpoint endpoint gives the widest radius — the zone is fattest at the path midpoint — and its 60 % clearance, the figure you size antenna heights against. The earthbulge endpoint adds the earth-curvature bulge, h = d1·d2/(12.75·k) with k ≈ 4/3 for a standard atmosphere, and combines it with the Fresnel clearance into a total obstruction clearance for the path. Distances are in kilometres, frequency in gigahertz, radii in metres. Everything is computed locally and deterministically, so it is instant and private. Ideal for wireless, WISP, microwave-backhaul, LoRa and amateur-radio app developers, link-planning and coverage tools, and RF engineering education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is Fresnel-zone & line-of-sight clearance; for free-space path loss and link budget use a path-loss API and for antenna gain use an antenna API.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/fresnel-api/..."
```

## Pricing
- **Free** (Free) — 2,000 calls/Mo, 2 req/s
- **Starter** ($9/Mo) — 20,000 calls/Mo, 5 req/s
- **Pro** ($24/Mo) — 120,000 calls/Mo, 15 req/s
- **Mega** ($75/Mo) — 600,000 calls/Mo, 40 req/s

## Endpoints

### Fresnel

#### `GET /v1/earthbulge` — Earth-curvature bulge

**Parameters:**
- `distance1` (query, required, string) — Distance from one end (km) Example: `5`
- `distance2` (query, required, string) — Distance from the other end (km) Example: `5`
- `k_factor` (query, optional, string) — Earth-radius factor k (default 4/3) Example: `1.333`
- `frequency` (query, optional, string) — Frequency (GHz) for total clearance Example: `2.4`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fresnel-api/v1/earthbulge?distance1=5&distance2=5&k_factor=1.333&frequency=2.4"
```

**Response:**
```json
{
    "data": {
        "note": "Earth bulge h = d1·d2/(12.75·k), k≈4/3 for standard atmosphere. Total clearance ≈ earth bulge + 60 % of the first Fresnel zone.",
        "inputs": {
            "k_factor": 1.333,
            "distance1_km": 5,
            "distance2_km": 5
        },
        "earth_bulge_m": 1.47096,
        "frequency_ghz": 2.4,
        "fresnel_radius_m": 17.67155,
        "total_clearance_m": 12.07389
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:10.763Z",
        "request_id": "415532f5-07b9-46cc-99d9-76ecdc720c0b"
    },
    "status": "ok",
    "message": "Earth bulge",
    "success": true
}
```

#### `GET /v1/midpoint` — Widest radius & clearance

**Parameters:**
- `distance` (query, required, string) — Total path length (km) Example: `10`
- `frequency` (query, required, string) — Frequency (GHz) Example: `2.4`
- `zone` (query, optional, string) — Fresnel zone number n Example: `1`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fresnel-api/v1/midpoint?distance=10&frequency=2.4&zone=1"
```

**Response:**
```json
{
    "data": {
        "note": "The Fresnel zone is widest at the midpoint. Plan antenna heights so the line of sight clears obstacles by ≥ 60 % of this radius.",
        "inputs": {
            "zone": 1,
            "distance_km": 10,
            "frequency_ghz": 2.4
        },
        "wavelength_m": 0.124914,
        "clearance_60pct_m": 10.60293,
        "max_fresnel_radius_m": 17.67155
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:10.851Z",
        "request_id": "fdc99631-6f48-45df-b97f-60a7d6027b13"
    },
    "status": "ok",
    "message": "Midpoint clearance",
    "success": true
}
```

#### `GET /v1/radius` — Fresnel radius at a point

**Parameters:**
- `distance1` (query, required, string) — Distance from one end (km) Example: `5`
- `distance2` (query, required, string) — Distance from the other end (km) Example: `5`
- `frequency` (query, required, string) — Frequency (GHz) Example: `2.4`
- `zone` (query, optional, string) — Fresnel zone number n Example: `1`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fresnel-api/v1/radius?distance1=5&distance2=5&frequency=2.4&zone=1"
```

**Response:**
```json
{
    "data": {
        "note": "rₙ = √(n·λ·d1·d2/(d1+d2)). Keep at least 60 % of the first zone clear of obstacles for a reliable link.",
        "inputs": {
            "zone": 1,
            "distance1_km": 5,
            "distance2_km": 5,
            "frequency_ghz": 2.4
        },
        "wavelength_m": 0.124914,
        "fresnel_radius_m": 17.67155,
        "clearance_60pct_m": 10.60293
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:10.986Z",
        "request_id": "32f5b63e-3bd2-4688-a55f-28a50c1bfe81"
    },
    "status": "ok",
    "message": "Fresnel radius",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fresnel-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "notes": "Distances in km, frequency in GHz, radii in m. k-factor ≈ 4/3 for a standard atmosphere. Keep ≥ 60 % of the first zone clear for a near-free-space link.",
        "service": "fresnel-api",
        "formulae": {
            "radius": "rₙ = √(n·λ·d1·d2/(d1+d2))",
            "clearance": "60 % of the first Fresnel zone",
            "earth_bulge": "h = d1·d2/(12.75·k)"
        },
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/radius": "Fresnel-zone radius at a point a distance d1/d2 from the ends.",
            "GET /v1/midpoint": "Maximum Fresnel radius at the path midpoint and 60% clearance.",
            "GET /v1/earthbulge": "Earth-curvature bulge and total obstruction clearance for a path."
        },
        "description": "Fresnel-zone and line-of-sight calculator for radio links: zone radius at a point, the widest (midpoint) radius with 60% clearance, and earth-curvature bulge."
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:11.094Z",
        "request_id": "ef7e2325-a46e-412c-81a9-ef0b2fdcf194"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/fresnel-api
OpenAPI spec: https://www.oanor.com/api/fresnel-api/openapi.json
