|
Last updated: 20 April 2008 |
Subject: PocketPC TLE to Autostar
Sent: Saturday, April 19, 2008 14:58:04
From: John Farrant (johnfarrant@gmail.com)
Another program for the PocketPC that reads 2=line TLE satellite data
and displays it for easy entry into the Autostar. Hope it's of some use.
Kind regards,
John
2-line TLE Data below, ISS as example, should be copied to SD Card as "tledata.txt"
1 25544U 98067A 08110.15589395 .00017509 00000-0 10635-3 0 3337
2 25544 051.6409 320.6231 0001732 018.2917 081.0795 15.77615911539218
int handle,c;
string messa,y,d;
char byte1;
back()
{
fileseek(handle,-1,1);
do
{
byte1=(fileread(handle,1));
}
while (byte1==" ")
fileseek(handle,-1,1);
}
read()
{
messa="";
do
{
byte1=(fileread(handle,1));
messa=messa+byte1;
}
while (byte1!=" ")
}
main()
{
handle = fileopen("SD Card/tledata.txt",0,0x00003002);
showconsole();
read();
putsl(" Autostar Satellite data");
putsl(" (2-line TLE Data in SD Card/tledata.txt)");
putsl("");
back();
read();
back();
read();
back();
read();
y=strleft(messa,2);
y="20"+y;
d=strright(messa,((strlen(messa))-2));
putsl("Epoch Year: "+y);
putsl("Epoch Day: "+d);
back();
read();
back();
read();
back();
read();
back();
read();
back();
read();
back();
read();
back();
read();
putsl("Inclination: "+messa);
back();
read();
putsl("RA Asc. Node: "+messa);
back();
read();
putsl("Eccentricity: 0."+messa);
back();
read();
putsl("Arg. of Perigee: "+messa);
back();
messa="";
c=0;
do
{
byte1=(fileread(handle,1));
messa=messa+byte1;
c++;
}
while (c<8)
putsl("Mean Anomaly: "+messa);
back();
read();
back();
messa="";
c=0;
do
{
byte1=(fileread(handle,1));
messa=messa+byte1;
c++;
}
while (c<8)
putsl("Mean Motion: "+messa);
getc();
fileclose(handle);
quit();
}
Go back to the Autostar Information page.
Go back to the ETX Home Page.