$͟      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Safe Parse an unsigned Integer value.MParse an unsigned decimal value with optional decimal places but no exponent.IRead a character indicating the sign of a value. Returns either +1 or -1.Parse a signed decimal value.~Parse an unsigned angle written using degrees, minutes and seconds separated by spaces. All except the last must be integers.Parse an unsigned angle written using degrees, minutes and seconds with units ( ' "). At least one component must be specified.EParse an unsigned angle written using degrees and decimal minutes. RParse an unsigned angle written using degrees and decimal minutes with units ( ')Parse an unsigned angle written in DDDMMSS.ss format. Leading zeros on the degrees and decimal places on the seconds are optionalParse an unsigned angle, either in decimal degrees or in degrees, minutes and seconds. In the latter case the unit indicators are optional. 0Parse latitude as an unsigned angle followed by N or S1Parse longitude as an unsigned angle followed by E or W.Parse latitude and longitude as two signed decimal numbers in that order, optionally separated by a comma. Longitudes in the western hemisphere may be represented either by negative angles down to -180 or by positive angles less than 360. +Parse latitude and longitude in any format. Positive sign Negative sign    None:DQR Ellipsoids other than WGS84, used within a defined geographical area where they are a better fit to the local geoid. Can also be used for historical ellipsoids.The Showl instance just returns the name. Creating two different local ellipsoids with the same name is a Bad Thing.The WGS84 geoid, major radius 6378137.0 meters, flattening = 1 / 298.257223563 as defined in "Technical Manual DMA TM 8358.1 - Datums, Ellipsoids, Grids, and Grid Reference Systems" at the National Geospatial-Intelligence Agency (NGA).nThe WGS84 has a special place in this library as the standard Ellipsoid against which all others are defined.An Ellipsoid is defined by the major radius and the inverse flattening (which define its shape), and its Helmert transform relative to WGS84 (which defines its position and orientation).The inclusion of the Helmert parameters relative to WGS84 actually make this a Terrestrial Reference Frame (TRF), but the term  Ellipsoid. will be used in this library for readability.Minimum definition:  majorRadius, flatR & helmert.Laws: RhelmertToWGS84 = applyHelmert . helmert helmertFromWGS84 e . helmertToWGS84 e = idkEarth-centred, Earth-fixed coordinates as a vector. The origin and axes are not defined: use with caution.OThe 7 parameter Helmert transformation. The monoid instance allows composition.Parts per million"3x3 transform matrix for Vec3.# 3d vector as (X,Y,Z).$Multiply a vector by a scalar.%Negation of a vector.&Add two vectors'=Multiply a matrix by a vector in the Dimensional type system.(Inverse of a 3x3 matrix.)Transpose of a 3x3 matrix.*Dot product of two vectors+Cross product of two vectors,(The inverse of a Helmert transformation.-=Apply a Helmert transformation to earth-centered coordinates..Flattening (f) of an ellipsoid./!The minor radius of an ellipsoid.0)The eccentricity squared of an ellipsoid.10The second eccentricity squared of an ellipsoid.2Distance from the surface at the specified latitude to the axis of the Earth straight down. Also known as the radius of curvature in the prime vertical, and often denoted N.3hRadius of the circle of latitude: the distance from a point at that latitude to the axis of the Earth.4ORadius of curvature in the meridian at the specified latitude. Often denoted M.5]Radius of curvature of the ellipsoid perpendicular to the meridian at the specified latitude.6The isometric latitude. The isometric latitude is conventionally denoted by  (not to be confused with the geocentric latitude): it is used in the development of the ellipsoidal versions of the normal Mercator projection and the Transverse Mercator projection. The name "isometric" arises from the fact that at any point on the ellipsoid equal increments of  and longitude  give rise to equal distance displacements along the meridians and parallels respectively.3  !"#$%&'()*+,-./0123456789:;<-  !"#$%&'()*+,-./0123456- !,- ./0123456#"&$%'()*+   !"#$%&'()*+,-./0123456789:;<None@All geographical coordinate systems need the concept of# altitude above a reference point, usually associated with local sea level.*Minimum definition: altitude, setAltitude.CSet altitude to zero.@ABC@ABC@ABC@ABCNone DDefines a three-D position on or around the Earth using latitude, longitude and altitude with respect to a specified ellipsoid, with positive directions being North and East. The default "show" instance gives position in degrees, minutes and seconds to 5 decimal places, which is a resolution of about 1m on the Earth's surface. Internally latitude and longitude are stored as double precision radians. Convert to degrees using e.g. latitude g /~ degree.The functions here deal with altitude by assuming that the local height datum is always co-incident with the ellipsoid in use, even though the "mean sea level" (the usual height datum) can be tens of meters above or below the ellipsoid, and two ellipsoids can differ by similar amounts. This is because the altitude is usually known with reference to a local datum regardless of the ellipsoid in use, so it is simpler to preserve the altitude across all operations. However if you are working with ECEF coordinates from some other source then this may give you the wrong results, depending on the altitude correction your source has used. There is no Eq instance because comparing two arbitrary co-ordinates on the Earth is a non-trivial exercise. Clearly if all the parameters are equal on the same ellipsoid then they are indeed in the same place. However if different ellipsoids are used then two co-ordinates with different numbers can still refer to the same physical location. If you want to find out if two co-ordinates are the same to within a given tolerance then use "geometricDistance" (or its squared variant to avoid an extra sqrt operation).JqRead the latitude and longitude of a ground position and return a Geodetic position on the specified ellipsoid.The latitude and longitude may be in any of the following formats. The comma between latitude and longitude is optional in all cases. Latitude must always be first.+Signed decimal degrees: 34.52327, -46.23234*Decimal degrees NSEW: 34.52327N, 46.23234WGDegrees and decimal minutes (units optional): 34 31.43' N, 46 13.92' RDegrees, minutes and seconds (units optional): 34 31' 23.52" N, 46 13' 56.43" W CDDDMMSS format with optional leading zeros: 343123.52N, 0461356.43WKDShow an angle as degrees, minutes and seconds to two decimal places.LTThe point on the Earth diametrically opposite the argument, with the same altitude.MUConvert a geodetic coordinate into earth centered, relative to the ellipsoid in use.NXConvert an earth centred coordinate into a geodetic coordinate on the specified geoid.Uses the closed form solution of H. Vermeille: Direct transformation from geocentric coordinates to geodetic coordinates. Journal of Geodesy Volume 76, Number 8 (2002), 451-454O\Convert a position from any geodetic to another one, assuming local altitude stays constant.PWConvert a position from any geodetic to WGS84, assuming local altitude stays constant.QThe absolute distance in a straight line between two geodetic points. They must be on the same ellipsoid. Note that this is not the geodetic distance taken by following the curvature of the earth.R2The square of the absolute distance. Comes out as Area type of course.S~The shortest ellipsoidal distance between two points on the ground with reference to the same ellipsoid. Altitude is ignored.The results are the distance between the points, the bearing of the second point from the first, and (180 degrees - the bearing of the first point from the second).gThe algorithm can fail to converge where the arguments are near to antipodal. In this case it returns Nothing.Uses Vincenty's formula. "Direct and inverse solutions of geodesics on the ellipsoid with application of nested equations". T. Vincenty. Survey Review XXII 176, April 1975. ,http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdfT2Add or subtract multiples of 2*pi so that for all t, -pi < properAngle t < pi.DEFGHIJKLMNOPQRSTUVDEFGHIJKLMNOPQRSTDEFGHIJOPLQRSTKMNDEFGHIJKLMNOPQRSTUVNone:DQR WA path is a parametric function of distance along the path. The result is the position, and the direction of the path at that point as heading and elevation angles.A well-behaved path must be continuous and monotonic (that is, if the distance increases then the result is further along the path) for all distances within its validity range. Ideally the physical distance along the path from the origin to the result should be equal to the argument. If this is not practical then a reasonably close approximation may be used, such as a spheroid instead of an ellipsoid, provided that this is documented. Outside its validity the path function may return anything or bottom.[?Lower and upper exclusive bounds within which a path is valid. \=Convenience value for paths that are valid for all distances.]+True if the path is valid at that distance.^Find where a path meets a given condition using bisection. This is not the most efficient algorithm, but it will always produce a result if there is one within the initial bounds. If there is more than one result then an arbitrary one will be returned._The initial bounds must return one GT or EQ value and one LT or EQ value. If they do not then Nothing is returned._Try to find the intersection point of two ground paths (i.e. ignoring altitude). Returns the distance of the intersection point along each path using a modified Newton-Raphson method. If the two paths are fairly straight and not close to parallel then this will converge rapidly.The algorithm projects great-circle paths forwards using the bearing at the estimate to find the estimated intersection, and then uses the distances to this intersection as the next estimates.7If either estimate departs from its path validity then Nothing is returned.`?A ray from a point heading in a straight line in 3 dimensions. aHRhumb line: path following a constant course. Also known as a loxodrome.The valid range stops a few arc-minutes short of the poles to ensure that the polar singularities are not included. Anyone using a rhumb line that close to a pole must be going round the twist anyway.Based on *Practical Sailing Formulas for Rhumb-Line Tracks on an Oblate Earth* by G.H. Kaplan, U.S. Naval Observatory. Except for points close to the poles the approximation is accurate to within a few meters over 1000km.bAA path following the line of latitude around the Earth eastwards.This is equivalent to rhumbPath pt (pi/2)cbA path from the specified point to the North Pole. Use negative distances for the southward path.This is equivalent to rhumbPath pt _0 WXYZ[\]^Evaluation function.6Required accuracy in terms of distance along the path.Initial bounds._Starting estimates.Required accuracy.Iteration limit. Returns Nothing if this is reached. Paths to intersect.` Start point.Bearing. Elevation.a Start point.Course.b Start point.c Start point. WXYZ[\]^_`abc [WXYZ\]^_`abc WXYZ[\]^_`abcNone<=? dA vector relative to a point on a grid. Operations that use offsets will only give meaningful results if all the points come from the same grid.*The monoid instance is the sum of offsets.iA point on the specified grid. oA Grid is a two-dimensional projection of the ellipsoid onto a plane. Any given type of grid can usually be instantiated with parameters such as a tangential point or line, and these parameters will include the terrestrial reference frame ( Ellipsoid in this library) used as a foundation. Hence conversion from a geodetic to a grid point requires the "basis" for the grid in question, and grid points carry that basis with them because without it there is no defined relationship between the grid points and terrestrial positions.sDAn offset defined by a distance and a bearing to the right of North.There is no elevation parameter because we are using a plane to approximate an ellipsoid, so elevation would not provide a useful result. If you want to work with elevations then "rayPath" will give meaningful results.tScale an offset by a scalar.uInvert an offset.w&The distance represented by an offset.x4The square of the distance represented by an offset.yIThe direction represented by an offset, as bearing to the right of North.z7The offset required to move from p1 to p2. {Coerce a grid point of one type into a grid point of a different type, but with the same easting, northing and altitude. This is unsafe because it will produce a different position unless the two grids are actually equal.DIt should be used only to convert between distinguished grids (e.g. UkNationalGrid.) and their equivalent numerical definitions.|fConvert a list of digits to a distance. The first argument is the size of the grid square within which these digits specify a position. The first digit is in units of one tenth of the grid square, the second one hundredth, and so on. The first result is the lower limit of the result, and the second is the size of the specified offset. So for instance (fromGridDigits (100 *~ kilo meter) "237" will return Just (23700 meters, 100 meters)DIf there are any non-digits in the string then the function returns Nothing.}Convert a distance into a digit string suitable for printing as part of a grid reference. The result is the nearest position to the specified number of digits, expressed as an integer count of squares and a string of digits. If any arguments are invalid then Nothing is returned.defghijklmnopqrstuvwxyz{|}5Size of enclosing grid square. Must be at least 1 km.-Number of digits to return. Must be positive.Offset to convert into grid.~defghijklmnopqrstuvwxyz{|}opqrijklmndefghstuvwxyz{|}defghijklmnopqrstuvwxyz{|}~None9;<=`A stereographic projection with its origin at an arbitrary point on Earth, other than the poles.]Point where the plane of projection touches the ellipsoid. Often known as the Natural Origin.DGrid position of the tangent point. Often known as the False Origin.sScaling factor that balances the distortion between the center and the edges. Should be slightly less than unity.UCreate a stereographic projection. The tangency point must not be one of the poles.  None9;<=A Transverse Mercator projection gives an approximate mapping of the ellipsoid on to a 2-D grid. It models a sheet curved around the ellipsoid so that it touches it at one north-south line (hence making it part of a slightly elliptical cylinder).UA point on the line where the projection touches the ellipsoid (altitude is ignored).The grid position of the true origin. Used to avoid negative coordinates over the area of interest. The altitude gives a vertical offset from the ellipsoid.oA scaling factor that balances the distortion between the east & west edges and the middle of the projection."Create a Transverse Mercator grid.Equation C3 from reference [1].  True origin.(Vector from true origin to false origin. Scale factor. None<=The UK National Grid is a Transverse Mercator projection with a true origin at 49 degrees North, 2 degrees West on OSGB36, and a false origin 400km West and 100 km North of the true origin. The scale factor is defined as 10**(0.9998268 - 1).mEllipsoid definition for Great Britain. Airy 1830 offset from the centre of the Earth and rotated slightly.oThe Helmert parameters are from the Ordnance Survey document "A Guide to Coordinate Systems in Great Britain", which notes that it can be in error by as much as 5 meters and should not be used in applications requiring greater accuracy. A more precise conversion requires a large table of corrections for historical inaccuracies in the triangulation of the UK.-Numerical definition of the UK national grid.%Size of a UK letter-pair grid square.Convert a grid reference to a position, if the reference is valid. This returns the position of the south-west corner of the nominated grid square and an offset to its centre. Altitude is set to zero.The south west corner of the nominated grid square, if it is a legal square. This function works for all pairs of letters except Ii (as that is not used). In practice only those pairs covering the UK are actually considered meaningful.gFind the nearest UK grid reference point to a specified position. The Int argument is the number of digits precision, so 2 for a 4-figure reference and 3 for a 6-figure reference, although any value between 0 and 5 can be used (giving a 1 meter precision). Altitude is ignored. If the result is outside the area defined by the two letter grid codes then Nothing is returned.       !!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKKLMNOPQRSTUVWXYZ[\]]^_`abcdefghiijklmmnopqrstuvwxyz{|}~      &geodetics-0.0.4-JK7bav2Zq9A519LE6mlkdUGeodetics.LatLongParserGeodetics.EllipsoidsGeodetics.AltitudeGeodetics.GeodeticGeodetics.PathGeodetics.GridGeodetics.StereographicGeodetics.TransverseMercator Geodetics.UKdegreesMinutesSecondsdegreesMinutesSecondsUnitsdegreesDecimalMinutesdegreesDecimalMinutesUnitsdms7angle latitudeNS longitudeEW signedLatLonglatLongLocalEllipsoid nameLocalmajorRadiusLocal flatRLocal helmertLocalWGS84 Ellipsoid majorRadiusflatRhelmerthelmertToWSG84helmertFromWSG84ECEFHelmertcXcYcZ helmertScalerXrYrZMatrix3Vec3scale3negate3add3 transform3invert3trans3dot3cross3inverseHelmert applyHelmert flattening minorRadius eccentricity2eccentricity'2normallatitudeRadiusmeridianRadiusprimeVerticalRadiusisometricLatitude$fEllipsoidLocalEllipsoid$fShowLocalEllipsoid$fEllipsoidWGS84 $fShowWGS84 $fEqWGS84$fMonoidHelmert $fEqHelmert $fShowHelmert$fEqLocalEllipsoid HasAltitudealtitude setAltitudegroundPositionGeodeticlatitude longitudegeoAlt ellipsoidreadGroundPosition showAngleantipode geoToEarth earthToGeotoLocaltoWGS84geometricalDistancegeometricalDistanceSqgroundDistance properAngle$fHasAltitudeGeodetic$fShowGeodeticPathpathFunc pathValidity PathValidity alwaysValid pathValidAtbisect intersectrayPath rhumbPath latitudePath longitudePath GridOffset deltaEast deltaNorth deltaAltitude GridPointeastings northingsaltGP gridBasis GridClassfromGridtoGrid gridEllipsoid polarOffset offsetScale offsetNegate applyOffsetoffsetDistanceoffsetDistanceSq offsetBearing gridOffsetunsafeGridCoercefromGridDigits toGridDigits$fMonoidGridOffset$fHasAltitudeGridPoint $fEqGridPoint$fShowGridPoint$fEqGridOffset$fShowGridOffset GridStereo gridTangent gridOrigin gridScale mkGridStereo$fGridClassGridStereoe$fShowGridStereoGridTM trueOrigin falseOriginmkGridTM$fGridClassGridTMe $fShowGridTMUkNationalGridOSGB36ukGridfromUkGridReferencetoUkGridReference$fGridClassUkNationalGridOSGB36$fEllipsoidOSGB36 $fEqOSGB36 $fShowOSGB36$fEqUkNationalGrid$fShowUkNationalGridnaturaldecimalsignChar signedDecimalgridRgridNgridCgridSingridCosgridLatCgridGgridHmgridN1gridN2gridN3gridN4 ukGridSquarefromUkGridLetters ukTrueOrigin ukFalseOrigin