Return-path: X-Andrew-Authenticated-as: 7997;andrew.cmu.edu;Ted Anderson Received: from beak.andrew.cmu.edu via trymail for +dist+/afs/andrew.cmu.edu/usr1/ota/space/space.dl@andrew.cmu.edu (->+dist+/afs/andrew.cmu.edu/usr1/ota/space/space.dl) (->ota+space.digests) ID ; Sun, 8 Oct 89 04:24:44 -0400 (EDT) Message-ID: Reply-To: space+@Andrew.CMU.EDU From: space-request+@Andrew.CMU.EDU To: space+@Andrew.CMU.EDU Date: Sun, 8 Oct 89 04:24:11 -0400 (EDT) Subject: SPACE Digest V10 #123 SPACE Digest Volume 10 : Issue 123 Today's Topics: C routines for orbital prediction, and a query Re: X-30, Space Station Strangles NASP Meteorites (was: Re: What to do with the $30 billion) ---------------------------------------------------------------------- Date: 4 Oct 89 12:35:46 GMT From: ecsvax.uncecs.edu!dukeac!tcamp@mcnc.org (Ted A. Campbell) Subject: C routines for orbital prediction, and a query [My apologies if this appears twice on your system, but I'm reasonably sure that the first time I posted it, it didn't make it out. t.c.] Some readers of sci.astro and sci.space may have seen the Space Flight Simulator, version 0.02, which was posted to comp.binaries.ibm.pc. If I ever make up my mind just how to do it, I may release the source code for the whole thing. In the meantime, I'm going to post the following subroutines to sci.astro and sci.space for two reasons (a) someone might actually find them useful, and (b) someone might want to advise me on a technical point that is apparently beyond the abilities of this bear-of-very-little-brain. The following code contains three critical subroutines (in C). or_init() sets up orbital parameters based on an apoapsis and periapsis (in kilometers). It presumes that the following globals have already been set: (double) fo_mass the mass of the orbital focus in grams (earth = 5.98e27) (double) fo_radius the radius of the orbital focus in kilometers (double) fo_siday the sidereal period of the orbital focus in seconds The include file "sfsm.h" defines a structure for orbits, the elements of which should be obvious. sfs_orbits[ n ] is an array of pointers to orbit structures, so that sfs_orbits[ 0 ]->period would give the orbital period in seconds for orbit 0, etc. The subroutine or_ssp() calculates the subsatellite point for an orbit, given the time (in seconds). It also calculates the current altitude. It, in turn, calls or_kep(), which solves Kepler's equation. These routines may be useful for anyone wanting to build C applications with orbital calculations. The subroutines are based on pseudocode given in Martin Davidoff's Satellite Experimenters Handbook (published by ARRL for Radio Amateurs using the OSCAR and other Amateur satellites), but the C implementation is my own. PROBLEM: These routines seem to work well enough for orbits with inclinations near 0 and near 180 degrees (by the way -- all angles in these routines are in radians). But for orbits with inclinations near 90 degrees, there is a grotesque skewing that occurs (at the highest/lowest points in the orbit). As of yet, I haven't been able to figure what causes this skewing. Of course, it's possible that the algorithms are correct, and that the skewing occurs in other routines that manipulate their output in various ways. On the other hand, the skewing occurs so frequently that I suspect the culprit is here somewhere. email: tcamp@dukeac.ac.duke.edu /**************************************************************** SFS_OR.C Orbital calculation routines for SFS Copyright (c) 1989, Ted A. Campbell ****************************************************************/ #include "math.h" #include "time.h" #include "vdi.h" #include "sfsm.h" extern double or_lfix(); /**************************************************************** or_init() Set up an orbit ****************************************************************/ or_init( orbit, ap, aa ) int orbit; double aa, ap; { /*** Calculate semimajor axis */ sfs_orbits[ orbit ]->semimajor = ( aa + ap + ( 2 * fo_radius )) / 2; /*** Calculate orbital center - focus distance */ sfs_orbits[ orbit ]->dist = sfs_orbits[ orbit ]->semimajor - ( fo_radius + ap ); /*** Calculate semiminor axis */ sfs_orbits[ orbit ]->semiminor = sqrt( (double) ( sfs_orbits[ orbit ]->semimajor * sfs_orbits[ orbit ]->semimajor ) - (double) ( sfs_orbits[ orbit ]->dist * sfs_orbits[ orbit ]->dist )); /*** Calculate orbital eccentricity */ sfs_orbits[ orbit ]->eccentricity = sqrt( 1.0 - (( sfs_orbits[ orbit ]->semiminor / (double) sfs_orbits[ orbit ]->semimajor ) * ( sfs_orbits[ orbit ]->semiminor / (double) sfs_orbits[ orbit ]->semimajor )) ); /*** Calculate orbital period */ sfs_orbits[ orbit ]->period = sqrt ( ( ( 4.0 * ( PI * (double) PI ) ) / ( UGC * fo_mass ) ) * ( sfs_orbits[ orbit ]->semimajor * sfs_orbits[ orbit ]->semimajor * sfs_orbits[ orbit ]->semimajor ) ); /*** Calculate the increment factor of longitude of the ascending node. This factor must be multiplied by a time factor (orbital period or time into orbit, in seconds. See Davidoff, pp. 8-9 and 8-10, and formula 8.14. */ if ( fo_siday == 0.0 ) { sfs_orbits[ orbit ]->lif = 0; } else { sfs_orbits[ orbit ]->lif = (2 * PI) / (double) fo_siday; } } /**************************************************************** or_kep() Solve Kepler's equation Globals utilized: sfs_orbits[ orbit ]->eccentricity Eccentricity of the orbital ellipse sfs_orbits[ orbit ]->semimajor Semimajor axis of the orbital ellipse (km) sfs_orbits[ orbit ]->period Orbital period (seconds) Inputs: t Time from periapsis in seconds ( 0 < t < sfs_orbits[ orbit ]->period ) Output: theta Angle between periapsis, geocenter, and current position (theta). r Distance from satellite to focal center, in kilometers ****************************************************************/ or_kep( orbit, t, theta, r ) int orbit; long t; double *theta; long *r; { double z, z3, E; z = 2.0 * PI * ( (double) t / (double) sfs_orbits[ orbit ]->period ); E = z; do { z3 = ( E - ( sfs_orbits[ orbit ]->eccentricity * sin( E )) - z ) / ( 1 - ( sfs_orbits[ orbit ]->eccentricity * cos( E ))); E = E - z3; } while ( fabs( z3 ) > 0.000000001 ); *theta = PI; if ( E != PI ) { *theta = 2.0 * atan( sqrt( ( 1 - sfs_orbits[ orbit ]->eccentricity ) / ( 1 + sfs_orbits[ orbit ]->eccentricity )) * tan( E / 2.0 )); if ( E > PI ) { *theta = ( (double) 2.0 * PI ) + *theta; } } *r = sfs_orbits[ orbit ]->semimajor * ( 1 - sfs_orbits[ orbit ]->eccentricity * sfs_orbits[ orbit ]->eccentricity ) / ( 1 + sfs_orbits[ orbit ]->eccentricity * cos( *theta )); return 1; } /**************************************************************** or_ssp() Calculate Subsatellite Point This function utilizes available data on the satellite to return the subsatellite point, that is, the point on the surface of the orbital focus directly under the satellite at a given moment. ****************************************************************/ or_ssp( orbit, t, latitude, longitude, r, n ) int orbit; long t, *r, *n; double *longitude, *latitude; { static long _r, tp; static double theta; double n1, n2, n4, E, lan; long t1; *n = t / sfs_orbits[ orbit ]->period; /* return number of current orbit */ t1 = t - ( sfs_orbits[ orbit ]->period * ( *n ) ); /* get seconds into this orbit */ if ( t1 == 0 ) { t1 = 1; } or_kep( orbit, t1, &theta, &_r ); *r = _r; /*** Calculate the longitude of the ascending node at the beginning of this orbit. See Davidoff, p. 8-9 and 8-10, and equations 8.13a, 8.13b, and 8.14. */ lan = sfs_orbits[ orbit ]->lon_an - ( sfs_orbits[ orbit ]->lif * sfs_orbits[ orbit ]->period * *n ); /*** Calculate the latitude of the SSP. See Davidoff, pp. 8-13 - 8-15, esp. equation 8.20. */ *latitude = asin( sin( sfs_orbits[ orbit ]->inclination ) * sin( theta + sfs_orbits[ orbit ]->arg_per )); if ( ( sfs_orbits[ orbit ]->inclination * RAD_DEG >= 0 ) && ( sfs_orbits[ orbit ]->inclination * RAD_DEG < 90 ) ) { n2 = 1; } else { n2 = 0; } if ( ( ( *latitude ) * RAD_DEG ) < 0.0 ) { n4 = 1; } else { n4 = 0; } if ( ( sfs_orbits[ orbit ]->arg_per * RAD_DEG > 180 ) && ( sfs_orbits[ orbit ]->arg_per * RAD_DEG <= 540 ) ) { n1 = 1; } else { n1 = 0; } E = 2 * atan( (double) pow( ( 1 - sfs_orbits[ orbit ]->eccentricity ) / ( 1 + sfs_orbits[ orbit ]->eccentricity ), (double) 0.5 ) * tan( sfs_orbits[ orbit ]->arg_per / 2.0 )) + ( 2.0 * PI * n1); tp = ( sfs_orbits[ orbit ]->period / ( 2.0 * PI ) ) * ( E - sin( E ) ); *longitude = or_lfix( lan - pow( (double) -1.0, n2 + n4 ) * acos( cos( theta + sfs_orbits[ orbit ]->arg_per ) / cos( *latitude ) ) - sfs_orbits[ orbit ]->lif * (double) t1 - sfs_orbits[ orbit ]->lif * (double) tp ); } double or_lfix( l ) double l; { double l1; l1 = l; while ( l1 < ( 0 - PI ) ) { l1 += ( 2.0 * PI ); } while ( l1 > PI ) { l1 -= ( 2.0 * PI ); } return l1; } ------------------------------ Date: 5 Oct 89 22:23:37 GMT From: sumax!quick!srg@beaver.cs.washington.edu (Spencer Garrett) Subject: Re: X-30, Space Station Strangles NASP In article , shafer@elxsi.dfrf.nasa.gov (Mary Shafer) writes: -> -> The shuttle comes in from the north to north east. It comes "feet -> dry" at about Mach 7 and 145K ft, it's overhead at Edwards at Mach 1 -> at about 40K ft. It does a HAC (Heading Alignment Circle) to put it -> on the runway heading (usually 17 or 22), so essentially the pattern -> is about a 270 teardrop with a longish final. I think it's a 20 deg -> glidepath, with a fairly short flair. Final is flown at 285 KEAS, -> gear deployed at 275 KEAS, touchdown at 185 KEAS. (I'm taking these -> figures from Young and Crippen's 1981 SETP paper on STS-1, so the -> speeds may not be exact for any given mission, but they're about -> right.) Um, I believe that should be *towards* N-NE. Equatorial orbits are done in the same direction as the Earth's rotation, so they come in from the W-SW. (It costs an extra 2000 mph in acceleration to go the other way.) Flights employing polar orbits could come in from either N or S, but I don't think any have yet been made in a Shuttle. (And may never - I think they need the pad at Vandenburg for polar launches, and I think that's been officially abandoned.) Of course, after that 270 teardrop I believe they do land towards the S-SW, (ie - from N-NE) so maybe that's what you were talking about. The Shuttle uses *two* glidepaths on final. They fly most of the approach on a 17 degree (as I recall) glideslope, then make an abrupt pitch up to the normal 3 degree glideslope. It looks like the two intersect right off the end of the runway (where "right off" may be a mile or two at these speeds) and they only spend a few seconds (10 or 15?) on the 3 degree slope before starting the flare. Now for the questions! Is "coming feet dry" the same as extending the landing gear? I'm pretty sure I remember seeing the gear pop out *after* the flare, and I can't imagine having to design gear (much less gear doors) that could handle Mach 7! And what's the "E" in KEAS? Surely Edwards doesn't have its own standard of measurement! :-} ------------------------------ Date: Thu, 5 Oct 89 10:20:13 PDT From: Peter Scott Subject: Meteorites (was: Re: What to do with the $30 billion) jarvis.csri.toronto.edu!utgpu!utzoo!henry@rutgers.edu (Henry Spencer) writes: >In article <2153@hydra.gatech.EDU> ccsupos@prism.gatech.EDU (SCHREIBER, O. A.) writes: >>What is the story about the meteorites findings in Antartica? ... > >Well, meteorites fall on Antarctica as they do anywhere else. Unsurprisingly, >most of the ones that fall there end up imbedded in ice. Ice flows, slowly. >Most of it eventually ends up melting into the ocean, which is not very >useful. However, there are a few areas in Antarctica which are "sinks" >for ice, where flowing ice runs up against rock, is pushed upward, and gets >steadily eroded by wind. Anything tough imbedded in that ice ends up sitting >on the surface. The result is that meteorites collect on the surface there. Ditto in the Arctic, apparently. One of the largest meteorites ever recovered (now on display in the New York Museum of Natural History) was discovered by a polar explorer wondering where the Eskimo were getting metal from. They described a rock that they were chipping it off. It took two expeditions to finally get the meteorite (about the size of a VW) and several people-sized companions to the U.S. Presumably they compensated the Eskimo with a set of Ginsu steak knives... :-) Peter Scott (pjs@grouch.jpl.nasa.gov) ------------------------------ End of SPACE Digest V10 #123 *******************