Skip to content

Commit 4a954bb

Browse files
author
aedmunds
committedJun 5, 2010
Ci including the linux version of the Pred13t code.
1 parent f60fb27 commit 4a954bb

File tree

5 files changed

+1151
-183
lines changed

5 files changed

+1151
-183
lines changed
 

‎Arduino/libraries/Pred13t/Pred13t.cpp

+150-9
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Pred13t::tle_t co57 = {10144.03510745,//ye, then time
4040
3031, //Sat cat number
4141
8022, // element set number
4242
35761,//reveloution Number at Epoch
43-
"CO-57", "03031J"};//international Designation}
43+
"CO-57", "03031J"};//international Designation
4444

4545
void Pred13t::setElements(tle_t x){
4646
elements = x;
@@ -81,7 +81,7 @@ double Pred13t::FMod2p(double x)
8181

8282
double Pred13t::AcTan(double sinx, double cosx)
8383
{
84-
/* Four-quadrant arctan function */
84+
/* Four-quadrant arctan fun7201.145199ction */
8585

8686
if (cosx==0.0)
8787
{
@@ -175,8 +175,67 @@ void Pred13t::Convert_Sat_State(Pred13t::vector_t *pos, Pred13t::vector_t *vel)
175175
Scale_Vector(xkmper*minday/secday, vel);
176176
}
177177

178+
void Pred13t::printVar(char *name, double var)
179+
{
180+
Serial.print(name);
181+
Serial.print(": ");
182+
Serial.println(var *1000000);
183+
//printDouble(var);
184+
}
185+
186+
void Pred13t::printDouble( double val){
187+
// prints val with number of decimal places determine by precision
188+
// precision is a number from 0 to 6 indicating the desired decimial places
189+
// example: printDouble( 3.1415, 2); // prints 3.14 (two decimal places)
190+
191+
int precision = 7;
192+
Serial.print (int(val)); //prints the int part
193+
if( precision > 0) {
194+
Serial.print("."); // print the decimal point
195+
unsigned long frac;
196+
unsigned long mult = 1;
197+
byte padding = precision -1;
198+
while(precision--)
199+
mult *=10;
200+
201+
if(val >= 0)
202+
frac = (val - int(val)) * mult;
203+
else
204+
frac = (int(val)- val ) * mult;
205+
unsigned long frac1 = frac;
206+
while( frac1 /= 10 )
207+
padding--;
208+
while( padding--)
209+
Serial.print("0");
210+
Serial.println(frac,DEC) ;
211+
212+
}
213+
}
214+
215+
216+
178217
void Pred13t::printTle(Pred13t::tle_t *tle)
179218
{
219+
Serial.print("Epoch: ");
220+
printDouble(tle->epoch);
221+
Serial.print("Drag: ");
222+
printDouble(tle->xndt2o);
223+
Serial.print("Drag2: ");
224+
printDouble(tle->xndd6o);
225+
Serial.print("Bstar: ");
226+
printDouble(tle->bstar);
227+
Serial.print("Inclination: ");
228+
printDouble(tle->xincl);
229+
Serial.print("RA: ");
230+
printDouble(tle->xnodeo);
231+
Serial.print("EO ");
232+
printDouble(tle->eo);
233+
Serial.print("Omega: ");
234+
printDouble(tle->omegao);
235+
Serial.print("Xmo: ");
236+
printDouble(tle->xmo);
237+
Serial.print("Xno: ");
238+
printDouble(tle->xno);
180239
//printf("Epoch: %f\nDrag: %f\nDrag2: %f\nBstar: %f\nInclination: %f\n",
181240
// tle->epoch,tle->xndt2o,tle->xndd6o,tle->bstar,tle->xincl);
182241
//printf("RA: %f\nEO: %f\nOmega: %f\nXmo: %f\nXno: %f\n",
@@ -199,12 +258,15 @@ void Pred13t::select_ephemeris(Pred13t::tle_t *tle)
199258
tle->xincl*=deg2rad;
200259
temp=twopi/minday/minday;
201260
tle->xno=tle->xno*temp*minday;
261+
printVar("xno", tle->xno);
202262
tle->xndt2o*=temp;
203263
tle->xndd6o=tle->xndd6o*temp/minday;
204264
tle->bstar/=ae;
265+
printVar("bstar:", tle->bstar);
205266

206267
/* Period > 225 minutes is deep space */
207268
dd1=(xke/tle->xno);
269+
printVar("dd1", dd1);
208270
dd2=tothrd;
209271
a1=pow(dd1,dd2);
210272
r1=cos(tle->xincl);
@@ -214,6 +276,7 @@ void Pred13t::select_ephemeris(Pred13t::tle_t *tle)
214276
ao=a1*(1.0-del1*(tothrd*.5+del1*(del1*1.654320987654321+1.0)));
215277
delo=temp/(ao*ao);
216278
xnodp=tle->xno/(delo+1.0);
279+
printVar("xnodp",xnodp);
217280

218281
/* Select a deep-space/near-earth ephemeris */
219282

@@ -233,7 +296,9 @@ void Pred13t::SGP4(double tsince, Pred13t::tle_t * tle, Pred13t::vector_t * pos,
233296
/* are vector_t structures returning ECI satellite position and */
234297
/* velocity. Use Convert_Sat_State() to convert to km and km/s. */
235298

236-
static double aodp, aycof, c1, c4, c5, cosio, d2, d3, d4, delmo,
299+
// unsigned int c1;
300+
301+
static double aodp, aycof, c1, c4, c5, cosio, d2, d3, d4, delmo,
237302
omgcof, eta, omgdot, sinio, xnodp, sinmo, t2cof, t3cof, t4cof,
238303
t5cof, x1mth2, x3thm1, x7thm1, xmcof, xmdot, xnodcf, xnodot, xlcof;
239304

@@ -249,7 +314,7 @@ void Pred13t::SGP4(double tsince, Pred13t::tle_t * tle, Pred13t::vector_t * pos,
249314

250315
int i;
251316

252-
//printTle(tle);
317+
printTle(tle);
253318

254319

255320
/* Initialization */
@@ -262,9 +327,14 @@ void Pred13t::SGP4(double tsince, Pred13t::tle_t * tle, Pred13t::vector_t * pos,
262327
/* semimajor axis (aodp) from input elements. */
263328

264329
a1=pow(xke/tle->xno,tothrd);
330+
printVar("a1",a1);
265331
cosio=cos(tle->xincl);
332+
printVar("Tle->xincl",tle->xincl);
266333
theta2=cosio*cosio;
334+
printVar("theta2",theta2);
335+
printVar("cosio",cosio);
267336
x3thm1=3*theta2-1.0;
337+
Serial.println(cos(2.54));
268338
eosq=tle->eo*tle->eo;
269339
betao2=1.0-eosq;
270340
betao=sqrt(betao2);
@@ -273,6 +343,8 @@ void Pred13t::SGP4(double tsince, Pred13t::tle_t * tle, Pred13t::vector_t * pos,
273343
delo=1.5*ck2*x3thm1/(ao*ao*betao*betao2);
274344
xnodp=tle->xno/(1.0+delo);
275345
aodp=ao/(1.0-delo);
346+
347+
printVar("aodp", aodp);
276348

277349
/* For perigee less than 220 kilometers, the "simple" */
278350
/* flag is set and the equations are truncated to linear */
@@ -292,6 +364,8 @@ void Pred13t::SGP4(double tsince, Pred13t::tle_t * tle, Pred13t::vector_t * pos,
292364
s4=s;
293365
qoms24=qoms2t;
294366
perigee=(aodp*(1-tle->eo)-ae)*xkmper;
367+
368+
printVar("perigee", perigee);
295369

296370
if (perigee<156.0)
297371
{
@@ -312,15 +386,33 @@ void Pred13t::SGP4(double tsince, Pred13t::tle_t * tle, Pred13t::vector_t * pos,
312386
psisq=fabs(1-etasq);
313387
coef=qoms24*pow(tsi,4);
314388
coef1=coef/pow(psisq,3.5);
389+
printVar("xnodp", xnodp);
390+
printVar("coef1",coef1);
315391
c2=coef1*xnodp*(aodp*(1+1.5*etasq+eeta*(4+etasq))+0.75*ck2*tsi/psisq*x3thm1*(8+3*etasq*(8+etasq)));
316-
c1=tle->bstar*c2;
392+
//THE LINE ABOVE CONTAINS THE FIRST DETECTED DERAILMENT.
393+
printVar("etasq",etasq);
394+
printVar("eeta",eeta);
395+
printVar("ck2",ck2);
396+
printVar("tsi",tsi);
397+
printVar("psisq",psisq);
398+
printVar("x3thm1",x3thm1);
399+
printVar("NEGATIVE", -4.223);
400+
printVar("c2",c2);
401+
c1=tle->bstar*c2;
402+
printVar("c1",c1);
403+
printVar("BSTAR: ", tle->bstar);
317404
sinio=sin(tle->xincl);
318405
a3ovk2=-xj3/ck2*pow(ae,3);
319406
c3=coef*tsi*a3ovk2*xnodp*ae*sinio/tle->eo;
407+
printVar("c3",c3);
320408
x1mth2=1-theta2;
409+
410+
printVar("x1mth2", x1mth2);
321411

322412
c4=2*xnodp*coef1*aodp*betao2*(eta*(2+0.5*etasq)+tle->eo*(0.5+2*etasq)-2*ck2*tsi/(aodp*psisq)*(-3*x3thm1*(1-2*eeta+etasq*(1.5-0.5*eeta))+0.75*x1mth2*(2*etasq-eeta*(1+etasq))*cos(2*tle->omegao)));
413+
printVar("c4", c4);
323414
c5=2*coef1*aodp*betao2*(1+2.75*(etasq+eeta)+eeta*etasq);
415+
printVar("c5",c5);
324416

325417
theta4=theta2*theta2;
326418
temp1=3*ck2*pinvsq*xnodp;
@@ -335,14 +427,19 @@ void Pred13t::SGP4(double tsince, Pred13t::tle_t * tle, Pred13t::vector_t * pos,
335427
xmcof=-tothrd*coef*tle->bstar*ae/eeta;
336428
xnodcf=3.5*betao2*xhdot1*c1;
337429
t2cof=1.5*c1;
430+
printVar("t2cof", t2cof);
431+
338432
xlcof=0.125*a3ovk2*sinio*(3+5*cosio)/(1+cosio);
339433
aycof=0.25*a3ovk2*sinio;
340434
delmo=pow(1+eta*cos(tle->xmo),3);
341435
sinmo=sin(tle->xmo);
342436
x7thm1=7*theta2-1;
437+
438+
printVar("x7thm1", x7thm1);
343439

344440
if (isFlagClear(SIMPLE_FLAG))
345441
{
442+
Serial.println("YOU ARE RUNNING");
346443
c1sq=c1*c1;
347444
d2=4*aodp*tsi*c1sq;
348445
temp=d2*tsi*c1/3;
@@ -361,10 +458,13 @@ void Pred13t::SGP4(double tsince, Pred13t::tle_t * tle, Pred13t::vector_t * pos,
361458
omega=omgadf;
362459
xmp=xmdf;
363460
tsq=tsince*tsince;
461+
printVar("tsq", tsq);
364462
xnode=xnoddf+xnodcf*tsq;
365463
tempa=1-c1*tsince;
366464
tempe=tle->bstar*c4*tsince;
367465
templ=t2cof*tsq;
466+
printVar("templ", templ);
467+
368468

369469
if (isFlagClear(SIMPLE_FLAG))
370470
{
@@ -471,6 +571,26 @@ void Pred13t::SGP4(double tsince, Pred13t::tle_t * tle, Pred13t::vector_t * pos,
471571
vel->z=rdotk*uz+rfdotk*vz;
472572

473573
//printf("1st Position: (%f,%f,%f,%f)\n", pos->x,pos->y,pos->z,pos->w);
574+
Serial.print("1st Pos: (");
575+
Serial.print(pos->x);
576+
Serial.print(", ");
577+
Serial.print(pos->y);
578+
Serial.print(", ");
579+
Serial.print(pos->z);
580+
Serial.print(", ");
581+
Serial.print(pos->w);
582+
Serial.println(")");
583+
584+
Serial.print("1st Vel: (");
585+
Serial.print(vel->x);
586+
Serial.print(", ");
587+
Serial.print(vel->y);
588+
Serial.print(", ");
589+
Serial.print(vel->z);
590+
Serial.print(", ");
591+
Serial.print(vel->w);
592+
Serial.println(")");
593+
474594
//printf("1st Velocity: (%f,%f,%f,%f)\n)", vel->x,vel->y,vel->z,vel->w);
475595

476596
/* Phase in radians */
@@ -599,15 +719,32 @@ void Pred13t::setTime(double utams)
599719

600720
//usecs = 0.000001*(double)tptr.tv_usec;
601721
//seconds = usecs + (double) tptr.tv_sec;
602-
utams = 1234567890.0;
722+
seconds = 1275395947.0;
603723
}
604724
daynum = seconds/86400.0 - 3651.0;
725+
Serial.print("Daynum: ");
726+
Serial.println(daynum);
605727

606728

607729

608730
}
609731

610732
void Pred13t::calc(Pred13t::tle_t t){
733+
Pred13t::tle_t tle = {10144.03510745,//ye, then time
734+
.00000045,//ndot/2 drag parameter
735+
00000.0,//n double dot/6 Drag Parameter
736+
0.000042, //bstar drag parameter
737+
98.7132,//inclination IN
738+
152.4464, //RA
739+
.000873,//eccentricity EC
740+
245.714100, //WP
741+
114.3119,//mean anomaly MA
742+
14.20500354,//mean motion MM
743+
3031, //Sat cat number
744+
8022, // element set number
745+
35761,//reveloution Number at Epoch
746+
"CO-57", "03031J"};
747+
611748
Pred13t::vector_t zero_vector={0,0,0,0};
612749
Pred13t::vector_t pos = zero_vector;
613750
Pred13t::vector_t vel = zero_vector;
@@ -630,9 +767,13 @@ void Pred13t::calc(Pred13t::tle_t t){
630767
*/
631768
Serial.print("TimeLatLong: ");
632769
Serial.println(jul_utc);
633-
select_ephemeris(&t);
770+
// printTle(&tle);
771+
772+
select_ephemeris(&tle);
773+
Serial.println("After");
774+
// printTle(&tle);
634775

635-
SGP4(t_since, &t, &pos, &vel);
776+
SGP4(t_since, &tle, &pos, &vel);
636777
Convert_Sat_State(&pos, &vel);
637778
Magnitude(&vel);
638779
Calculate_LatLonAlt(jul_utc, &pos, &geo);
@@ -663,4 +804,4 @@ int main(){
663804
//printf("Done");
664805
665806
}
666-
*/
807+
*/

‎Arduino/libraries/Pred13t/Pred13t.h

+7-174
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#define minday 1.44E3 /* Minutes per day */
3939
#define deg2rad 1.745329251994330E-2 /* Degrees to radians */
4040
#define DEEP_SPACE_EPHEM_FLAG 0x000040
41+
#define INTCONST 10000000 /* Multiples doubles by this to save precision */
4142

4243

4344

@@ -108,6 +109,10 @@ class Pred13t {
108109

109110

110111
void setElements(Pred13t::tle_t);
112+
void printVar(char *name, double var);
113+
114+
void printDouble(double val);
115+
111116
int isFlagClear(int flag);
112117
void SetFlag(int flag);
113118
void ClearFlag(int flag);
@@ -132,182 +137,10 @@ class Pred13t {
132137
double Julian_Date_of_Year(double year);
133138
double Julian_Date_of_Epoch(double epoch);
134139

135-
// int getDoppler(unsigned long freq);
136-
// int getDoppler64(unsigned long freq);
137-
138-
//double rx, tx;
139-
// double observer_lon;
140-
// double observer_lat;
141-
// int observer_height;
142-
// unsigned long rxOutLong;
143-
// unsigned long txOutLong;
144-
// unsigned long rxFrequencyLong;
145-
// unsigned long txFrequencyLong;
146-
// float dopplerFactor;
147-
// const static double YM = 365.25; /* Days in a year */
148-
// double EL; /* Elevation */
149-
// double TN; /* */
150-
//
151-
// double E;
152-
// double N;
153-
// double AZ;
154-
// double SLON;
155-
// double SLAT;
156-
// double RR;
157-
//
158-
// double CL;
159-
// double CS;
160-
// double SL;
161-
// double CO;
162-
// double SO;
163-
// double RE;
164-
// double FL;
165-
// double RP;
166-
// double XX;
167-
// double ZZ;
168-
// double D;
169-
// double R;
170-
// double Rx;
171-
// double Ry;
172-
// double Rz;
173-
// double Ex;
174-
// double Ey;
175-
// double Ez;
176-
// double Ny;
177-
// double Nx;
178-
// double Nz;
179-
// double Ox;
180-
// double Oy;
181-
// double Oz;
182-
// double U;
183-
// double Ux;
184-
// double Uy;
185-
// double Uz;
186-
// const static double YT = 365.2421970;
187-
// double WW;
188-
// double WE;
189-
// double W0;
190-
// double VOx;
191-
// double VOy;
192-
// double VOz;
193-
// double DE;
194-
// double GM;
195-
// double J2;
196-
// double N0;
197-
// double A0;
198-
// double b0;
199-
// double SI;
200-
// double CI;
201-
// double PC;
202-
// double QD;
203-
// double WD;
204-
// double DC;
205-
// double YG;
206-
// double G0;
207-
// double MAS0;
208-
// double MASD;
209-
// double INS;
210-
// double CNS;
211-
// double SNS;
212-
// double EQC1;
213-
// double EQC2;
214-
// double TEG;
215-
// double GHAE;
216-
// double MRSE;
217-
// double MASE;
218-
// double ax;
219-
// double ay;
220-
// double az;
221-
// int OLDRN;
222-
//
223-
// double T;
224-
// double DT;
225-
// double KD;
226-
// double KDP;
227-
// double M;
228-
// int DR;
229-
// long RN;
230-
// double EA;
231-
// double C;
232-
// double S;
233-
// double DNOM;
234-
// double A;
235-
// double B;
236-
// double RS;
237-
// double Sx;
238-
// double Sy;
239-
// //double Sz;
240-
// double Vx;
241-
// double Vy;
242-
// double Vz;
243-
// double AP;
244-
// double CWw;
245-
// double SW;
246-
// double RAAN;
247-
// double CQ;
248-
// double SQ;
249-
// double CXx;
250-
// double CXy;
251-
// double CXz;
252-
// double CYx;
253-
// double CYy;
254-
// double CYz;
255-
// double CZx;
256-
// double CZy;
257-
// double CZz;
258-
// double SATx;
259-
// double SATy;
260-
// double SATz;
261-
// double ANTx;
262-
// double ANTy;
263-
// double ANTz;
264-
// double VELx;
265-
// double VELy;
266-
// double VELz;
267-
// double Ax;
268-
// double Ay;
269-
// double Az;
270-
// double Sz;
271-
// //double Vz;
272-
// double GHAA;
273-
//
274-
// double DS;
275-
// double DF;
276-
//
277-
// /* keplerians */
278-
//
279-
// char SAT[20];
280-
// long SATNO;
281-
// double YE;
282-
// double TE;
283-
// double IN;
284-
// double RA;
285-
// double EC;
286-
// double WP;
287-
// double MA;
288-
// double MM;
289-
// double M2;
290-
// long RV;
291-
// double ALON;
292-
// double ALAT;
293-
// double rxOut;
294-
// double txOut;
295-
//
296-
// /* location */
297-
// char LOC[20];
298-
// double LA;
299-
// double LO;
300-
// double HT;
301-
//
302-
// double HR; /* Hours */
303-
// double DN;
304-
140+
305141

306142

307-
308-
309-
private:
310-
void foo();
143+
311144
};
312145
#endif
313146

‎Pred13t Ubuntu/Pred13t.cpp

+665
Large diffs are not rendered by default.

‎Pred13t Ubuntu/Pred13t.h

+310
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,310 @@
1+
/*
2+
* pred13t.h
3+
*
4+
*
5+
* Created by Andrew Edmunds on 10-05-26.
6+
* Copyright 2010 Andrew Edmunds. All rights reserved.
7+
*
8+
*
9+
*/
10+
11+
#include <math.h>
12+
#include <stdio.h>
13+
#include <sys/time.h>
14+
//#include "WProgram.h"
15+
16+
#define xke 7.43669161E-2
17+
#define tothrd 6.6666666666666666E-1 /* 2/3 */
18+
#define ck2 5.413079E-4
19+
#define ae 1.0
20+
#define xkmper 6.378137E3 /* WGS 84 Earth radius km */
21+
#define SIMPLE_FLAG 0x000020
22+
#define twopi 6.28318530717958623 /* 2*Pi */
23+
#define s 1.012229
24+
#define qoms2t 1.880279E-09
25+
#define xj3 -2.53881E-6 /* J3 Harmonic (WGS '72) */
26+
#define ck4 6.209887E-7
27+
#define pio2 1.57079632679489656 /* Pi/2 */
28+
#define x3pio2 4.71238898038468967 /* 3*Pi/2 */
29+
#define pi 3.14159265358979323846 /* Pi */
30+
#define e6a 1.0E-6
31+
#define secday 8.6400E4 /* Seconds per day */
32+
#define omega_E 1.00273790934 /* Earth rotations/siderial day */
33+
#define f 3.35281066474748E-3 /* Flattening factor */
34+
#define SGP4_INITIALIZED_FLAG 0x000002
35+
#define epoch_start 2440587.50000
36+
#define minday 1.44E3 /* Minutes per day */
37+
#define deg2rad 1.745329251994330E-2 /* Degrees to radians */
38+
#define DEEP_SPACE_EPHEM_FLAG 0x000040
39+
40+
41+
42+
43+
44+
45+
46+
47+
int static Flags=0;
48+
double static phase;
49+
double usecs, seconds, daynum, jul_utc, jul_epoch, tsince;
50+
51+
52+
class Pred13t {
53+
public:
54+
55+
typedef struct {
56+
double epoch,//ye, then time
57+
xndt2o,//ndot/2 drag parameter
58+
xndd6o,//n double dot/6 Drag Parameter
59+
bstar, //bstar drag parameter
60+
xincl,//inclination IN
61+
xnodeo, //RA
62+
eo,//eccentricity EC
63+
omegao, //WP
64+
xmo,//mean anomaly MA
65+
xno;//mean motion MM
66+
int catnr, //Sat cat number
67+
elset, // element set number
68+
revnum;//reveloution Number at Epoch
69+
char sat_name[25], idesg[9];//international Designation
70+
}tle_t;
71+
/* Geodetic position structure used by SGP4/SDP4 code. */
72+
73+
typedef struct {
74+
double lat, lon, alt, theta;
75+
} geodetic_t;
76+
typedef struct {
77+
char line1[70];
78+
char line2[70];
79+
char name[25];
80+
long catnum;
81+
long setnum;
82+
char designator[10];
83+
int year;
84+
double refepoch;
85+
double incl;
86+
double raan;
87+
double eccn;
88+
double argper;
89+
double meanan;
90+
double meanmo;
91+
double drag;
92+
double nddot6;
93+
double bstar;
94+
long orbitnum;
95+
}sat;
96+
/* General three-dimensional vector structure used by SGP4/SDP4 code. */
97+
98+
typedef struct {
99+
double x, y, z, w;
100+
} vector_t;
101+
102+
103+
Pred13t::tle_t elements;
104+
// double rad(double deg);
105+
// double deg(double rad);
106+
// double FNatn(double y, double x);
107+
// double FNday(int year, int month, int day);
108+
// double myFNday(int year, int month, int day, int uh, int um, int us);
109+
// double getElement(char *gstr, int gstart, int gstop);
110+
// void readElements(char *satellite);
111+
// void initSat(void);
112+
// void satvec(void);
113+
// void rangevec(void);
114+
// void sunvec(void);
115+
// void calculate(void);
116+
// void footprintOctagon(float *octagon, float SLATin, float SLONin, float REin, float RAin);
117+
// void printdata(void);
118+
// void setFrequency(unsigned long rx_frequency, unsigned long tx_frequency);
119+
// void setLocation(double lon, double lat, int height);
120+
// void setTime(int yearIn, int monthIn, int mDayIn, int hourIn, int minIn, int secIn);
121+
122+
void setElements(Pred13t::tle_t);
123+
int isFlagClear(int flag);
124+
void SetFlag(int flag);
125+
void ClearFlag(int flag);
126+
double FMod2p(double x);
127+
void SGP4(double tsince, Pred13t::tle_t * tle, Pred13t::vector_t * pos, Pred13t::vector_t * vel);
128+
void setTime(double unixTimeAndMicroseconds);
129+
130+
131+
132+
// int getDoppler(unsigned long freq);
133+
// int getDoppler64(unsigned long freq);
134+
135+
//double rx, tx;
136+
// double observer_lon;
137+
// double observer_lat;
138+
// int observer_height;
139+
// unsigned long rxOutLong;
140+
// unsigned long txOutLong;
141+
// unsigned long rxFrequencyLong;
142+
// unsigned long txFrequencyLong;
143+
// float dopplerFactor;
144+
// const static double YM = 365.25; /* Days in a year */
145+
// double EL; /* Elevation */
146+
// double TN; /* */
147+
//
148+
// double E;
149+
// double N;
150+
// double AZ;
151+
// double SLON;
152+
// double SLAT;
153+
// double RR;
154+
//
155+
// double CL;
156+
// double CS;
157+
// double SL;
158+
// double CO;
159+
// double SO;
160+
// double RE;
161+
// double FL;
162+
// double RP;
163+
// double XX;
164+
// double ZZ;
165+
// double D;
166+
// double R;
167+
// double Rx;
168+
// double Ry;
169+
// double Rz;
170+
// double Ex;
171+
// double Ey;
172+
// double Ez;
173+
// double Ny;
174+
// double Nx;
175+
// double Nz;
176+
// double Ox;
177+
// double Oy;
178+
// double Oz;
179+
// double U;
180+
// double Ux;
181+
// double Uy;
182+
// double Uz;
183+
// const static double YT = 365.2421970;
184+
// double WW;
185+
// double WE;
186+
// double W0;
187+
// double VOx;
188+
// double VOy;
189+
// double VOz;
190+
// double DE;
191+
// double GM;
192+
// double J2;
193+
// double N0;
194+
// double A0;
195+
// double b0;
196+
// double SI;
197+
// double CI;
198+
// double PC;
199+
// double QD;
200+
// double WD;
201+
// double DC;
202+
// double YG;
203+
// double G0;
204+
// double MAS0;
205+
// double MASD;
206+
// double INS;
207+
// double CNS;
208+
// double SNS;
209+
// double EQC1;
210+
// double EQC2;
211+
// double TEG;
212+
// double GHAE;
213+
// double MRSE;
214+
// double MASE;
215+
// double ax;
216+
// double ay;
217+
// double az;
218+
// int OLDRN;
219+
//
220+
// double T;
221+
// double DT;
222+
// double KD;
223+
// double KDP;
224+
// double M;
225+
// int DR;
226+
// long RN;
227+
// double EA;
228+
// double C;
229+
// double S;
230+
// double DNOM;
231+
// double A;
232+
// double B;
233+
// double RS;
234+
// double Sx;
235+
// double Sy;
236+
// //double Sz;
237+
// double Vx;
238+
// double Vy;
239+
// double Vz;
240+
// double AP;
241+
// double CWw;
242+
// double SW;
243+
// double RAAN;
244+
// double CQ;
245+
// double SQ;
246+
// double CXx;
247+
// double CXy;
248+
// double CXz;
249+
// double CYx;
250+
// double CYy;
251+
// double CYz;
252+
// double CZx;
253+
// double CZy;
254+
// double CZz;
255+
// double SATx;
256+
// double SATy;
257+
// double SATz;
258+
// double ANTx;
259+
// double ANTy;
260+
// double ANTz;
261+
// double VELx;
262+
// double VELy;
263+
// double VELz;
264+
// double Ax;
265+
// double Ay;
266+
// double Az;
267+
// double Sz;
268+
// //double Vz;
269+
// double GHAA;
270+
//
271+
// double DS;
272+
// double DF;
273+
//
274+
// /* keplerians */
275+
//
276+
// char SAT[20];
277+
// long SATNO;
278+
// double YE;
279+
// double TE;
280+
// double IN;
281+
// double RA;
282+
// double EC;
283+
// double WP;
284+
// double MA;
285+
// double MM;
286+
// double M2;
287+
// long RV;
288+
// double ALON;
289+
// double ALAT;
290+
// double rxOut;
291+
// double txOut;
292+
//
293+
// /* location */
294+
// char LOC[20];
295+
// double LA;
296+
// double LO;
297+
// double HT;
298+
//
299+
// double HR; /* Hours */
300+
// double DN;
301+
302+
303+
304+
305+
306+
private:
307+
void foo();
308+
};
309+
310+

‎Pred13t Ubuntu/makefile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
CC=g++
2+
CFLAGS=-c -Wall -Wno-write-strings
3+
LDFLAGS=
4+
SOURCES=Pred13t.cpp
5+
OBJECTS=$(SOURCES:.cpp=.o)
6+
EXECUTABLE=thirteen
7+
8+
all: $(SOURCES) $(EXECUTABLE)
9+
10+
$(EXECUTABLE): $(OBJECTS)
11+
$(CC) $(LDFLAGS) $(OBJECTS) -o $@
12+
13+
.cpp.o:
14+
$(CC) $(CFLAGS) $< -o $@
15+
16+
clean:
17+
rm -f *.o core
18+
19+
rebuild: clean all

0 commit comments

Comments
 (0)
Please sign in to comment.