+ All Categories
Home > Documents > Development and Validation of Reentry Simulation Toll Using MATLAB

Development and Validation of Reentry Simulation Toll Using MATLAB

Date post: 19-Oct-2015
Category:
Upload: bala-murugan
View: 28 times
Download: 1 times
Share this document with a friend
Description:
very import
146
DEVELOPMENT AND VALIDATION OF REENTRY SIMULATION USING MATLAB THESIS Robert E Jameson Jr, Captain, USAF AFIT/GSS/ENY/06-M08 DEPARTMENT OF THE AIR FORCE AIR UNIVERSITY AIR FORCE INSTITUTE OF TECHNOLOGY Wright-Patterson Air Force Base, Ohio APPROVED FOR PUBLIC RELEASE; DISTRIBUTION UNLIMITED
Transcript
  • DEVELOPMENT AND VALIDATION OF REENTRY SIMULATION USING MATLAB

    THESIS

    Robert E Jameson Jr, Captain, USAF

    AFIT/GSS/ENY/06-M08

    DEPARTMENT OF THE AIR FORCE

    AIR UNIVERSITY

    AIR FORCE INSTITUTE OF TECHNOLOGY Wright-Patterson Air Force Base, Ohio

    APPROVED FOR PUBLIC RELEASE; DISTRIBUTION UNLIMITED

  • The views expressed in this thesis are those of the author and do not reflect the official policy or position of the United States Air Force, Department of Defense, or the United

    States Government

  • AFIT/GSS/ENY/06-M08

    DEVELOPMENT AND VALIDATION OF REENTRY SIMULATION USING MATLAB

    THESIS

    Presented to the Faculty

    Department of Aeronautics and Astronautics

    Graduate School of Engineering and Management

    Air Force Institute of Technology

    Air University

    Air Education and Training Command

    In Partial Fulfillment of the Requirements for the

    Degree of Master of Science (Space Systems)

    Robert E Jameson Jr, BAAS

    Captain, USAF

    March 2006

    APPROVED FOR PUBLIC RELEASE; DISTRIBUTION UNLIMITED

  • AFIT/GSS/ENY/06-M08

    DEVELOPMENT AND VALIDATION OF REENTRY SIMULATION USING MATLAB

    Robert E Jameson Jr, BAAS Captain, USAF

    Approved:

    ____________________________________ _________ Lt Col Kerry Hicks (Chairman) date

    ____________________________________ _________ Dr. Richard Cobb (Member) date

    ____________________________________ _________ Lt Col Nathan Titus (Member) date

  • iv

    AFIT/GSS/ENY/06-M08

    Abstract

    This research effort develops a program using MATLAB to solve the equations of

    motion for atmospheric reentry and analyzes the validity of the program for use as a tool

    to expeditiously predict reentry profiles. The reentry vehicle is modeled as a point mass

    with constant aerodynamic properties as defined by the user. The equations of motion for

    reentry are based on the two-body problem. The atmosphere is modeled as a single layer

    exponentially decreasing in density. The MATLAB program has the ability to derive the

    initial trajectory conditions from the position and velocity relative to the rotating surface

    of the Earth, the Earth-centered inertial position and velocity, or the classic orbital

    elements. The program is compared to previously established programs in order to

    validate its accuracy and numerical stability when predicting various reentry profiles to

    include sub-orbital, super-circular and hyperbolic trajectories as well as wide ranges of

    aerodynamic properties.

    .

  • v

    Acknowledgements

    I would like to express appreciation to my faculty advisor, Lt Col Kerry Hicks, for

    his guidance and support throughout the course of this research effort. His insight and

    excellent instruction on spaceflight and reentry dynamics were invaluable. I would also

    like to thank my wife, for her unvarying support throughout my career and for her

    supreme example of fortitude, honesty and grace.

    Robert E. Jameson Jr

  • vi

    Table of Contents

    Page Abstract...iv

    Acknowledgements......v

    List of Figures...viii

    List of Tables..xi

    I. Introduction......1

    Background..........1

    II. Equations of Motion for Reentry.....5

    Chapter Overview ..5 Reference Frames...5 Equations of Motion...9

    III. Problem Setup........18

    Overview.. 18 Defining Terms ....18 Establishing Initial Conditions 19 Finding Initial Values from Inertial Position and Velocity .............22 Finding Initial Values from Classic Orbital Elements .27

    IV. Program Operation.31

    Overview ..31 Operation..31 Software System Process .34

    V. Program Validation....37

    Overview ..37 Comparison with TARGET..37

    Case #138 Case #2....43

    Comparison with IMPULSE.....49 Comparison with First-Order Analytic Solutions 56

    Shallow, Gliding Entry56 Steep, Gliding Entry63 Steep, Ballistic Entry...67

  • vii

    Page Medium, Gliding Entry at Supercircular Velocity ..70

    VI. Conclusion and Recommendations....75

    Conclusion....75 Recommendations for Future Work.....76

    Appendix: MATLAB Code.......78

    Core Code 78

    GUI Files ..91 Coordinate System and Atmosphere ...91 Input Function for Vehicle Pointing System ......95 Input Function for ECI System ...104 Input Function for Classic Orbital Elements ....115

    Ordinary Differential Equation Integrators 126 Code for Spherical Atmosphere Integrator ...126 Code for Ellipsoidal Atmosphere Integrator .127

    Functions to Terminate Integration129 Termination for Spherical Earth 129 Termination for Ellipsoidal Earth .........................................130

    Bibliography131

  • viii

    List of Figures

    Figure Page 1. ECI and ECF Coordinate Frames...........6

    2. ECF and Vehicle Pointing Coordinate Frames ..........7

    3. Flight-path and Heading Angles in Relation to ECF and Vehicle-Pointing Systems8

    4. Bank Angle ..............14

    5. Reference Ellipsoid ..21

    6. Relationship Between Heading and Velocity.......26

    7. Visualizing Relative Velocity and Flight-path Angle ..........27

    8. Classic Orbital Elements ......................28

    9. Perifocal Coordinate System ....29

    10. GUI for Reentry Problem Initiation .31

    11. GUI for Vehicle Parameters and Initial Conditions .32

    12. Sample Plot of Results .33

    13. Software System Process Chart Page 1 of 2 35

    14. Software System Process Chart Page 2 of 2 36

    15. Altitude/Time Comparison for MATLAB/TARGET Case #1 ...39

    16. Longitude/Altitude Comparison for MATLAB/TARGET Case #1 ............39

    17. Latitude/Altitude Comparison for MATLAB/TARGET Case #1 ...40

    18. Velocity/Altitude Comparison for MATLAB/TARGET Case #1 ...40

    19. Flight-Path Angle/Altitude Comparison for MATLAB/TARGET Case #1 ...41

    20. Heading/Altitude Comparison for MATLAB/TARGET Case #1 ..41

    21. Comparison of Angular Data for MATLAB/TARGET Case #1 .42

  • ix

    Page

    22. Comparison of Velocities for MATLAB/TARGET Case #1. .43

    23. Altitude/Time comparison for MATLAB/TARGET Case #2 .................44

    24. Longitude/Altitude Comparison for MATLAB/TARGET Case #2 ............45

    25. Latitude/Altitude Comparison for MATLAB/TARGET Case #2 ...45

    26. Velocity/Altitude Comparison for MATLAB/TARGET Case #2 ...........46

    27. Flight-Path Angle/Altitude Comparison for MATLAB/TARGET Case #2 ....46

    28. Heading/Altitude Comparison for MATLAB/TARGET Case #2 ...........47

    29. Comparison of Angular Data for MATLAB/TARGET Case #2 .................47

    30. Comparison of Flight-Path Angles for MATLAB/TARGET Case #2 48

    31. Comparison of Velocities for MATLAB/TARGET Case #2 ..48

    32. Reference Ellipsoid ..50

    33. Altitude/Time Comparison for MATLAB/IMPULSE 52

    34. Longitude/Altitude Comparison for MATLAB/IMPULSE 52

    35. Geodetic Latitude/Altitude Comparison for MATLAB/IMPULSE ...53

    36. Velocity/Altitude Comparison for MATLAB/IMPULSE ..........53

    37. Flight-Path Angle/Altitude Comparison for MATLAB/IMPULSE ....54

    38. Comparison of Geographic Angular Data for MATLAB/IMPULSE..54

    39. Comparison of Flight-Path Angles for MATLAB/IMPULSE 55

    40. Comparison of Velocities for MATLAB/IMPULSE ..55

    41. Velocity/Altitude Comparison for Shallow, Gliding Entry .....58

    42. Flight-Path Angle/Altitude Comparison for Shallow, Gliding Entry .....59

    43. Deceleration/Altitude Comparison for Shallow, Gliding Entry ......59

  • x

    Page

    44. Comparison of Velocities for Shallow, Gliding Entry.....60

    45. Comparison of Flight-Path Angles for Shallow, Gliding Entry .60

    46. Second-Order Flight-Path Angle Comparison for Shallow, Gliding Entry .62

    47. Second-Order Comparison of Flight-Path Angles for Shallow, Gliding Entry ...62

    48. Velocity/Altitude Comparison for Steep, Gliding Entry 64

    49. Flight-Path Angle/Altitude Comparison for Steep, Gliding Entry ..65

    50. Deceleration/Altitude Comparison for Steep, Gliding Entry ...65

    51. Comparison of Data for Steep, Gliding Entry .66

    52. Comparison of Deceleration Difference for Steep, Gliding Entry ..66

    53. Velocity/Altitude Comparison for Steep, Ballistic Entry ....69

    54. Flight-Path Angle/Altitude Comparison for Steep, Ballistic Entry .........69

    55. Comparison of Data for Steep, Ballistic Entry ....70

    56. Velocity/Altitude Comparison for Medium, Gliding Entry at Supercircular Speed ...72

    57. Flight-Path Angle/Altitude Comparison for Medium, Gliding Entry at Supercircular Speed .....72

    58. Deceleration/Altitude Comparison for Medium, Gliding Entry at

    Supercircular Speed .73

    59. Comparison of Data for Medium, Gliding Entry at Supercircular Speed....73

    60. inputs.m GUI Display ..91

    61. GUI to Input Parameters in Vehicle Pointing System .96

    62. GUI to Input Parameters in ECI System 105

    63. GUI to Input Parameters from Classic Orbital Elements...116

  • xi

    List of Tables

    Table Page 1. Parameters for Comparison with TARGET case #1 32

    2. Parameters for Comparison with TARGET case #2 ....38

    3. Parameters for Comparison with IMPULSE ...45

    4. Parameters for Shallow, Gliding Entry Comparison ...52

    5. Parameters for Steep, Gliding Entry Comparison58

    6. Parameters for Steep, Ballistic Entry Comparison ..62

    7. Parameters for Medium, Gliding Entry at Supercircular Velocity Comparison ..65

  • 1

    DEVELOPMENT AND VALIDATION OF REENTRY SIMULATION USING MATLAB

    I. Introduction

    Background Over the years several programs have been developed to predict the dynamics of

    vehicles during atmospheric reentry. The industry and military standard is the Program

    to Optimize Simulated Trajectories (POST). POST is a generalized point mass, discrete

    parameter targeting and optimization program. The program was originally developed

    for NASA in 1970 as a Space Shuttle trajectory optimization program. Since that time it

    has been repeatedly updated to improve its capabilities in the areas of vehicle modeling,

    trajectory simulation and targeting optimization. It features modular program

    construction and generalized routines so that various vehicle and planetary parameters

    can be simulated. It is based on FORTRAN 77 and C programming languages (Brauer

    and others, 1977:1-3).

    POST provides the capability to optimize point mass trajectories for both powered

    and unpowered vehicles throughout an entire regime of ascent to orbit and maneuvers to

    reentering the atmosphere of a rotating, oblate or spherical planet. The program integrates

    the equations of motion for a user-defined model while solving a constrained

    optimization problem to maximize or minimize a user defined function. The user

    supplies a guess for the optimal control vector and POST iteratively solves the problem

    for the optimal control vector that maximizes a scalar objective function subject to the

    user defined constraints (Brauer and others, 1977:7,8).

  • 2

    Typical applications of POST include a variety of simulations such as ascent to

    orbit with optimization of payload, velocity or initial weight; ascent abort with

    maximization of abort interval; intercontinental ballistic missiles with maximization of

    payload; reentry with optimization of heat rate or crossrange distance; orbital maneuvers

    to minimize fuel consumption; and aircraft performance to maximize velocity, cruise

    time or payload (Brauer and others, 1977:13). Among other projects, POST has recently

    been used in the planning for the Mars Airplane (Murray, 2001:3), the aerocapture

    simulation for the Titan Explorer Mission to the Saturnian system (Way, 2003:1) and

    NASAs Reusable Launch Vehicle.

    A program called TARGET was developed as a simpler and faster alternative to

    POST. TARGET was created for use as a tool in the systems concept stage where speed

    and reasonable accuracy are sufficient for planning. Although POST can model much

    more complicated motion than TARGET, trajectories simulated by TARGET have been

    validated as virtually identical to the results POST generates with the same input

    parameters. TARGET also generates a trajectory in 1/10th the time required by POST.

    As with POST, TARGET is programmed in FORTRAN. TARGET does show some

    numerical instability when unrealistic final velocities are targeted and when extreme

    dynamics such as hyperbolic velocity combined with negative lift are modeled

    (Hicks,1993:4-1).

    TARGET solves the equations of motion for reentry as a two-point boundary-

    value problem. It uses a double-loop shooting algorithm to optimize the simulated

    trajectory. The double-loop method attempts to match the unspecified free

    conditions to the boundary conditions identified by the user by starting with an initial

  • 3

    guess and iteratively solving the two-point boundary-value problem until an optimal

    solution is found and the free conditions are identified. Due to the fact that it is a

    targeting program, the user must identify the final radius, longitude, latitude, and velocity

    for the reentry vehicle. Additionally, the user must supply the initial radius, flight-path

    angle relative to the plane perpendicular to the radius, and the orbital inclination. The

    program is able to generate a reentry profile to include variations in velocity, altitude,

    flight-path angle, latitude, longitude, heading, Mach number, and rate of heating (Hicks,

    1993:A-1).

    A third program of similar nature to the objective of this research is called

    IMPULSE. The National Air and Space Intelligence Agency (NASIC) developed

    IMPULSE as a MATLAB based means to simulate ballistic missile flight paths.

    IMPULSE can model the entire trajectory of missiles from boost through impact. The

    unclassified version of the program contains examples of missiles and RVs that are not

    classified and is preloaded with the geographical data of multiple launch and impact sites

    across the globe. Multiple reentry vehicles (RVs) can be simulated. It also includes the

    ability to model events during the missile flight that change the mass or aerodynamics of

    the RV, such as booster separation, shroud ejection, or change in angle of attack

    (IMPULSE 2005).

    The focus of this research is the development and validation of a reentry simulator

    using the same language (MATLAB) as IMPULSE. Whereas IMPULSE is a complex

    application that considers the entire trajectory of a ballistic missile with only a rough

    analysis of the reentry portion, this research will focus on a quick solution for the

  • 4

    simulation of a wide variety of entry trajectories with much smaller integration steps than

    IMPULSE employs.

    MATLAB (MATrix LABoratory) is a high-level technical computing language

    for algorithm development, data visualization, and data analysis intended for use with

    numerical computations. The software has a wide range of applications, including signal

    and image processing, communications, control design, test and measurement, financial

    modeling and analysis, and computational biology. The original goal was to enable

    scientists and engineers to use matrix-based techniques to solve problems, without having

    to write programs in traditional languages like C and FORTRAN. Over the years

    additional capabilities have been added, in particular outstanding graphics support.

    MATLAB is rapidly displacing other languages as the software of choice for algorithm

    programming in education and industry and is now the preferred tool for many agencies

    of the U. S. Air Force and the Department of Defense (General 2006).

    This paper describes the development and validation of the trajectory simulation

    program. Chapter II begins with a description of the reference frames used to describe

    the position and direction of travel of the reentry vehicle, followed by development of the

    equations of motion. Chapter III shows how the initial conditions were established for

    the equations of motion. Chapter IV presents a comparison of the MATLAB program

    developed in this research with established software programs and analytical solutions.

    A description of the program operation is also included. The final chapter (V) states the

    conclusions drawn from the research and provides recommendations for improvements to

    the software that may be undertaken in the future. Finally, the Appendices include a

    flowchart of the alogorithm, descriptions of the MATLAB code and the code itself.

  • 5

    II. Equations of Motion for Reentry

    Chapter Overview

    The purpose of this chapter is to explain the development of the equations of

    motion for atmospheric reentry. First, the reference frames used in this research will be

    established. Next, the equations of motion will be derived for a point mass flying into the

    atmosphere of a rotating planet. All of the equations and figures in this chapter are

    summarized from Hicks (2006:33-58).

    Reference Frames

    The geocentric-equatorial system is an inertial reference frame with its origin at

    the center of the planet. In this system the x-y plane is the equatorial plane with the x-

    axis pointing at the vernal equinox. The z-axis passes through the north pole of the

    planet. The y-axis is positioned such that z x y= . In the case of the Earth this is

    commonly referred to as the Earth-Centered Inertial (ECI) reference frame and will be

    referred to as such in this research.

    In the planet-fixed coordinate frame the system spins about the z-axis with the

    rotation of the planet. In the case of the earth this reference frame will be referred to as

    the Earth-Centered Fixed (ECF) coordinate system. In the ECF system the x-axis points

    through the Greenwich Meridian (0o longitude). The relation between the ECI and ECF

    coordinate systems is illustrated in Figure (1) where the ECF system is shown as

    OX1Y1Z1, the planet rotates with a constant angular velocity JG and t is the sidereal

  • 6

    time. Sidereal time is defined as the time elapsed since the two systems were last

    aligned.

    ye

    xe

    1e x

    1e y

    1zz e,e

    t

    tye

    xe

    1e x

    1e y

    1zz e,e

    t

    t

    Figure 1. ECF and ECI Coordinate Frames

    A coordinate transformation from the ECI frame to the ECF frame is given by:

    [ ]( ) ( )( ) ( ) [ ]ee

    1000cossin0sincos

    1

    = tttt

    (1)

    A third system also originates at the planets center but defines the x-axis as

    pointing along the position vector ( rG

    ) of the vehicle of interest. As shown in Figure (2),

    this frame (OX2Y2X2) can be created by a rotation about the ECF z-axis followed by a

  • 7

    rotation about the y-axis. Therefore, represents the longitude and represents the geocentric latitude.

    rG

    rG

    2ex

    1e y

    2e y

    1ez

    1ex

    2ez

    Figure 2. ECF and Vehicle-Pointing Coordinate Frames

    Performing the two rotations yields the following relationship between the ECF

    frame (OX1Y1Z1) and the vehicle-pointing frame (OX2Y2Z2):

    [ ] [ ]12 cossinsincossin

    0cossinsinsincoscoscos

    ee

    =

    (2)

    Figure (3) introduces two more angles necessary to help describe the trajectory for

    reentry. The flight-path angle, , is defined as the angle between the velocity vector, VJG , and the plane orthogonal to rG (the local horizontal plane). is positive when VJG is above

  • 8

    the local horizontal plane. The heading angle, , is defined as the angle between the

    local parallel of latitude and the projection of VJG

    on the local horizontal plane. is positive in the right-handed direction about the x2-axis.

    Figure 3. Flight path and heading angles in relation to ECF and Vehicle-Pointing Systems

    A useful relationship to explain at this point is one that relates angular motion

    (JG ) between the ECF system and the vehicle-pointing system. The vehicle-pointing system was created by a rotation about the z1-axis followed by a rotation about the y2-axis. Therefore, the angular rate can be written as:

    1e x

    1e y

    1ze

    rG

    2e y

    2e x

    2ze

    VG

    vG

    Projection of vG

    on local horizontal plane

    Local parallel of latitude

    x2

  • 9

    1 2e ez yd ddt dt = JG (3)

    Equation (2) can then be used to write this expression entirely in terms of the vehicle- pointing system:

    2 2 2sin e e cos ex y zd d ddt dt dt = +

    JG (4)

    Equations of Motion

    By examining Figure (3) one can derive the equation for the velocity, denoted

    here as VRG

    . The R superscript denotes that the velocity is relative to the rotating ECF

    frame:

    ( ) ( ) ( )2 2 2

    sin e cos cos e cos sin eR R R Rx y zV V V V = + +G

    (5)

    A derivative in ECF frame is related to a derivative in vehicle-pointing reference

    frame by the following expression

    rdt

    rddt

    rd GGGG += 1/221

    (6)

    where 1

    drdt

    G is the velocity relative to the ECF system and 2/1JG is the angular rate

    established in Equation (4) as JG . Therefore, Equation (5) can be rewritten as:

  • 10

    2R d rV r

    dt= +

    GJG JG G (7)

    After completing the cross-product and writing in terms of the vehicle-pointing system,

    Equation (7) becomes:

    ( ) ( )2 2 2 e cos e eR x y zV r r r = + +G (8) Equations (5) and (8) are both solutions for the relative velocity written in terms of the

    vehicle-pointing system. Therefore, each component of Equation (5) must be equivalent

    with its corresponding component in Equation (8):

    sinVr R= (9)

    coscoscos

    rVR= (10)

    cos sinRVr = (11)

    These are known as the three kinematic equations of motion, which define the vehicles

    position relative to the rotating planet.

    These equations only give half of the information needed to fully describe the

    motion of the vehicle during reentry. Three more expressions that account for the

    changes in velocity and direction due to the forces of gravity and aerodynamics are

    needed.

  • 11

    For the purposes of this research the reentry vehicle is treated as a thrustless point

    mass. The total force acting on the point mass can then be defined as the summation of

    the force from gravity and the aerodynamic forces:

    F A mg= +JG JG JG (12)

    Another definition of the total force comes from Newtons Second Law where it is

    assumed the mass is constant and the reference frame is inertial

    I

    dVF mdt

    =JGJG

    (13)

    where the I in the superscript shows that this is a derivative of the velocity in the

    inertial frame. In order to express the derivative of the velocity in terms of the vehicle-

    pointing system it is necessary to apply the same technique used to establish the

    relationship of a derivative in a fixed frame to a derivative in a rotating frame used for

    Equation (6)

    I R

    d r dr rdt dt

    = + G G JG G

    (14)

    and taking a second derivative to find the derivative of the inertial velocity

    2

    2

    I R RRId r dV d d r d rr rdt dt dt dt dt

    = = + + +

    G JG G GJG G JG JG G (15)

  • 12

    where JG is the angular rate between the ECI and ECF frames. For the purpose of this

    research, this angular rate can be treated as a constant called JJG

    . Rd rdt

    G is the velocity

    relative to the rotating surface of the planet and 2

    2

    Rd rdt

    G is the acceleration relative to the

    rotating surface of the planet. Equation (15) simplifies to:

    ( ) ( )2I R RdV d V V rdt dt = + + JG JJG JJG JJG G

    (16)

    Replacing I

    dVdt

    JG with F

    m

    JG from Equation (13) results in:

    ( ) ( )2RR Rd Vm F m V m rdt = JG JG JJG JG JJG JJG G

    (17)

    As defined in the ECF system,

    JJG is about the z-axis only. It can be converted to the

    vehicle-pointing system by applying Equation (2):

    ( ) ( )2 2sin e cos ex z = +JJG (18)

    Equations (5) and (18) can then be used to find the cross-product

    RV

    JJG JG in Equation

    (17):

    ( )( )

    ( )2

    2

    2

    cos cos cos e

    cos sin sin cos sin e

    sin cos cos e

    R Rx

    Ry

    Rz

    V V

    V

    V

    = + +

    JJG JG

    (19)

  • 13

    Similarly, recognizing that 2exr r=

    G the cross product ( )r JJG JJG G can be solved: ( ) ( ) ( )2 22 2 2cos e sin cos ex zr r r = +JJG JJG G (20)

    Recall that the forces ( FJG

    ) acting on the vehicle are a summation of the

    aerodynamic forces ( AJG

    ) and the force due to gravity ( mgJG

    ). The aerodynamic forces can

    be further broken down into a drag force ( DJG

    ) and a lift force ( LJG

    ). Drag is defined as

    acting in the direction opposite velocity, and can therefore be described from Figure (3)

    in the vehicle-pointing system by geometric relation as:

    ( ) ( ) ( )2 2 2sin e cos cos e cos sin ex y zD D D D = JG (21)

    In order to define the lift force a new variable describing the bank angle, , must

    be introduced. is defined as the orientation of the lift vector relative to the ( , Rr VG JG ) plane as shown in Figure (4).

    RVJGrG

    LG

    ( ), Rr V planeG JG

    Figure 4: Bank Angle

  • 14

    Recognizing that the lift vector is also perpendicular to the drag vector, lift can

    then be described in the vehicle-pointing system as a function of bank angle, flight-path

    angle and heading:

    ( ) 2 2

    2

    cos cos e ( cos sin cos sin sin )e

    ( cos sin sin sin cos )e

    x y

    z

    L L L

    L

    = + + +

    JG (22)

    The final component of the force vector ( F

    JG) is the gravity term mg

    JG. Since the

    bodies in the system are being treated as point masses for the purpose of this research,

    gravity always acts along the radius vector:

    ( ) 2exmg mg= JG (23)

    Now all of the terms on the right hand side of Equation (17) have been described

    in the vehicle-pointing system. The equation can be rewritten as:

    ( ) ( )( )( )

    ( )( )

    2

    2

    2 2

    (cos cos ) sin

    2 cos cos cos e

    cos

    ( cos sin cos sin sin ) cos cos e

    2 cos sin sin cos sin

    ( cos sin s

    R RR

    x

    yR

    L D mgd V

    m m Vdt

    m r

    L D

    m V

    L

    + = + + + + +

    G

    ( )22

    in sin cos ) cos sin e

    2 ( sin cos cos ) sin cos zRD

    m V m r

    + +

    (24)

  • 15

    It is now necessary to equate the derivative of the velocity relative to the ECF

    frame ( )R Rd Vdt

    JG with the derivative of the velocity in the vehicle-pointing system. The

    same technique used in Equations (6) and (14) is applied here:

    ( ) ( )2R R R Rd V d V Vdt dt

    = +JG JG

    JG JG (25)

    where JG is the angular rate defined in Equation (3). ( )2 Rd Vdt

    JG is easily obtained from

    Equation (5) to yield: ( ) ( )

    ( )( )

    2

    2

    2

    2

    sin cos e

    cos cos sin cos cos sin e

    cos sin sin sin cos cos e

    RR R

    x

    R R Ry

    R R Rz

    d VV V

    dtV V V

    V V V

    = ++ + +

    G

    (26)

    The cross-product R VJG JG from Equations (4) and (5) is:

    2

    2

    2

    cos sin cos cos cos e

    cos sin sin cos sin e

    sin cos cos sin e

    R Rx

    Ry

    Rz

    V V

    V

    V

    = + + +

    i i

    i i

    i i

    JG JG

    (27)

    Replacing i and i with the expressions defined in the kinematic Equations (10) and (11), and combining Equations (25) - (27) gives:

  • 16

    ( )

    ( )

    2

    2

    2 2

    2

    22

    cos sin cos e

    cos cos sin cos cos sin e

    cos cos sin tan cos sin

    cos sin sin sin cos cos

    cos cos cos tan s

    R R RR R

    x

    R R R

    Ry

    R R R

    R

    d V VV Vdt r

    V V VVr

    V V VVr

    = + + +

    ++ + +

    G

    ( ) 2 ein sin z

    (28)

    Equations (24) and (28) are both solutions for the derivative of the velocity in the

    ECF frame expressed in vehicle-pointing coordinates, and can therefore be equated

    component-by-component to generate three coupled differential equations. After a bit of

    work, they can be solved for ,R

    V i i and i :

    ( )2 sin cos cos sin sin sin cosR DV g rm

    = + (29)

    ( )

    2

    2

    cos cos cos 2 cos cos

    cos cos cos sin sin sin

    RR RL VV g V

    m rr

    = + + ++ +

    (30)

    ( )22

    sin cos cos tan 2 sin cos tan sincos

    sin cos coscos

    RR RL VV V

    m rr

    = +

    (31)

  • 17

    These are the three differential force equations. When integrated simultaneously

    with the three kinematic equations, the location and movement of a point mass in a two-

    body system under the influence of aerodynamic forces can be completely described by

    the six independent parameters ( r , , , RV , and ). Note that, just as the velocity ( RV ) is relative to the rotating atmosphere, so is flight-path angle ( ) and heading ( ). The focus of this research is to set up a MATLAB program to integrate these

    equations and to test their validity and stability at various trajectories.

  • 18

    III. Problem Setup

    Overview

    This chapter provides details of the practical setup of the problem for a point-

    mass entering the Earths atmosphere. It includes definitions of the terms and the

    methods used to derive the initial values for the equations of motions from ECI

    coordinate and also from classic orbital elements.

    Defining Terms As stated earlier in the derivation of Equation (16), the angular rate of the Earths

    rotation is assumed to be constant. The value for can then be defined (WGS 84 1998:14):

    7.292115855228083 5E = rad/s (32)

    The gravity term (g), on the other hand, is not a constant but varies as a function

    of the radius (Regan, 1984:23)

    20

    0rg gr

    = (33)

    where the force of gravity and the radius of the Earth at the equator are the constants 0g

    and 0r , respectively. The WGS-84 values for 0g (Department 2000:3-7) and 0r

    (Department 2000:3-2) are:

    0 9.7803253359g = m/s2 (34)

  • 19

    0 6378137r = m (35)

    The values for lift (L) and drag (D) are approximated by the following

    expressions (Hicks, 1993:3-5)

    2

    2

    RDSC VD = (36)

    2

    2

    RLSC VL = (37)

    where S is the reference surface area of the vehicle, DC and LC are the coefficients of

    lift and drag, and is the density of the atmosphere. For this research, the assumption is made that the reference surface area and aerodynamic coefficients are constant and

    known for the reentry vehicle. The density of the atmosphere varies with altitude. For

    simplification, this study uses a single layer exponential atmosphere described by

    (Duncan, 1962:124)

    0

    he = (38)

    0 1.54793 = kg/m3 (39)

    1

    6935 m = (40)

    where 0 is the density of the atmosphere at sea-level, is the inverse of the scale height for the atmosphere and h is the altitude in question. The surface density and scale

    height are variables by temperature and other factors, but average values were chosen for

  • 20

    simplicity (Hicks, 1993:4-9). This exponential model shows excellent agreement with

    the 1976 Standard Atmosphere to an altitude of approximately 120 km, beyond which

    these values are far more difficult to model due to large fluctuations (Regan 1993:39).

    Determining the altitude is easy if the Earth is treated as a sphere. It would

    simply be the difference between the radius ( )r to the vehicle and the constant radius of the Earth. But the surface of the Earth is actually an uneven geoid, which is better

    modeled by an ellipsoid whose ellipticity (e) is defined as (Department, 2000:3-7)

    0

    1 pr

    er

    = (41)

    6356752.3142pr = m (42)

    where pr is the polar radius of the Earth. The altitude of the vehicle ( h ), shown in

    Figure (5), can then be approximated if the assumption is made that

    Er r h l = = (43)

    where Er is the radius of the Earth as a function of geocentric latitude. This assumption

    is valid for the Earth because its ellipticity is very small ( 1/ 298 ) and yields a result accurate to within 2 m for an altitude of 300 km (Regan, 1984:27). Now, a very good

    approximation for Er is

    cosa

    Exr = (44)

  • 21

    where ax is the distance shown in Figure (5) and described by (Geocentric 2005):

    ( )22tan 1p

    a

    rx

    e=

    + (45)

    pr

    pr

    0r

    Figure 5. Reference Ellipsoid

    Establishing the Initial Conditions

    For this study, the differential equations of motion were solved as initial value

    problems using MATLAB. In order to set the initial conditions, it is essential to define

    the values needed for the differential equations. In the unlikely case the user knows these

    particular parameters, they can be entered directly as the initial conditions. If other more

    *

    rG

    ax

    l

    *a

  • 22

    common values are known for the reentry vehicle, conversion to the initial values

    required for the integration is necessary.

    As a means to provide flexibility for the user, the program was written to allow

    for inputs from three different coordinate systems. First, the user may enter the initial

    values for the differential equations directly in terms of the vehicle-pointing system

    coordinates relative to the ECF frame. Second, the values for position and velocity may

    be defined in terms of the Cartesian ECI frame. Finally, the six classic orbital elements

    can be used to define the initial reentry conditions. In all cases the user must also define

    the constants for the reentry vehicles mass, coefficients of lift and drag, the effective

    aerodynamic surface area and the constant vehicle bank angle.

    Finding Initial Values from Inertial Position and Velocity

    If the initial conditions are given in the ECI frame, a method to convert them to

    the values desired follows. The first step is to calculate the orbital momentum vector

    ( HJJG

    ) (Weisel, 1997:62):

    H r v= JJG G G (46)

    The inertial flight-path angle relative to the local horizontal plane can then be

    found (Hicks, 2006:17)

    cos I Hrv

    = (47)

    which is ambiguous in terms of the sign of the inertial flight-path angle. The flight-path

    angle is defined as negative when it is Earthward of the local horizontal plane; therefore,

  • 23

    if the vehicle is moving away from the origin of the ECI frame the flight-path angle is

    positive. In other words, if 0r v >G G , the flight-path angle is positive; otherwise, it is negative.

    The initial latitude ( ) is simple to find due to the fact that the xy-plane in the ECI frame corresponds to the Earths equator

    sin zr

    = (48)

    where xyz are the components of r. Since 0 090 90 , the above equation determines without ambiguity.

    The longitude ( ) is the angle between the position vector projected into the xy-plane and the positive x direction:

    2 2sin y

    x y = + (49)

    This will only yield results of 090 , so a correction can be made by subtracting the result for from when the x component of the initial position is negative. Equation (49) is only valid when the ECI and ECF coordinate systems are aligned. Otherwise, a

    correction must be made for the angular position of the ECF frame relative to the ECI

    frame:

    1

    2 2sin y t

    x y = +

    (50)

  • 24

    The inclination of the trajectory is needed in order to calculate the heading of the

    reentry vehicle. Inclination is the angle between the angular momentum vector ( HJJG

    ) and

    the z-axis, given by (Weisel, 1997:62):

    ecos zHi

    H=

    JJG (51)

    The inertial heading ( I ) is the angle between the projection of the inertial velocity onto the local horizontal plane and the latitude. The inertial heading can be

    related to the inclination and latitude (Longusky and Vinh, 1980:8):

    coscoscos

    I i = (52)

    This result has quadrant ambiguity because the heading can vary a full 3600. In order to

    resolve this problem, it is necessary to find the right ascension of the ascending node.

    First the line of nodes nG

    can be found as the vector perpindicular to the angular-

    momentum vector HJJG

    and the z-axis (Weisel, 1997:62):

    ee

    z

    z

    HnH=

    JJG GJJG (53)

    The line of nodes lies in the equatorial plane and has the form:

    e cos e sinx yn = + G (54)

  • 25

    The right ascension of the ascending node ( ) is now known without ambiguity. The inertial heading is always positive when the object in question is within 090 of the ascending node. Therefore, when the difference between , found in Equation (49), and is less than 090 , the result is 0 00 180I< < , otherwise 0 0180 360I .

    The next task is to find the heading relative to the rotating atmosphere. For

    simplification, it is a good idea to define the local horizontal component of the inertial

    velocity as hV

    cos IhV V = (55)

    and the velocity of the rotating atmosphere ( eV ) at the position of the vehicle relative to

    the center of the Earth (Longusky and- Vinh, 1980:8):

    coseV r = (56)

    The horizontal component of the relative velocity is then h eV VJG JG . The relative heading is the angle between the horizontal component of the relative velocity and the local parallel of latitude as shown in Figure (6). can be found from the law of cosines

    2 2

    coscos2 cos

    Ih e

    Ie h e h

    V VV V V V

    = + (57)

    where the quadrant ambiguity of is solved in the same manner as for I .

  • 26

    Figure 6. Relationship Between Heading and Velocity

    The next value that needs to be defined is the velocity (

    RVJG

    ) relative to the

    rotating atmosphere shown in Figure (7). The relative velocity is described as eV VJG JJG

    and

    once again the law of cosines in invoked to come up with a relationship for the magnitude

    of RV :

    2 2 2 cosR Ie e hV V V V V = + (58)

    As described in Chapter 1 and illustrated in Figure (7), the relative flight path

    angle, , is defined as the angle between the relative velocity and the local horizontal plane. It is determined by the relationship:

  • 27

    sinsin

    I

    R

    VV

    = (60)

    Since 0 090 90 , Equation (60) determines without ambiguity.

    Figure 7. Visualizing Relative Velocity and Flight-path Angle

    All of the initial values for the equations of motion ( ), , , , ,Rr V have now been found and can be integrated to solve for the entry trajectory.

    Finding Initial Values from Classic Orbital Elements As mentioned earlier in this chapter, the initial values for the equations of motion

    can also be derived from the six classic orbital elements. The semimajor axis (a) defines

  • 28

    the size of the orbit and its period. The eccentricity (e) determines the orbits shape. The

    right ascension of the ascending node ( ) was addressed in the previous section and identifies the points where the orbital plane intersects the equator, measured as the angle

    from the vernal equinox to the point where the orbit crosses the equator from south to

    north. The orbital inclination (I) was also discussed in the previous section and is defined

    as angle between the orbital plane and the equator at the ascending node. The argument

    of perigee ( ) is the angle from the ascending node to the perigee point. Finally, the true anomaly (v) is described as the position of vehicle at a particular instant in time with

    respect to the argument of perigee (Weisel, 1997:60). Most of these elements are

    illustrated in Figure (8).

    Figure 8. Classic Orbital Elements

  • 29

    As the first step, the scalar radius can be directly calculated from the orbital

    elements, as shown by Griffin and French (2004:106):

    ( )211 cosa e

    re v= + (61)

    Equation (61) accounts for all possible orbits except parabolic. The radius vector can

    then be written in the perifocal system, where the center of the Earth is the origin, Pe

    points towards perigee and Qe is in the orbital plane perpendicular to Pe as illustrated in

    Figure (9):

    ( ) ( )cos e sin eP Qr r v r v= +G (62)

    Figure 9. Perifocal Coordinate System

  • 30

    The first step in obtaining the velocity vector is calculating the semi-latus rectum

    of the orbit (p) (Griffin and French, 2004:107):

    ( )21p a e= (63)

    The velocity vector can then be found by (Hicks, 2006:29)

    ( ) ( )sin e cos eP QV v e vp = + +

    JG (64)

    where is the gravitational parameter of the Earth (Weisel, 1997:323):

    14 3 23.98601 10 m / s = (65)

    The values can now be found in the inertial frame by a rotation. The substitutions

    for the perifocal unit vectors into the ECI frame are given by (Griffin and French,

    2004:122):

    ( )( ) ( )

    e cos cos sin sin cos e

    sin cos cos sin cos e sin sin e

    P x

    y z

    i

    i i

    = + + +

    (66)

    ( )( ) ( )

    e cos sin sin cos cos e

    sin sin cos cos cos e cos sin e

    Q x

    y z

    i

    i i

    = + + +

    (67)

    Now that the radius and velocity are known in inertial coordinates, they can be

    converted to the initial values for the equations of motion as described in the previous

    section.

  • 31

    IV. Program Operation

    Overview This chapter is a brief description of the operation of the MATLAB reentry

    software developed in this research. First, a description of the user operations is

    presented along with graphical illustrations of the interfaces. Next, the software system

    processes are outlined and presented in the form of a flow chart.

    Operation To begin operation of the reentry software, the user must ensure that the folder

    containing the program reentry.m is opened in MATLABs Current Directory. Typing

    reentry at the command line will then initiate the program by bringing up a graphical

    user interface (GUI) titled Reentry Program Initiation as shown in Figure (10). This

    GUI allows the operator to select the desired coordinate system of the initial conditions as

    Figure 10. GUI for Reentry Problem Initiation

  • 32

    well as the preferred shape of the atmosphere from drop-down menus listing the options.

    Initial conditions can be in the vehicle pointing system, the ECI system, or described by

    the classic orbital elements. The atmosphere may be defined as spherical or conforming

    to the WGS-84 ellipsoidal approximation for the Earths shape.

    Clicking Run on the initiation GUI will bring up a second GUI, as shown in

    Figure (11), to allow the user to input the vehicle parameters and initial conditions of

    reentry. The operator simply needs to include a value in each cell corresponding to each

    particular parameter. Clicking Run initiates the simulation.

    Figure 11. GUI for Vehicle Parameters and Initial Conditions

  • 33

    The software then automatically generates a plot, like that shown in Figure (12),

    for each of the parameters solved for in the six equations of motion; altitude, velocity,

    flight-path angle, geocentric latitude, longitude, and heading. It also generates a plot

    showing the acceleration experienced by the vehicle.

    Figure 13. Sample Plot of Results

    Additionally, the results are tabulated and saved into a matrix named Y. The Y

    matrix can be selected from the MATLAB Workspace and displayed in the Array Editor.

    Y has six columns that are values for radius (m), relative velocity (m/s), relative flight-

  • 34

    path angle (rads), longitude (rads), latitude (rads), and relative heading (rads),

    respectively. Each row of Y corresponds to a time from the vector t, which is also found

    in the Workspace. t is composed of the time, in seconds, for each step of the integration,

    starting at zero for the initial conditions.

    The vehicle parameters and initial conditions are automatically displayed as a

    matrix call user_inputs in the MATLAB Array Editor along with a matrix of their

    description called parameters. The initial conditions displayed in user_inputs can be

    modified directly in the Array Editor and the entire simulation can be run again by typing

    reentry at the MATLAB Command Line. Subsequent initiations of the program in this

    manner will not bring up the GUIs described earlier. In order to change the coordinate

    system or atmosphere shape, the MATLAB Workspace needs to be cleared and the

    program re-initiated.

    Software System Process

    The MATLAB codes developed in this research, along with a description of each

    codes function, is presented in detail in the Appendix. The codes themselves contain

    comments describing the purpose of every section. A general overview of the software

    system process is shown here in Figures (13) and (14).

  • 35

    Figure 13. Software System Process Chart Page 1 of 2

    reentry.m trajectory simulation

    Do user inputs

    already exist?

    No

    Run GUI inputs.m

    Coordinate system selected

    Orbital elements

    Vehicle pointing system

    ECI system

    Run GUI eci.m

    Save userinput values

    Convert inertial coordinates to vehicle pointing system:

    Eqs. (46) (60)

    Run GUI orb.m Run GUI

    vpoint.m

    Save user input values Save user input

    values

    Coordinate system

    Convert obital elements to vehicle pointing system:

    Eqs. (46) (67)

    Convert initial conditions to vehicle pointing

    system: Eqs. (46) (67)

    Vehicle pointing system

    ECI or orbitalelements

    Yes

    To Page 2 of 2

    Define constants: Eqs. (32) (42)

  • 36

    Figure 14. Software System Process Chart Page 2 of 2

    Establish integration time interval

    Atmosphere shape

    Integrate equations of motion [Eqs. (9) (10),

    (29) (31)] using function ellipsoid.m

    Ellipsoid

    Stop integration at surface of Earth using function

    stope.m

    Calculate acceleration for entire trajectory: Eq. (29)

    End

    Integrate equations of motion [Eqs. (9) (10),

    (29) (31)] using function spherical.m

    Stop integration at surface of Earth using function

    stops.m

    Establish initial condition vector

    Plot results

    From Page 1 of 2

    Spherical

  • 37

    V. Program Validation

    Overview This chapter shows comparisons of the results obtained from the MATLAB

    reentry program with those obtained from other established software programs as well as

    the results that are predicted by first-order analytical approximations of the equations of

    motion. First, the software will be compared with two trajectories generated by

    TARGET. Next, it will be compared to a trajectory generated by IMPULSE. The

    MATLAB program will then be tested against the first-order solutions at near-circular

    orbital velocities for a shallow gliding entry, a steep gliding entry, and a steep ballistic

    entry. Finally, the program will be examined against the first-order approximation for

    medium gliding entry at supercircular orbital velocity.

    Comparison with TARGET As mentioned in the background for this research, TARGET was developed as a

    tool for initial analysis of entry trajectories. It was intended to be used as a substitute for

    POST during the systems concept stage when simplicity and speed is preferred and a

    good estimate will suffice. As such, TARGET was validated against POST and the

    trajectories they produced agreed quite nicely. TARGET results only differed from

    POST by less than .004% for flight-path angle, .001% for latitude and longitude, and .6%

    for velocity (Hicks, 1993:4-7). By validating the MATLAB program results against

    TARGET, it is also implicitly validated against POST.

  • 38

    Case #1.

    The first comparison consists of the trajectory for a notional high-speed, ballistic

    projectile. Both TARGET and the MATLAB program begin with the same initial

    parameters as shown in Table (1). For this case the classic orbital elements of the reentry

    vehicle are used as initial conditions so the function of the MATLAB program to convert

    these elements as described in Chapter III is tested. TARGET assumes the Earths

    atmosphere is spherical, therefore the MATLAB program used a spherical atmosphere to

    remain consistent. The trajectories generated by each program are plotted in Figures (10)

    - (15).

    Table (1): Parameters for Comparison with TARGET case #1

    Mass: 13 kg LC : 0.00

    DC : .08575 S: .036609615 2m a(0): -1840738 m

    (0) : 4.552029 rad (0)i : 1.178101

    e(0): 1.889431 (0) : 2.377746 rad (0) : 4.213107 rad

    : 0 rad Corresponding initial conditions for equations of motion (automatically generated) r(0): 6774400 m

    (0) : 4.4943 rad ( )0 : .5903 rad ( )0 :RV 18220 m/s

    ( )0 : -1.2217 rad ( )0 : 1.1506 rad

  • 39

    Figure 15. Altitude/Time Comparison for MATLAB/TARGET Case #1

    Figure 16. Longitude/Altitude Comparison for MATLAB/TARGET Case #1

  • 40

    Figure 17. Latitude/Altitude Comparison for MATLAB/TARGET Case #1

    Figure 18. Velocity/Altitude Comparison for MATLAB/TARGET Case #1

  • 41

    Figure 19. Flight-Path Angle/Altitude Comparison for MATLAB/TARGET Case #1

    Figure 20. Heading/Altitude Comparison for MATLAB/TARGET Case #1

  • 42

    In order to quantify the results of the comparison, the differences were summarized on a

    percentage basis and plotted against time in Figures (16) and (17). The percentage values

    were computed at each interval of time using:

    (TARGET Result) - (MATLAB Result)% difference =

    MATLAB Result (68)

    Figure 21. Comparison of Angular Data for MATLAB/TARGET Case #1

  • 43

    Figure 22. Comparison of Velocities for MATLAB/TARGET Case #1

    These results illustrate that the MATLAB program and TARGET produce

    comparable results when starting with the same initial parameters. It also demonstrates

    the validity of the routine used in MATLAB to convert the orbital elements to the

    parameters used in the equations of motion. The deviation in velocity at the lower levels

    of the atmosphere is almost certainly a result of the different atmospheric models used by

    the two programs. TARGET uses a more complex seven-layered atmosphere while the

    MATLAB program uses a simplified single layer exponential atmosphere.

    Case #2. A second comparison was performed between the MATLAB routine and

    TARGET using the vehicle tested by Albrecht in her analysis of the effects of lift and

    thrust on maneuvering a reentry vehicle (2005:24-29). This vehicle is a much larger and

    heavier model than the one in the previous test and includes a substantial amount of lift at

  • 44

    a significant bank angle. It also begins its trajectory at a much lower velocity. The initial

    parameters are listed in Table (2) and the results are shown in Figures (18) - (26).

    Table (2): Parameters for Comparison with TARGET case #2

    Mass: 700 kg LC : .2

    DC : .2 S: .216419 2m r(0): 6500140 m (0): -1.34732 rad

    (0) : .65176 rad (0)RV : 3007.2 m/s

    (0) : -.523599 rad (0) : 1.195427 rad

    : .8 rad

    Figure 23. Altitude/Time comparison for MATLAB/TARGET Case #2

  • 45

    Figure 24. Longitude/Altitude Comparison for MATLAB/TARGET Case #2

    Figure 25. Latitude/Altitude Comparison for MATLAB/TARGET Case #2

  • 46

    Figure 26. Velocity/Altitude Comparison for MATLAB/TARGET Case #2

    Figure 27. Flight-Path Angle/Altitude Comparison for MATLAB/TARGET Case #2

  • 47

    Figure 28. Heading/Altitude Comparison for MATLAB/TARGET Case #2

    Figure 29. Comparison of Angular Data for MATLAB/TARGET Case #2

  • 48

    Figure 30. Comparison of Flight-Path Angles for MATLAB/TARGET Case #2

    Figure 31. Comparison of Velocities for MATLAB/TARGET Case #2

  • 49

    These results demonstrate the ability of the MATLAB routine to competently

    simulate modeled trajectories for vehicles with lift and a bank angle. Once again the

    results for predicted position from the MATLAB program and TARGET are virtually

    identical. While not excessive, there are deviations in the predicted velocity, flight-path

    angle and heading angle between the two programs. This is probably attributable to the

    different atmospheric models used. The fact that Case #2 was a high-lift model while

    Case #1 was a ballistic model is almost certainly the reason those deviations were more

    pronounced in this simulation than in the previous one.

    Comparison with IMPULSE The MATLAB program was also compared to IMPULSE to determine if they

    produced similar results. As described in the Introduction, IMPULSE is designed to

    simulate the trajectories of ballistic missiles from launch to impact. Since the MATLAB

    program does not consider thrust, the comparison is made starting from the point

    immediately following burnout and separation of the reentry vehicle.

    One problem in developing the comparison between the two programs is that the

    output from IMPULSE displays the latitude in geodetic coordinates rather the geocentric

    coordinates used in Equations (9) (11) and (29) (31). Therefore, the geocentric

    latitude output from the MATLAB program was converted to geodetic latitude for

    comparison purposes (Geocentric 2005).

    To begin with, the angle shown as *a in Figure (27) is the relationship between

    the geocentric latitude and the geodetic latitude at the point where rG

    crosses the Earths

    surface, described by

  • 50

    *2

    tantan(1 )a e

    = (69)

    where e is the ellipticity of the Earth described in Equation (41). The angular difference

    between geocentric and geodetic latitude at this point on the Earth is:

    *a = (70)

    The radius of curvature of the Earth ( a ) at this point in the Meridian is:

    ( )

    ( )( )2

    03

    2 2 * 2

    1

    1 2 sina

    a

    r e

    e e

    =

    (71)

    0r

    Figure 32. Reference Ellipsoid

    *

    rG

    ax

    l

    *a

    0r

  • 51

    The difference between *a and the geodetic latitude of the reentry vehicle ( * ) is then approximated as a function of the height above the surface of the planet where h and l in

    Figure (5) are assumed to be equal for the Earth as expressed in Equation (43):

    * sintan

    a

    hh = + (72)

    Subtracting * from *a gives the geodetic latitude:

    * * *a = (73)

    The vehicle parameters and the conditions following burnout, described in the

    ECI frame, are shown in Table (3). The results of the comparison are shown in Figures

    (28) (35).

    Table (3): Parameters for Comparison with IMPULSE

    Mass: 1088.64 kg Corresponding initial conditions for equations of motion (automatically generated)

    LC : 0.00

    DC : .11 r(0): 6946000 m S: 1.880022 2m ( )0 : -1.374 rad X(0): 1044303.78549 m ( )0 : .772 rad Y(0): -4866124.54174 m ( )0 :RV 5194.5 m/s Z(0): 4845298.63761 m ( )0 : 1.0775 rad X(0) : -1094.1974 m/s ( )0 : -2.7926 Y(0) : -4187.85837 m/s Z(0) : 2588.77299 m/s : 0 rad t(0): 00:03:20.6 (sidereal time)

  • 52

    Figure 33. Altitude/Time Comparison for MATLAB/IMPULSE

    Figure 34. Longitude/Altitude Comparison for MATLAB/IMPULSE

  • 53

    Figure 35. Geodetic Latitude/Altitude Comparison for MATLAB/IMPULSE

    Figure 36. Velocity/Altitude Comparison for MATLAB/IMPULSE

  • 54

    Figure 37. Flight-Path Angle/Altitude Comparison for MATLAB/IMPULSE

    Figure 38. Comparison of Geographical Angular Data for MATLAB/IMPULSE

  • 55

    Figure 39. Comparison of Flight-Path Angles for MATLAB/IMPULSE

    Figure 40. Comparison of Velocities for MATLAB/IMPULSE

  • 56

    The angular data results are essentially the same for both programs. The fact that

    the initial conditions matched validates the routine used in MATLAB to convert inertial

    coordinates to the parameters used in the equations of motion. The difference in flight-

    path angles was not plotted as a percent difference due to the discontinuity as the angles

    approached zero. The flight-path angle and altitude comparisons demonstrate the ability

    of the MATLAB program to simulate an orbital trajectory far from the planets surface.

    Although the velocities match throughout the exoatmospheric portion of the trajectories,

    there is a significant deviation as the reentry vehicle penetrates the denser levels of the

    atmosphere. This is probably a result of the fact that IMPULSE varies DC and LC as a

    function of velocity and small angles of pitch and yaw while the MATLAB program

    assumes DC is constant and used 0LC = for this simulation. Further analyis of this

    deviation in follow-on research may be appropriate.

    Comparison with First-Order Analytic Solutions The equations of motione described in Chapter I can be simplified and solved

    analytically for special cases when certain assumptions are made. Such solutions are

    approximations but provide a good estimate as long as the parameters fit the assumptions

    made for each special case.

    Shallow, Gliding Entry.

    The first analytic solution tested is the analysis for shallow, gliding entry. This

    solution assumes the vehicle produces enough lift to maintain hypersonic glide at a small

    flight-path angle. Once the flight-path angle exceeds the point where the small angle

    approximations

  • 57

    sin (74)

    cos 1 (75)

    no longer hold true, the analysis is no longer valid.

    The solved equations of motion for shallow, gliding entry are given by (Hicks,

    2005:81-86)

    2DSC

    m = (76)

    where is a convenient way to express the altitude non-dimensionally as a function of density. The relative velocity is related to the altitude by:

    2 0 0

    0 1

    R

    L

    D

    g rVCrC

    = +

    (77)

    The flight-path angle is given by:

    0

    2

    2

    RL

    D

    gC VC

    = (78)

    Ignoring the gravity force along the flight path, the acceleration is:

    2R

    Rd V Vdt

    = (79)

  • 58

    The input parameters for the comparison with the shallow, gliding entry analytic

    solution are intended to simulate a large high-drag vehicle with moderate lift and are

    given in Table (4). The graphical comparisons are shown in Figures (36) (40).

    Table (4): Parameters for Shallow, Gliding Entry Comparison Mass: 99000 kg

    LC : .5

    DC : 1.0 S: 20 2m r(0): 6438140 m (0): -.01304 rad RV (0): 7571.7 m/s

    (0) : .5236 rad (0) : 0 rad (0) : .64649 rad

    : 0 rad

    Figure 41. Velocity/Altitude Comparison for Shallow, Gliding Entry

  • 59

    Figure 42. Flight-Path Angle/Altitude Comparison for Shallow, Gliding Entry

    Figure 43. Deceleration/Altitude Comparison for Shallow, Gliding Entry

  • 60

    Figure 44. Comparison of Velocities for Shallow, Gliding Entry

    Figure 45. Comparison of Flight-Path Angles for Shallow, Gliding Entry

  • 61

    These results validate that the MATLAB program has been coded correctly as

    they match very well in the portion of the trajectory where the first-order solution is

    accurate. Not surprisingly, the first-order solution fails to properly predict the vehicles

    behavior when the small-angle approximations for are no longer valid, as illustrated particularly well in Figure (37). The predicted velocity, flight-path angle, and

    deceleration all begin to diverge when decreases below about - 03 , as shown in Figures (38) (40).

    Since the deviations in the comparison with first-order theory were obviously the

    result of the breakdown of the small-angle approximations for , a quick look at this problem using a second-order solution is appropriate. Lohs unified theory for entry

    trajectories reveals that the relative flight-path angle is given by (Hicks, 2006:148):

    ( )0 0

    20

    coscos

    11 1 1

    Le e

    D

    eR

    CC

    g rr V

    + = +

    (80)

    Figures (41) and (42) show the results, once again using the parameters shown in

    Table (4). The flight-path angle predicted by the second-order approximations matches

    the angle predicted by the MATLAB program much more closely than the first-order

    solution, especially as the flight-path angle decreases below 30. These results further

    bolster confidence in the MATLAB routine and help explain the deviations encountered

    with first-order theory as the flight-path angle steepens.

  • 62

    Figure 46. Second-Order Flight-Path Angle Comparison for Shallow, Gliding Entry

    Figure 47. Second-Order Comparison of Flight-Path Angles for Shallow, Gliding Entry

  • 63

    Steep, Gliding Entry. The second comparison with analytical solutions tests the case of steep entry with

    lift at near-circular velocity. Using the assumption that drag and lift are the dominant

    factors affecting the trajectory, Hicks derives the approximate solutions for relative

    velocity and relative flight-path angle and deceleration ( decela ) as (2005:55-57):

    ( )cos Le eD

    CC

    = + (81)

    2 2 2expR R eeL

    D

    V VCC

    =

    (82)

    ( )2 2cos cos exp eR edecel eL L

    D D

    a VC CC C

    = +

    (83)

    The subscript e denotes the initial condition at entry.

    The model used for this test is a small, dense, streamlined vehicle with lift

    entering at a near-vertical flight-path angle. The initial parameters are listed in Table (5)

    and the results are shown in Figures (43) (47).

  • 64

    Table (5): Parameters for Steep, Gliding Entry Comparison Mass: 50 kg

    LC : .03

    DC : .01 S: .01 2m r(0): 6478140 m (0): -850 RV (0): 5372 m/s

    (0) : .600588 rad (0) : -1.8075 rad (0) : 1.916 rad

    : 0 rad

    Figure 48. Velocity/Altitude Comparison for Steep, Gliding Entry

  • 65

    Figure 49. Flight-Path Angle/Altitude Comparison for Steep, Gliding Entry

    Figure 50. Deceleration/Altitude Comparison for Steep, Gliding Entry

  • 66

    Figure 51. Comparison of Data for Steep, Gliding Entry

    Figure 52. Comparison of Deceleration difference for Steep, Gliding Entry

  • 67

    The close agreement of these results strongly suggest that the equations have been

    coded correctly in MATLAB and that the program produces reliable trajectories for

    steep, gliding entry problems.

    Steep, Ballistic Entry.

    First-Order approximation for steep, ballistic entry models a hypersonic vehicle

    with no lift at a near-vertical flight-path angle. The solution makes the assumption that

    the flight-path angle remains constant throughout the trajectory. The simplified equations

    of motion for relative velocity and relative flight-path angle are derived by Hicks

    (2006:118-121).

    Since the flight-path angle is a constant:

    e = (84)

    For simplification the variable is defined as

    2sin e

    = (85)

    and a constant A defined as

    ( ) ( )20

    exp2

    Re e

    e

    VA Ei

    g = (86)

    where ( )eEi is the exponential integral e . The relative velocity is defined as:

    ( )02 2 exp( ) ( )R g A EiV += (87)

  • 68

    Once again, the subscript e denotes the initial entry condition. The initial parameters for the comparison between the MATLAB program and

    first-order analytical solution for steep, ballistic entry are shown in Table (6) and the

    results are shown graphically in Figures (48) (50).

    Table (6): Parameters for Steep, Ballistic Entry Comparison Mass: 13 kg

    LC : 0

    DC : .08575 S: .036609615 2m r(0): 6778140 m (0): -850 RV (0): 10193 m/s

    (0) : .58059 rad (0) : -1.8875 rad (0) : 1.7 rad

    : 0 rad

  • 69

    Figure 53. Velocity/Altitude Comparison for Steep, Ballistic Entry

    Figure 54. Flight-Path Angle/Altitude Comparison for Steep, Ballistic Entry

  • 70

    Figure 55. Comparison of Data for Steep, Ballistic Entry

    Once again, the first-order theory matches well with the MATLAB program. The

    small deviation in flight-path angle is expected because the analytical solution treats this

    parameter as a constant, as expressed in Equation (84). The velocity difference is

    consistent with the previous comparisons with first-order solutions.

    Medium, Gliding Entry at Supercircular Velocity.

    The final test is another look at medium, gliding entry, but this time there is no

    restriction that the initial velocity must be at near-circular speed. Hicks shows how

    Wang and Ting developed their approximate solution for this condition with the

    assumption that the flight-path angle remains relatively small (2006:104-107). Their

    simplified equations for flight-path angle and relative velocity are as follows:

  • 71

    ( )12

    2 0 02

    0

    22 1 lnLe e RD e

    g rCC r V

    =

    (88)

    ( )2 20 0

    20

    2exp

    1 1

    eRe

    LR

    D e

    V Vg rC

    C r V

    = +

    (89)

    As with shallow, gliding entry at near-circular speeds, the acceleration remains

    2R

    Rd V Vdt

    = (90)

    The simulated model for the comparison with the first-order solution for medium,

    gliding entry at supercircular velocity is a small lifting body entering the atmosphere at a

    moderate flight-path angle with high velocity. The initial parameters are listed in Table

    (7) and the results are shown in Figures (51) (54).

    Table (7): Parameters for Medium, Gliding Entry at Supercircular Velocity Comparison Mass: 2000 kg

    LC : .075

    DC : .3 S: 20 2m r(0): 6478140 m (0): -350 RV (0): 9847 m/s

    (0) : .5236 rad (0) : 0 rad (0) : 1.146 rad

    : 0 rad

  • 72

    Figure 56. Velocity/Altitude Comparison for Medium, Gliding Entry at Supercircular Speed

    Figure 57. Flight-Path Angle/Altitude Comparison for Medium, Gliding Entry at Supercircular Speed

  • 73

    Figure 58. Deceleration/Altitude Comparison for Medium, Gliding Entry at Supercircular Speed

    Figure 59. Comparison of Data for Medium, Gliding Entry at Supercircular Speed

  • 74

    Due to the fact that the first-order solution for flight-path angle becomes

    imaginary when the quantity in brackets on the right side of Equation (88) goes below

    zero, the comparison could only be plotted to an altitude of 21.3 km. Below this altitude

    the first-order solutions for flight-path angle, relative velocity, and acceleration became

    complex numbers and were no longer valid for comparison purposes. Up to the point

    where the analytic solution fell apart, the MATLAB program agreed closely with the

    first-order approximations, further solidifying the fact that the program is operating

    properly.

  • 75

    VI. Conclusion and Recommendations

    Conclusion For this research an algorithm was developed using MATLAB to model a

    trajectory for a vehicle entering the Earths atmosphere. The algorithm used the

    equations of motion developed in Chapter II and established the initial conditions using

    the methods shown in Chapter III to establish the simulation. The program was then

    compared to previously established software that were also designed to predict entry

    trajectories. It was also compared to first-order approximations for specific types of

    reentry. The program code is listed in the Appendix.

    The MATLAB code generated fulfills the goal of this research of creating a

    program to quickly generate atmospheric entry simulations. It compares very favorably

    with TARGET, a FORTRAN program with similar objectives, and IMPULSE, another

    MATLAB program focused on simulating ICBMs. In both cases, the methods used in

    Chapter III to establish the initial conditions yielded perfect results, confirming that the

    equations used were valid and coded correctly.

    Comparison with the first-order approximations further solidified the validity of

    the MATLAB algorithm. The MATLAB program routinely produced results that closely

    matched the first-order solutions over those portions of the trajectory one would expect

    the analytic approximations to maintain accuracy.

    Although the model used in this research is not all encompassing, it provides the

    capability to produce reliable results for systems-level studies. The program was

    intended to be simple and quick for initial analysis and to utilize MATLAB due to the

  • 76

    languages emerging widespread employment. The algorithm is not intended to be a

    replacement for more comprehensive routines that already exist, such as POST.

    Recommendations for Future Work

    The MATLAB routine developed in this research lends itself to future

    development. There are several areas of the algorithm outside the scope of this research

    that could be improved. The software is quite adaptable and implementing future

    adaptations should not be too difficult.

    This research used a simple exponential model as an adequate approximation of

    the Earths atmosphere. Improvement could be made by more completely modeling the

    atmosphere as several layers, each with a different scale height.

    For simplification, this research made the assumption that LC and DC are

    constant throughout the atmospheric entry. In reality, both coefficients are functions of

    angle of attack and velocity. An algorithm could be implemented to allow changes in

    angle of attack at given altitudes or velocities and to calculate the corresponding

    coefficients of lift and drag.

    Just as angle of attack was held constant, the bank angle ( ) was also assumed to be constant during entry. By allowing variations in and angle of attack, a future development of the software would be able to simulate various trajectories that use lift to

    maneuver the vehicle during reentry.

    This research also assumed that the reentry vehicle had no propulsion system.

    The equations of motion as shown by Hicks (2006:58) account for a thrust component.

    These equations could be substituted for the ones shown in Chapter II and adapted to

  • 77

    simulate a vehicle that uses thrust or a combination of thrust and lift to maneuver during

    reentry.

    Finally, future research may be interested in the amount of aerodynamic heating

    expected during reentry. Vinh (1980:141-156) shows how heating rates vary with

    velocity and atmospheric density. These analytic solutions could be added to the existing

    code to generate the heating information for the entire trajectory.

    In all of these cases, the MATLAB program generated in this research would be

    the core program. The routine would maintain the ability to generate quick and simple

    results with a reasonably high degree of accuracy for high-level studies.

  • 78

    Appendix: MATLAB Code

    Core Code

    This is the MATLAB core code for simulating entry trajectories (reentry.m). It

    uses the algorithms developed in this research. The codes for operating the graphical

    user interfaces (inputs.m, vpoint.m, eci.m and orb.m) and the ordinary differential

    equation solvers (spherical.m, ellipsoid.m) are listed following the core code.

    % Capt Robert Jameson % AFIT/GSS/ENY/06-08 % 14 January 2006 % This program simulates the reentry trajectory of a vehicle with perfect % knowledge of the vehicle parameters and the initial conditions for the % equations of motion. clc % Clear acceleration data clear 'A' % Surface density of atmosphere in kg/m^3 at STP (assumption) rhos=1.54793; % Average scale height in meters (assumption) H=6935; % Calculate inverse of scale height (beta) beta=1/H; % Radius of the Earth at the equator in meters (WGS-84 value) re=6378137; % Radius of the Earth at the poles in meters (WGS-84 value) rp=6356752.3142; % This equation calculates the eccentricity of the Earth's atmosphere (ee) ee=1-rp/re; % WGS-84 acceleration due to gravity at the radius of equator (m/s^2)

  • 79

    g0=9.798; % WGS-84 rotation rate of Earth (rad/s) omegae=.000072921151467; % Create initial user inputs if none exist if ~exist('user_inputs') % Run GUI (inputs.m) to get user inputs for the shape of the Earth's % atmosphere and the desired coordinate system inputs uiwait(inputs) % Save values for coordinate system (1=vehicle pointing, 2=ECI, % 3=classic orbital elements) and shape of atmosphere (1=spherical, % 2=ellipsoid) into .mat files load('var') load('shape') % If the vehicle pointing system is selected, run GUI for user inputs for % vehicle parameters and initial conditions (vpoint.m) if var==1 vpoint uiwait(vpoint) % Save values for vehicle parameters (m=mass, Cl=coefficient of lift, % Cd=coefficient of drag, S=reference surface area) and initial % conditions (ri=radius, gammar=relative flight-path angle, % vr=relative velocity, thetai=longitude, phii=geocentric latitude, % psir=relative heading, sigma=bank angle) into .mat files load('m') load('Cl') load('Cd') load('S') load('ri') load('gammar') load('vr') load('thetai') load('phii') load('psir') load('sigma') end % If the ECI system is selected, run GUI for user inputs for % vehicle parameters and initial conditions (eci.m) if var==2

  • 80

    eci uiwait(eci) % Save values for vehicle parameters (m=mass, Cl=coefficient of lift, % Cd=coefficient of drag, S=reference surface area) and initial % conditions (x,y,z=inertial position, vx,vy,vz=inerial velocity, % sigma=bank angle, hour,min,sec=Sidereal time) into .mat files load('m') load('Cl') load('Cd') load('S') load('x') load('y') load('z') load('vx') load('vy') load('vz') load('sigma') load('hour') load('min') load('sec') end % If the classic orbital elements are selected, run GUI for user inputs for % vehicle parameters and initial conditions (orb.m) if var==3 orb uiwait(orb) % Save values for vehicle parameters (m=mass, Cl=coefficient of lift, % Cd=coefficient of drag, S=reference surface area) and initial % conditions (ri=radius, gammar=relative flight-path angle, % vr=relative velocity, thetai=longitude, phii=geocentric latitude, % psir=relative heading, sigma=bank angle) into .mat files load('m') load('Cl') load('Cd') load('S') load('ri') load('gammar') load('vr') load('thetai') load('phii') load('psir') load('sigma') end

  • 81

    % If the ECI system is selected, run GUI for user inputs for % vehicle parameters and initial conditions (eci.m) if var==2 eci uiwait(eci) % Save values for vehicle parameters (m=mass, Cl=coefficient of lift, % Cd=coefficient of drag, S=reference surface area) and initial % conditions (x,y,z=inertial position, vx,vy,vz=inerial velocity, % sigma=bank angle, hour,min,sec=Sidereal time) into .mat files load('m') load('Cl') load('Cd') load('S') load('x') load('y') load('z') load('vx') load('vy') load('vz') load('sigma') load('hour') load('min') load('sec') end % If the classic orbital elements are selected, run GUI for user inputs for % vehicle parameters and initial conditions (orb.m) if var==3 orb uiwait(orb) % Save values for vehicle parameters (m=mass, Cl=coefficient of lift, % Cd=coefficient of drag, S=reference surface area) and initial % conditions (a=semi-major axis, nu=true anomaly, inc=inclination, % e=eccentricity, omega=argument of perigee, node=right ascension of % ascending node, sigma=bank angle, hour,min,sec=Sidereal time) into .mat % files load('m') load('Cl') load('Cd') load('S') load('a') load('nu') load('inc')

  • 82

    load('e') load('omega') load('node') load('sigma') load('hour') load('min') load('sec') end % set up user_inputs and parameters matrix if vehicle pointing system % selected if var==1 user_inputs=[S;Cl;Cd;m;vr;gammar;sigma;thetai;phii;ri;psir]; parameters={'Surface Area';'Cl';'Cd';'Mass';'Entry Velocity';... 'Initial Flight-Path Angle';... 'Bank Angle';'Longitude';'Latitude';'Initial Radius';'Heading'}; % Display user_inputs and parameters in array editor for user reference % and modification openvar('parameters'); openvar('user_inputs'); end % set up user_inputs and parameters matrix if ECI system selected if var==2 user_inputs=[S;Cl;Cd;m;x;y;z;vx;vy;vz;sigma;hour;min;sec]; parameters={'Surface Area';'Cl';'Cd';'Mass';'X';'Y';... 'Z';'X dot';'Y dot';'Z dot';'Bank Angle';'Hour';'Minute';'Second'}; % Display user_inputs and parameters in array editor for user reference % and modification openvar('parameters'); openvar('user_inputs'); end % set up user_inputs and parameters matrix if classic orbital elements % selected if var==3 user_inputs=[S;Cl;Cd;m;a;e;inc;node;omega;nu;sigma;hour;min;sec]; parameters={'Surface Area';'Cl';'Cd';'Mass';'Semi-Major Axis';'Eccentricity';...

  • 83

    'Inclination';'Node';'Perigee';'True Aanomaly';'Bank Angle';'Hour';'Minute';'Second'};

    % Display user_inputs and parameters in array editor for user reference % and modification openvar('parameters'); openvar('user_inputs'); end end % Allow editing of user_inputs in display editor if var==1 S=user_inputs(1); Cl=user_inputs(2); Cd=user_inputs(3); m=user_inputs(4); vr=user_inputs(5); gammar=user_inputs(6); sigma=user_inputs(7); thetai=user_inputs(8); phii=user_inputs(9); ri=user_inputs(10); psir=user_inputs(11); end if var==2 % Allow editing of user_inputs in display editor S=user_inputs(1); Cl=user_inputs(2); Cd=user_inputs(3); m=user_inputs(4); x=user_inputs(5); y=user_inputs(6); z=user_inputs(7); vx=user_inputs(8); vy=user_inputs(9); vz=user_inputs(10); sigma=user_inputs(11); hour=user_inputs(12); min=user_inputs(13); sec=user_inputs(14);

  • 84

    % Develop initial conditions when ECI system is selected % Calculate initial radius from inertial position (ri) ri=(x^2+y^2+z^2)^.5; % Calculate magnitude of inertial velocity (vi) vi=(vx^2+vy^2+vz^2)^.5; % Generate vectors for inertial position and velocity Rxyz=[x;y;z]; Vxyz=[vx;vy;vz]; % Calculate angular momentum vector (H) H=cross(Rxyz,Vxyz); % Calculate magnitude of angular momentum (h) h=(H(1)^2+H(2)^2+H(3)^2)^.5; % Calculate the inertial flight-path angle (gammai) and find the % correct sign. if dot(Rxyz,Vxyz)>0 gammai=acos(h/(ri*vi)); else gammai=-acos(h/(ri*vi)); end % Calculate the geocentric latitude (phii) phii=asin(z/ri); % Calculate the longitude assuming t=0 (theta) theta=asin(y/(x^2+y^2)^.5); % Correct longitude for sign ambiguity if x

  • 85

    % Calculate the inclination of the orbit (inc) inc=acos(H(3)/h); end % Develop initial conditions when orbital elements are selected if var==3 % Allow editing of user_inputs in display editor S=user_inputs(1); Cl=user_inputs(2); Cd=user_inputs(3); m=user_inputs(4); a=user_inputs(5); e=user_inputs(6); inc=user_inputs(7); node=user_inputs(8); omega=user_inputs(9); nu=user_inputs(10); sigma=user_inputs(11); hour=user_inputs(12); min=user_inputs(13); sec=user_inputs(14); % Earth's gravitational parameter (m^3/s^2) mu=3.98601*10^14; % Calculate the semi-latus rectum of the orbit p=a*(1-e^2); % Calculate radius (ri) ri=a*(1-e^2)/(1+e*cos(nu)); % Calculate P-component of velocity (vp) in the perifocal coordinate system vp=(mu/p)^.5*(-sin(nu)); % Calculate Q-component of velocity (vq) in perifocal system vq=(mu/p)^.5*(e+cos(nu)); % Establish velocity vector in perifocal system V=[vp;vq]; % Establish radius vector in perifocal system R=[ri*cos(nu);ri*sin(nu)];

  • 86

    % Calculate position in ECI system from perifocal system x=R(1)*(cos(node)*cos(omega)-sin(node)*sin(omega)*cos(inc))+R(2)*... (-cos(node)*sin(omega)-sin(node)*cos(omega)*cos(inc)); y=R(1)*(sin(node)*cos(omega)+cos(node)*sin(omega)*cos(inc))+R(2)*... (-sin(node)*sin(omega)+cos(node)*cos(omega)*cos(inc)); z=R(1)*(sin(omega)*sin(inc))+R(2)*(cos(omega)*sin(inc)); % Calculate velocity in ECI system from perifocal system vx=V(1)*(cos(node)*cos(omega)-sin(node)*sin(omega)*cos(inc))+V(2)*... (-cos(node)*sin(omega)-sin(node)*cos(omega)*cos(inc)); vy=V(1)*(sin(node)*cos(omega)+cos(node)*sin(omega)*cos(inc))+V(2)*... (-sin(node)*sin(omega)+cos(node)*cos(omega)*cos(inc)); vz=V(1)*(sin(omega)*sin(inc))+V(2)*(cos(omega)*sin(inc)); vi=(vx^2+vy^2+vz^2)^.5; % Establish radius and velocity vectors in ECI system Rxyz=[x;y;z]; Vxyz=[vx;vy;vz]; % Calculate angular momentum vector H=cross(Rxyz,Vxyz); % Calculate magnitude of angular momentum h=(H(1)^2+H(2)^2+H(3)^2)^.5; % Calculate inertial flight-path angle (gammai) and correct for sign % ambiguity. if nu>pi gammai=-acos(h/(ri*vi)); else gammai=acos(h/(ri*vi)); end % Calculate geocentric latitude phii=asin(z/ri); % Calculate the longitude assuming t=0 (theta) theta=asin(y/(x^2+y^2)^.5); % Correct for ambiguity of theta if x

  • 87

    theta=pi-theta; end % Correct longitude for Greenwich sidereal time (thetai) thetai=theta-(user_inputs(12,1)*3600+user_inputs(13,1)*60+... user_inputs(14,1))*omegae; % Ensure the magnitude of thetai is not greater than 2pi if thetai1 % Calculate the local horizontal component (vh) of the inertial velocity vh=vi*cos(gammai); % Calculate the local velocity of the Earth's rotation (ve) ve=ri*omegae*cos(phii); % Find the right ascension of the ascending node (node) when the ECI % system is selected if var==2 kH=cross([0;0;1],H); N=kH/((kH(1)^2+kH(2)^2+kH(3)^2)^.5); node=acos(N(1)); % Correct for sign ambiguity of right ascension of ascending node if N(2)

  • 88

    % Calulate the value c from law of cosines (c is used for simplification % in the calculation of relative heading) c=(ve^2+vh^2-2*ve*vh*cos(psii))^.5;


Recommended