-
Notifications
You must be signed in to change notification settings - Fork 24
Adding NED coordinate system #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jleny
wants to merge
4
commits into
JuliaGeo:master
Choose a base branch
from
jleny:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,8 +47,10 @@ trans = ENUfromLLA(origin_lla, wgs84) | |
| point_enu = trans(point_lla) | ||
|
|
||
| # Equivalently | ||
| point_enu = ENU(point_enu, point_origin, wgs84) | ||
| point_enu = ENU(point_lla, origin_lla, wgs84) | ||
| ``` | ||
| The `NED` coordinate system is also available as an alternative to `ENU`, with | ||
| the same interface. | ||
|
|
||
| Similarly, we could convert to UTM/UPS coordinates, and two types are provided | ||
| for this - `UTM` stores 3D coordinates `x`, `y`, and `z` in an unspecified zone, | ||
|
|
@@ -252,7 +254,8 @@ as the geodetic coordinates mentioned above, it's common to see | |
| defining a terrestrial reference frame. | ||
| * The east,north and up **ENU** components of a Cartesian coordinate frame at a | ||
| particular point on the ellipsoid. This coordinate system is useful as a | ||
| local frame for navigation. | ||
| local frame for navigation. It is also common for navigation systems to use | ||
| north,east and down (**NED**) coordinates. | ||
| * Easting,northing and vertical components of a **projected coordinate system** or | ||
| [**map projection**](http://www.icsm.gov.au/mapping/about_projections.html). | ||
| There's an entire zoo of these, designed to represent the curved surface of an | ||
|
|
@@ -325,10 +328,17 @@ projection about the corresponding pole, otherwise `zone` is an integer between | |
|
|
||
| ##### `ENU{T}` - east-north-up | ||
|
|
||
| The `ENU` type is a local Cartesian coordinate that encodes a point's distance | ||
| The `ENU` type stores local Cartesian coordinates that encode a point's distance | ||
| towards east `e`, towards north `n` and upwards `u` with respect to an | ||
| unspecified origin. Like `ECEF`, `ENU` is also a subtype of `StaticVector`. | ||
|
|
||
| ##### `NED{T}` - north-east-down | ||
|
|
||
| The `NED` type is an alternative convention to `ENU`. It stores local Cartesian | ||
| coordinates that encode a point's distance towards north `n`, towards east `e` | ||
| and downwards `d` with respect to an unspecified origin. Like `ECEF`, `NED` is | ||
| also a subtype of `StaticVector`. | ||
|
|
||
| ### Geodetic Datums | ||
|
|
||
| Geodetic datums are modelled as subtypes of the abstract type `Datum`. The | ||
|
|
@@ -379,7 +389,7 @@ be pre-cached (for instance, the origin of an ENU transformation). | |
|
|
||
| The `LLAfromECEF` and `ECEFfromLLA` transformations require an ellipsoidal datum | ||
| to perform the conversion. The exact transformation is performed in both directions, | ||
| using a port the ECEF → LLA transformation from *GeographicLib*. | ||
| using a port of the ECEF → LLA transformation from *GeographicLib*. | ||
|
|
||
| Note that in some cases where points are very close to the centre of the ellipsoid, | ||
| multiple equivalent `LLA` points are valid solutions to the transformation problem. | ||
|
|
@@ -402,22 +412,24 @@ native Julia port of that used in *GeographicLib*, and is accurate to nanometers | |
| for up to several UTM zones away from the reference meridian. However, the | ||
| series expansion diverges at ±90° from the reference meridian. While the `UTMZ`-methods | ||
| will automatically choose the canonical zone and hemisphere for the input, | ||
| extreme care must be taken to choose an appropriate zone for the `UTM` methods. | ||
| (In the future, we implement the exact UTM transformation as a fallback — | ||
| contributions welcome!) | ||
| extreme care must be taken to choose an appropriate zone for the `UTM` methods | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The original text is correct—the proposed change is typographically not. |
||
| (In the future, we will implement the exact UTM transformation as a fallback — | ||
| contributions welcome!). | ||
|
|
||
| There is also `UTMfromUTMZ` and `UTMZfromUTM` transformations that are helpful | ||
| for converting between these two formats and putting data into the same `UTM` | ||
| zone. | ||
|
|
||
| #### To and from local `ENU` frames | ||
| #### To and from local `ENU` and `NED` frames | ||
|
|
||
| The `ECEFfromENU` and `ENUfromECEF` transformations define the transformation | ||
| around a specific origin. Both the origin coordinates as an `ECEF` as well as | ||
| its corresponding latitude and longitude are stored in the transformation for | ||
| maximal efficiency when performing multiple `transform`s. The transformation can | ||
| be inverted with `inv` to perform the reverse transformation with respect to the | ||
| same origin. | ||
| same origin. Moreover, the `ENUfromNED` transformation and its inverse `NEDfromENU` | ||
| can be used to change a local frame's orientation convention between `ENU` and `NED`, | ||
| while keeping the same origin. | ||
|
|
||
| #### Web Mercator support | ||
|
|
||
|
|
@@ -443,11 +455,17 @@ These include: | |
| * `ECEFfromUTM(zone, hemisphere, datum) = ECEFfromLLA(datum) ∘ LLAfromUTM(zone, hemisphere, datum)` | ||
| * `ENUfromLLA(origin, datum) = ENUfromECEF(origin, datum) ∘ ECEFfromLLA(datum)` | ||
| * `LLAfromENU(origin, datum) = LLAfromECEF(datum) ∘ ECEFfromENU(origin, datum)` | ||
| * `NEDfromLLA(origin, datum) = NEDfromENU() ∘ ENUfromECEF(origin, datum) ∘ ECEFfromLLA(datum)` | ||
| * `LLAfromNED(origin, datum) = LLAfromECEF(datum) ∘ ECEFfromENU(origin,datum) ∘ ENUfromNED()` | ||
| * `ECEFfromUTMZ(datum) = ECEFfromLLA(datum) ∘ LLAfromUTMZ(datum)` | ||
| * `ENUfromUTMZ(origin, datum) = ENUfromLLA(origin, datum) ∘ LLAfromUTMZ(datum` | ||
| * `UTMZfromENU(origin, datum) = UTMZfromLLA(datum) ∘ LLAfromENU(origin, datum)` | ||
| * `NEDfromUTMZ(origin, datum) = NEDfromLLA(origin, datum) ∘ LLAfromUTMZ(datum` | ||
| * `UTMZfromNED(origin, datum) = UTMZfromLLA(datum) ∘ LLAfromNED(origin, datum)` | ||
| * `UTMfromENU(origin, zone, hemisphere, datum) = UTMfromLLA(zone, hemisphere, datum) ∘ LLAfromENU(origin, datum)` | ||
| * `ENUfromUTM(origin, zone, hemisphere, datum) = ENUfromLLA(origin, datum) ∘ LLAfromUTM(zone, hemisphere, datum)` | ||
| * `UTMfromNED(origin, zone, hemisphere, datum) = UTMfromLLA(zone, hemisphere, datum) ∘ LLAfromNED(origin, datum)` | ||
| * `NEDfromUTM(origin, zone, hemisphere, datum) = NEDfromLLA(origin, datum) ∘ LLAfromUTM(zone, hemisphere, datum)` | ||
|
|
||
| Constructor-based transforms for these are also provided, such as `UTMZ(ecef, datum)` | ||
| which converts to `LLA` as an intermediary, as above. When converting multiple | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the old text is fine. Whether a coordinate is a single encoding of position or only one of the numbers which encodes position is an age-old debate.