Learning from the Past, Looking to the Future James R. (Jim) Beaty, PhD - NASA Langley Research Center Vehicle Analysis Branch, Systems Analysis & Concepts Directorate Bldg 1209, Room 128B, M/S North Dryden Street Hampton, VA Page: 1 Fundamentals of Geodetic Kinematics Part 2 of 2 (“Implementation”)
Learning from the Past, Looking to the Future Overview Part 1, “Introduction and Definitions” – Mathematical relationships for ellipses – Coordinate frames and definition of terms – Equations used for geodetic kinematics – Spherical to rectangular position coordinates and vice-versa Part 2, “Implementation” – Sidereal “Time” – Summary of WGS-84 standard constants used for Earth and moon – Coordinate frames commonly used for modeling of geodetic kinematics – Equations for navigation over an oblate spheroid – Great circle distance calculations – Calculation of position and velocity of an object relative to planet fixed frames Page: 2
Learning from the Past, Looking to the Future Sidereal “Time” Sidereal “time” is the angle in the ecliptic plane between the X-axis of the Earth Centered Inertial (ECI) frame (which points toward the Vernal Equinox) and the X-axis of the Earth Centered, Earth Fixed (ECEF) frame (which points toward the Greenwich meridian) Sidereal “time” is really an angle, but it changes proportional to time, due to the almost constant rotation of the Earth ≈ E-5 radians per second The inertial longitude is the sum of the sidereal “time” and the geodetic longitude (longitude relative to the Greenwich meridian) The initial value of sidereal “time” of a trajectory is dependent on the date and time of day – Users of the Program to Optimize Simulated Trajectories II (POST2) can use it to compute sidereal “time” for a given date and time (described on following slide) Page: 3
Learning from the Past, Looking to the Future POST2 and Sidereal “Time” Page: 4 c Earth Model npc(16) = 0, / oblate earth mre = / reference maltp & malta to equator (1963 Patrick AFB) c c Initial Position npc(4) = 2, // use spherical initial position coordinates gdlat = , // KSC LC-39B long = , c set the launch date date(1) = 8. date(2) = 15. date(3) = npc(31) = 1 c iephem: =1, Calculate True of Epoch, at zero hours on c DATE, using 1950 model. c =2, Calculate True of Epoch, at zero hours on c DATE, using J2000 model. c =3, Calculate transformation to EME2000 Vernal c Equinox frame at Noon, January 1, iephem = 2 prnt(1) = gha c after this run finishes, compute sidereal time using the value of gha c Eammple: 0700 Eastern Daylight Time (EDT), August 15, 2009 c compute gha with date(1-3) = ( 8, 15, 2009 ) ==> gha = deg c then add 11 hrs (7am + 4hr time difference from GMT to EDT, or 5 hours for Eastern Standard Time) x deg/day / 24 hr/day c and then subtract 360 deg ( should be 0 to 360 ) ==> x /24 – 360 = 700AM EDT on August 15, Pad LC39B = sidereal “time” of ° oSet the launch date as shown at left oRun this “single point” POST2 input file, and follow comments for computing sidereal “time”,degrees from the POST2 output variable “gha” ogha is the Greenwich hour angle, degrees ois the sidereal “time” at Greenwich, England at midnight on date specified
Learning from the Past, Looking to the Future WGS-84 Standard Constants The World Geodetic Survey, 1984 (WGS-84) is a widely used standard for the definitions of the oblate spheroid representation of the Earth (among other things as well). Links to sites with WGS-84 information are: Documentation/GNSS and WGS 84/Eurocontrol WGS 84.pdf – The standard defines the following parameters to the exact precisions shown below: – Semi-major axis ( a = 6,378,137.0 meters ) – Reciprocal of flattening ( 1/f = ) – Earth rotation rate ( Earth = E-5 radians/second ) From these parameters, all the constants in the equations presented herein can be derived. E.G. – – Square of eccentricity can be computed from reciprocal of flattening: e 2 = 1 – ( 1 - f ) 2 = 1 – ( 1 – 1/ ) 2 = – The semi-minor axis (b): b = a √ 1 – e 2 = a * ( 1 – f ) = 6,378,137.0 * ( 1 – 1/ ) = 6,356, meters Page: 5
Learning from the Past, Looking to the Future Summary of Key Equations (Constants) Geodetic constants for Earth ( Ref: WGS-84 Standard): – Semi-major axis length a = meters – Reciprocal of flattening1/f = – Rotation rate = E-5 radians/second Geodetic constants for Earth’s moon: – Semi-major axis length a = meters – Reciprocal of flattening1/f = – Rotation rate = E-6 radians/second ( 1 rotation / days) Given the semi-major axis length (a) and reciprocal of flattening ( 1/f ), the following oblate spheroid constants ( eccentricity, e, and semi-minor axis length, b ) can be computed: Page: 6
Learning from the Past, Looking to the Future Typical Reference Frames Used for Geodetic Kinematics There are several typical reference frames that are used for geodetic kinematics – Planet centered inertial – Planet centered rotating – Planet-relative instantaneous local level frame (origin may or may not be located on the surface of the planet at some specific, fixed location) A “local level frame” has two of its axes in a plane tangent to the surface of the planet, with its third axis pointing up or down relative to the “local level” direction (perpendicular to the surface of the oblate spheroid, or along the local plumb line direction) Common local level frames used for geodetic modeling: – North-east-down (NED) – East-north-up (ENU) – Azimuth based frames – Plumb line frames Local level frames sometimes are inertial, and sometimes rotate with the planet, depending on the application Page: 7
Learning from the Past, Looking to the Future North-East-Down Frame Quaternion elements for a North-East-Down (NED) reference frame relative to Earth Centered Inertial (ECI) frame: – First rotation of g about zI-axis: q 1 = [ cos( g /2), ( 0 i + 0 j + sin(( g /2) k ) ] – Second rotation of about rotated y-axis: q = [ cos( /2), ( 0 i + sin((- )/2) j + 0 k ) ] – ECI to NED quaternion is following quaternion product: q ECI to NED = q 1 q 2 – Note that ECI to NED quaternion is also a yaw-pitch- roll Euler sequence with yaw = g, pitch = , roll = 0 – For orientation relative to ECEF instead of ECI frame, replace g with just (e.g. – do not include sidereal “time” in first rotation) Page: 8 time Meridian Equinox X E P E N D Z I, Z E Y E Y Equatorial Plane Greenwich Vernal X I Local sidereal = g + E g
Learning from the Past, Looking to the Future East-North-Up Frame Quaternion elements for a East-North-Up (ENU) reference frame relative to Earth Centered Inertial (ECI) frame: – First rotation of g +90 about zI-axis: q 1 = [ cos( g +90 /2), ( 0 i + 0 j + sin(( g +90 /2) k ) ] – Second rotation of about rotated x-axis: q = [ cos( /2), ( sin(( )/2) i + 0 j + 0 k ) ] – ECI to ENU quaternion is following quaternion product: q ECI to ENU = q 1 q 2 – Note that ECI to ENU quaternion is also a yaw-pitch-roll Euler sequence with yaw = g +90, pitch = 0, roll = – For orientation relative to ECEF instead of ECI frame, replace g +90 with +90 (e.g. – do not include sidereal “time” in first rotation) Page: 9
Learning from the Past, Looking to the Future “Plumb line” Frame “Plumb line” frame defined as x-axis up, z-axis rotated through azimuth angle from north about negative x-axis, y- axis completes right handed frame Quaternion elements for a “plumb line” reference frame relative to Earth Centered Inertial (ECI) frame: – First rotation of g about zI-axis: q 1 = [ cos( g /2), ( 0 i + 0 j + sin(( g /2) k ) ] – Second rotation of about rotated y-axis: q = ([ cos( /2), ( 0 i + sin( /2) j + 0 k ) ] – Third rotation of about rotated x-axis: q = [ cos( /2), ( sin( /2) i + 0 j + 0 k ) ] – ECI to plumbline quaternion is following quaternion product: q ECI to PL = q 1 q 2 q 3 – Note that ECI to plumb line quaternion is also a yaw-pitch-roll Euler sequence with yaw = g, pitch = , roll = - – For orientation relative to ECEF instead of ECI frame, replace g with just (e.g. – do not include initial sidereal “time” in first rotation) Page: 10
Learning from the Past, Looking to the Future Navigation Over Oblate Spheroid In some applications, such as inertial navigation, it is often desirable to use the estimated velocity of an object relative to a local level frame (NED or ENU often used) to obtain geodetic latitude and geodetic longitude, and geodetic altitude by computing and integrating the time derivatives of these parameters – Sometimes the local level frame is attached to the rotating planet fixed at some convenient location (such as the launch point) – Sometimes the local level frame is located on the surface of the oblate planet directly “below” the current vehicle center of mass and moves along the surface as the vehicle moves – Sometimes the local level frame origin is located at the vehicle center of mass, and translates with it, but remains oriented so that its x-y axes are parallel to a plane tangent to the surface of the oblate spheroid directly “below” the current vehicle center of mass Equations for time derivatives of geodetic latitude, longitude, and altitude are presented next Page: 11
Learning from the Past, Looking to the Future State Equations for Navigation The figures at right show a meridian view and top view – Meridian view is looking normal to the meridian plane containing the object, point O in the figure – Top view is looking down the Z E axis The velocity components of the object, O, in the NED frame are V North, V East, and V Down The NED frame kinematics equations are: where and V are the radius of curvature in the prime meridian, and the radius of curvature in the prime vertical, defined in Part I of this presentation These states can be integrated to get E, E, and h Page: 12 Normal to ellipse at point P O EE h VV xy yEyE xExE E YEYE XEXE ZEZE Top view Meridian view P V North V East O V Down
Learning from the Past, Looking to the Future NED Frame Angular Rates The angular rate of the NED frame axes relative to the Earth centered, Earth Fixed (ECEF) frame can be computed from the derivatives of E and E (Equations (29) and (30) on the previous page: – To get the angular rate of the NED frame relative to the Earth centered, inertial (ECI) frame, substitute in the equations above, where Earth is the earth’s rotation rate ( Earth = E-5 rad/sec ) The rate of change of the ECEF ( or ECI ) to NED quaternion is computed with Poinsot’s equation: Page: 13 Normal to ellipse at point P O EE h VV xy yEyE xExE E YEYE XEXE ZEZE Top view Meridian view P V North V East O V Down
Learning from the Past, Looking to the Future Great Circle Distance Given the location (geodetic latitude, , and geodetic longitude, ) of two locations on the surface of the oblate spheroid, what is the surface range over the earth between them? – For a spherical planet, exact calculations are available, derived from dot product of rectangular coordinates of each point written in terms of geocentric latitude, C, and geodetic longitude, ): – Since the oblate planet is not spherical, the exact calculation of a geodetic over oblate planets is more complicated, but two simple approximate solutions are available that are very accurate: Jean Meeus approximation of oblate spheroid geodetics (actually devised by Henri Andoyer) – see next page or Simply replace earth radius, r e, in equation above with average geocentric radius of each point on the surface, computed from their geocentric latitudes Page: 14 r p1 r p2 r surf C.
Learning from the Past, Looking to the Future Great Circle Distance – Meeus Approximation Jean Meeus approximation of oblate spheroid geodetics (actually devised by Henri Andoyer). Define the following terms, and perform calculations below: – a = semi major axis length, meters, kilometers, feet, or nautical miles, etc – f = flattening ratio of ellipse (1 – f ) = sqrt( 1 – e^2 ), non-dimensional – 1 / 1 and 2 / 2 shown below are geodetic latitude and geodetic longitude of points 1&2 on surface, radians F = ( 1 + 2 ) / 2 G = ( 1 – 2 ) / 2 L = ( 1 – 2 ) / 2 sinG2 = sin(G)^2; cosG2 = cos(G)^2; sinF2 = sin(F)^2; cosF2 = cos(F)^2; sinL2 = sin(L)^2; cosL2 = cos(L)^2; S = sinG2*cosL2 + cosF2*sinL2; C = cosG2*cosL2 + sinF2*sinL2; w = atan( sqrt( S / C ) ); R = sqrt( S * C ) / w; D = 2*w*a; H1 = (3*R - 1) / ( 2*C ); H2 = (3*R + 1) / ( 2*S ); – % compute great circle distance, dist, between the two points, (units same as those provided for semi major axis length, a) dist = D * ( 1 + f * H1 * sinF2 * cosG2 – f * H2 * cosF2 * sinG2 ); Page: 15
Learning from the Past, Looking to the Future Position / Velocity Relative to Planet Fixed Frame To transform the position and velocity of an object from a planet centered reference frame (with its origin at the center of the planet) to a planet-fixed local level reference frames located on the surface of the planet 1.Use the geodetic spherical to rectangular coordinate equations (in Part I of this presentation, also summarized below) to compute the rectangular coordinates for the position of the reference frame origin relative to planet centered frame from its geodetic coordinates (geodetic latitude, geodetic or inertial longitude, and usually zero altitude) 2.Compute the velocity of the planet-fixed local level reference frame origin (caused by the planet’s rotation) relative to planet centered inertial frame 3.Compute the rectangular coordinates of the object’s position relative to planet-centered reference frame from the same geodetic spherical to rectangular coordinate equations from Part I of this presentation, also summarized below 4.Subtract the position and velocity of the reference frame origin relative to the planet-centered frame from the position and velocity of the object relative to the planet-centered frame to get the object’s position and velocity relative to the planet-fixed local level frame 5.Transform the relative position and velocity vectors from planet-centered frame to the planet-fixed local level frame using the quaternion defined for the specific planet fixed frame (see earlier examples) Page: 16
Learning from the Past, Looking to the Future Position / Velocity Relative to Planet Fixed Frame The steps necessary to perform the calculations described on previous page are: Page: 17 omega = e-5; siderealTime = initial_siderealTime + omega * 180/pi * time; [ xi, yi, zi ] = ECEF_Spherical_to_Rectangular( lat, lon + siderealTime, alt, [ 1, 1 ] ); latOrigin = NED_lat * ones( size(time) ); loniOrigin = NED_lon * ones( size(time) ) + siderealTime; altOrigin = zeros( size(time) ); [ xiOrigin, yiOrigin, ziOrigin ] = ECEF_Spherical_to_Rectangular( latOrigin, loniOrigin, altOrigin, [ 1, 1 ] ); rREL_ECI(:,1) = xi - xiOrigin; rREL_ECI(:,2) = yi - yiOrigin; rREL_ECI(:,3) = zi - ziOrigin; for i=1:length(time) omegaCrossR(i,:) = cross( [ 0 0 omega ], [ xi(i) yi(i) zi(i) ] ); end vREL_ECI(:,1) = vxi - omegaCrossR(:,1); vREL_ECI(:,2) = vyi - omegaCrossR(:,2); vREL_ECI(:,3) = vzi - omegaCrossR(:,3); roll = zeros( size(time) ); pitch = ( NED_lat ) * ones( size(time) ); yaw = ( NED_lon * ones( size(time) ) + siderealTime ); qECI2NED = YPREulers2Quat( roll, pitch, yaw ); rREL_NED = QuatTransform( qECI2NED, rREL_ECI ); vREL_NED = QuatTransform( qECI2NED, vREL_ECI );
Learning from the Past, Looking to the Future Summary of Key Equations: Spherical to rectangular coordinates: Given the geodetic latitude ( E ), geodetic longitude ( E ), and geodetic altitude (h), the ECEF rectangular coordinates can be computed as: where If the rectangular coordinates relative to the Earth Centered, Inertial (ECI) frame are desired, simply replace E in the equations above with ( E + g ), where g is the sidereal “time”, or the angle between the vernal equinox and the prime meridian. Page: 18
Learning from the Past, Looking to the Future Summary of Key Equations: Geocentric latitude and geocentric radius: Given the geodetic latitude ( E ), one can compute the geocentric latitude ( C ), the geocentric radius to a point on the surface (r P ), the geocentric radius to point O (r C ), and the declination of the point O ( O ): Page: 19 EE CC rCrC P h O P E CC OO rCrC rPrP
Learning from the Past, Looking to the Future Summary of Key Equations: Spherical to rectangular coordinates using geocentric parameters: Given the geocentric radius (r C ), declination angle ( O ), and geodetic longitude ( E ), the ECEF rectangular coordinates can be computed as: Where declination angle and geocentric radius can be computed from geodetic latitude, E, as shown on the previous slide If the rectangular coordinates relative to the Earth Centered, Inertial (ECI) frame are desired, simply replace E in the equations above with ( E + g ), where g is the sidereal “time”, or the angle between the vernal equinox and the prime meridian Page: 20
Learning from the Past, Looking to the Future Summary of Key Equations: Rectangular to spherical coordinates: Given the ECEF rectangular coordinates (x E, y E, and z E ) the geodetic latitude ( E ), geodetic longitude ( E ), and geodetic altitude (h) can be computed as follows: The geodetic latitude ( E ), can be computed from the approximate solution (obtained from a single pass Newton-Raphson technique) as follows: If the rectangular coordinates (X I, Y I, Z I ) relative to the Earth Centered, Inertial (ECI) frame are used in the equations above instead of ECEF rectangular coordinates, the calculation for E in the equations above will actually calculate the inertial longitude I = ( E + g ), where g is the sidereal “time”, or the angle between the vernal equinox, and the prime meridian. To get the geodetic longitude ( E ), subtract the sidereal “time” ( g ) from the inertial longitude ( I ). Page: 21
Learning from the Past, Looking to the Future Summary of Key Equations: Navigation over an oblate spheroid: Given the velocity of an object relative to a north-east-down local level frame (V North, V East, V Down ), and its geodetic latitude ( E ) and its geodetic altitude (h), the time derivatives of the geodetic latitude ( E ), geodetic longitude ( E ), geodetic altitude (h) and quaternion for the orientation of the NED frame relative to the ECEF frame (q NED/ECEF ) can be computed as where Page: 22
Learning from the Past, Looking to the Future Fundamentals of Geodetic Kinematics, Part 2 of 2 Summary In Part 1, “Introductions and Definitions” we covered the following: – Mathematical relationships for ellipses – Coordinate frames and definition of terms – Equations used for geodetic kinematics – Spherical to rectangular position coordinates and vice-versa In Part 2, “Implementation”, we have covered the following: – Sidereal “Time” – Summary of WGS-84 standard constants used for Earth and moon – Coordinate frames commonly used for modeling of geodetic kinematics – Equations for navigation over an oblate spheroid – Great circle distance calculations – Calculation of position and velocity of an object relative to planet fixed frames Page: 23