HP Forums
conversion from inertial to flight path coordinates - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: HP Prime Software Library (/forum-15.html)
+--- Thread: conversion from inertial to flight path coordinates (/thread-19250.html)

conversion from inertial to flight path coordinates - cdeaglejr - 12-04-2022 04:26 PM

This program demonstrates how to interact with two different HP PPL subroutines that convert an inertial state vector (position and velocity vectors) to flight path coordinates (east longitude, geocentric declination, flight path angle, azimuth, position magnitude and velocity magnitude).

This source code illustrates user-provided information required for a typical example.

// UTC julian day

jdutc := 2458337.833619444165379;

// eci position vector (kilometers)

reci(1) := -0.586479273288e4;
reci(2) := -0.178173078828e4;
reci(3) := -0.215629990858e4;

// eci velocity vector (kilometers/second)

veci(1) := 0.492973713131;
veci(2) := -0.731828662424e1;
veci(3) := 0.819193017342e1;

The software also includes a subroutine that can be used to convert an Earth-centered-fixed (ECF) position and velocity vector to an Earth-centered-inertial (ECI) position and velocity vectors. Here's the syntax along with a definition of the I/O for this subroutine.

ecf2eci(gast, recf, vecf)

// ecf-to-eci transformation

// input

// gast = greenwich apparent sidereal time (radians)
// (0 <= gast <= 2 pi)
// recf = position vector (kilometers)
// vecf = velocity vector (kilometers/second)

// output

// reci = position vector (kilometers)
// veci = velocity vector (kilometers/second)

The software and documentation for this demonstration program can be downloaded at