Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

33
Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009

Transcript of Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Page 1: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Class 19: 3D Cartesian Coordinate Computations

GISC-332526 March 2009

Page 2: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Class Update

Remember Article Reviews (2) are due 16 April 2009.

Page 3: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Coordinates

Geodetic reference systems use curvilinear and Cartesian (rectangular) coordinate systems that are referred to the ellipsoid. Curvilinear values: geodetic latitude, longitude and

ellipsoid surface. Right-handed, earth-fixed, 3-D coordinate system. Cartesian [ X;Y;Z ]

Page 4: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.
Page 5: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Cartesian Coordinates

Earth-Centered-Earth-Fixed (ECEF) Orientation of axes is identical to spherical

earth model. X lies in equatorial plane intersecting Greenwich Y in equatorial plane at 90deg E longitude Z coincident with earth's spin axis

Origin Earth Center of Mass (COM) corresponds to the center of the ellipsoid.

Page 6: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

GPS vectors

Represent differences in geocentric coordinates.

Page 7: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

GPS Vector

Page 8: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Local Geodetic Horizon Coordinates LGH is an earth-fixed, right-handed, orthogonal,

3-D coordinates system having its origin at any point specified.

N axis in meridian plane Positive north

U axis along the normal to the ellipsoid. Positive up

E axis right-handed system perpendicular to meridian plane Positive east

Page 9: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.
Page 10: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Local Geodetic Coordinates

Referred to origin of the local geodetic system using Geodetic azimuth Vertical angle or zenith angle Mark-to-mark sland range from the origin

Page 11: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.
Page 12: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.
Page 13: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Geocentric ↔ Geodetic

Page 14: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Radius of curvature of prime vertical

Page 15: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Algorithms

Page 16: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Geocentric to Geodetic

• XYZ to Lat, Lon, ellipsoid height

• Longitude is computed as in spherical case.

• Both height above ellipsoid and latitude must be iterated.

– Ellipsoid height requires we know latitude and radius of curvature of prime vertical

– Latitude requires we know radius of curvature of prime vertical and ellipsoid height

– Radius of curvature of prime vertical requires we know latitude.

Page 17: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Iteration required• Required because latitude and ellipsoid

height are dependent upon one another.

• One approach (used in text) is to first set ellipsoid height to 0 then solve for latitude.

• Then solve for h then lat again... then again

Page 18: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Coordinate transformations by Molodensky (translation)

The values DX, DY, DZ above show the difference in origin between datums and WGS 84. Also shown are ellipsoid parameter differences.

Page 19: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Bursa-Wolf Transformation

• For geographic transformations between two geocentric datums.

• Applied to geocentric coordinates.

– X axis points to Greenwich

– Y is 90 deg east

– Z is to north

• Consists of three translation, three rotations and scale change.

Page 20: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Rotations

• Rotations preserve the length of a vector.

• When we rotate the point stays fixed by the coordinate axes are moved resulting in new coordinate values.

– A counter-clockwise (CCW) rotation is considered positive with respect to the old system.

Page 21: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Rotations

• Coordinates for a point in 2-D space are computed using plane trigonometry.

• Where r is length and theta is azimuth

– X = r * cos(theta)

– Y = r * sin(theta)

• Rotations either add or subtract an angle (gamma) from the azimuth (theta).

– X' = r * cos(gamma – theta)

– Y' = r * sin(gamma - theta)

Page 22: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Underlying trigonometry

• X' = r * cos(gamma – theta).

• We apply the difference formula (see below)

Page 23: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Rotation angles (detail) • X' = r * cos(gamma – theta)

– = r(cos(gamma)*cos(theta)+sin(gamma)sin(theta))

– = r cos(gamma)cos(theta) + r sin(gamma)sin(theta)

– Since X = r * cos(gamma) and Y = r * sin(gamma)

• X' = X cos(theta) + Y sin(theta)

• Y' = r*sin(gamma – theta)

– = r(sin(gamma)cos(theta)-cos(gamma)sin(theta))

– = r(sin(gamma)cos(theta) – r cos(gamma)sin(theta)

• Y' = -X*sin(theta) + Y*cos(theta)

Page 24: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Matrix form• We can translate the previous page into matrix

form:

Page 25: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Transformations

• Translation: coordinates are derived by merely subtracting the translations from their corresponding coordinates.

– X' = X – T where T is translation vector

• Scale change

– Can be used for feet to meter conversions.

– X' = s*X where s is scale factor

Page 26: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Transformations• Four parameter (2D)- Apply translations,

rotations, and scale in two dimensions only.

• Seven-parameter transformation (3D) – apply three translations, three rotations and one scale change.

– X' = s*R*X+T' (in alternate form below)

Page 27: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Matrix rotations

• A single axis rotation matrix is the rotation matrix that describes the effect of rotating the entire coordinate system about an axis through a specified angle.

• Rotation matrices are square, normal orthogonal matrices.

• Transpose of an normal orthogonal matrix is equivalent to its inverse.

Page 28: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Euler Angles• D, C, B rotations retain the values for Z, Y

and X respectively.

Page 29: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Rotations

• The order in which single axis rotations are performed is critical.

• Algebraic sign of the rotation angle is considered positive if the rotation is viewed as a counterclockwise rotation from the positive end of the axis when looking toward the origin.

Page 30: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Transformation Parameters

Note: milli-arcseconds (mas) = (1/3600)*(pi/180)

Page 31: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Local <-> Geocentric• We cannot transform directly from local

geodetic coordinates to geodetic coordinates.

– We must use geocentric coordinates.

• Perform two rotations to align local system with geocentric.

– Make U-axis parallel with Z-axis geocentric

– Then align all corresponding axes with one another.

• Rotation matrix consists of geodetic coordinates of standpoint (origin).

Page 32: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Geocentric to Local

The transpose of this rotation matrix can be used to transpose from local to geocentric. Result [ X;Y;Z] input [ E;N;U]

Page 33: Class 19: 3D Cartesian Coordinate Computations GISC-3325 26 March 2009.

Matlab code