# sl.mhd: Modified Hausdorff Distance (MHD) Calculator In helgegoessling/spheRlab: Spherical Geometry, Analysis, and Plotting of Geoscientific Data on Arbitrary Grids

## Description

This function calculates the Modified Hausdorff Distance between two sea ice edges

## Usage

 `1` ```sl.mhd(A,B,cA=NULL,cB=NULL,kA=NULL,kB=NULL,R=1) ```

## Arguments

 `A` A `m x 2` array, containing the (lon,lat) coordinates of the `m` points forming the (first) edge. `B` A `n x 2` array, containing the (lon,lat) coordinates of the `n` points forming the (second) edge. `cA` A `p x 2` optional array, containing the (lon,lat) coordinates of the `p` points of the (first) land-ice interface between ice and land. `cB` A `q x 2` optional array, containing the (lon,lat) coordinates of the `q` points of the (second) land-ice interface between ice and land. `kA` An optional integer that can vary between 1 and the number of points of the segment A (`1 `kA = 1` `kB` An optional integer that can vary between 1 and the number of points of the segment B (`1 `kB = 1` `R` Radius of the sphere. DEFAULT -> `R = 1`. If `R = -1`, then `R = 6373044 [m]`, which is the mean quadratic radius.

## Details

To calculate the coordinates of the edge and of the land-ice interface please refer to the function `sl.mhd.edge`. `sl.mhd.edge` output is the natural imput for `sl.mhd`. The distance employed to compute the MHD is the "great circle distance", given by `sl.gc.dist`.

## Value

The MHD value in meters.

## Author(s)

Lorenzo Zampieri

`sl.mhd.edge`
 ```1 2 3``` ```MHD <- sl.mhd(Edge1,Edge2,LandEdge1,LandEdge2,R=-1) ## sl.mhd(Edge1,Edge2,LandEdge1,LandEdge2) ## Should result in double, which represent the MHD of the two edges in meters ```