Bearing on Custom Ellipsoid

Calculate bearing from one localtion to another on custom ellipsoid

Latitude, 1st Location
Longitude, 1st Location
Latitude, 2nd Location
Longitude, 2nd Location
Semi-major Axis A, m
Inversed Flattening

Bearing, decimal degrees

The bearing is the angle between the meridian plane of the 1st location and the plane formed by the 1st and 2nd locations and ellipsoid's center.