CodeWalrus

Development => Calculators => Calc Projects, Programming & Tutorials => Topic started by: SopaXorzTaker on March 17, 2017, 06:19:23 PM

Title: [84+ce] Orbit84
Post by: SopaXorzTaker on March 17, 2017, 06:19:23 PM
Hey guys!
I've been developing the program for two weeks now, and it's really exciting.
Orbit84 allows you to see where the satellites are in real time!
This program still has some little bugs, so please report them if you find any.

(https://img.ourl.ca/screenshot2-1.png)

This program will display the orbit of any satellite on a beautiful Earth map borrowed from NASA ;).
I am pretty lazy to group the files together using the buggy TiLP beta, so I am including the program itself and the .8ca image file which you need to install if you want the map background.

The program uses the old SGP algorithm from the Department of Defense. TI-BASIC is pretty slow, and I was lazy to read through 400 lines of Fortran to implement a better one (SGP4) instead, which would be even slower.

Known bugs: the first step after starting the program displays invalid values.

To use the program, you'll need a set of Two-Line Elements, which is an ancient format still used for describing satellite orbit.
This data can be obtained from https://celestrak.com/NORAD/elements/.
The text files on the page above contain the data, which consists of three-line groups, for example:

ISS (ZARYA)             
1 25544U 98067A   17075.95152778  .00001773  00000-0  33947-4 0  9992
2 25544  51.6434 138.0748 0007006 301.6640  60.9310 15.54215659 47417


Upload the both files attached to your calculator and run prgmORBIT.
It'll ask you to enter the data, enter the last two lines (starting with 1 and 2, without the first name line) exactly as you see them, preserving the number of spaces between the digits. Press [enter] between each of the lines. If the program tells you that the length is incorrect, you might have missed a symbol, and have to retype the last line you entered again.
Then, enter your latitude and longitude, also you can safely set the Altitude parameter to zero.

Now, the program should be displaying the orbit of the satellite in real-time, with a ground track plot.
The two lines at the top left side of the graph screen show the azimuth and elevation of the satellite. When the elevation line is green, the satellite is visible (above you).

Of course, you must set the calculator's clock to UTC time and date first, as that is assumed in the calculations.
When running the program after it has been first run, you'll be asked if you want to update the TLE data. You can answer "No" if you want to keep the existing data. Keep in mind that you should update the TLE every week so that the data stays valid.


I'd be glad to hear your ideas for improvement of the program!  :)
Title: Re: Orbit84
Post by: Dream of Omnimaga on March 18, 2017, 05:00:20 PM
Would there be a way to make it so that the amount of spaces between each number doesn't matter, or do the number of spaces inside the data actually matters? Because it can be very hard to manually copy such long data by hand from a website that doesn't use monospaced fonts without forgetting one space or adding an extra one by accident.

Another idea I have would be string support as an option to choose at the start of the program. The user would copy/paste the data in SourceCoder or the original TI-Connect which used to have a string/list/matrix editor, save as string then transfer the string to his calculator or an emulator, which would probably take less time than manually typing everything.
Title: Re: Orbit84
Post by: SopaXorzTaker on March 18, 2017, 05:06:19 PM
Quote from: DJ Omnimaga on March 18, 2017, 05:00:20 PM
Would there be a way to make it so that the amount of spaces between each number doesn't matter, or do the number of spaces inside the data actually matters? Because it can be very hard to manually copy such long data by hand from a website that doesn't use monospaced fonts without forgetting one space or adding an extra one by accident.

Another idea I have would be string support as an option to choose at the start of the program. The user would copy/paste the data in SourceCoder or the original TI-Connect which used to have a string/list/matrix editor, save as string then transfer the string to his calculator or an emulator, which would probably take less time than manually typing everything.

Well, the number of spaces is a quirk of the format and must be preserved, because, uh... hm, yes it's very important (I'm just lazy to parse it :)).
However, it's very easy to make the program read the existing string variables, and I'll probably consider doing that, thanks for the tip.
Did you try it, though?
Title: Re: Orbit84
Post by: Dream of Omnimaga on March 20, 2017, 04:33:55 PM
Yeah I spent 5 minutes trying to type the first line in and got an error due to a typo. So I gave up afterwards because it took way too long to enter manually
Title: Re: [84+ce] Orbit84
Post by: p2 on March 23, 2017, 10:08:20 AM
will you later implement a zoom function so we can actually see over which cities they are? :)
Also can you select a satelite and get some information like it's name, purpose and nationality? :)
Those features would be really nice.


awesome project idea  :thumbsup:
Title: Re: Orbit84
Post by: SopaXorzTaker on April 15, 2017, 01:48:25 PM
Quote from: p2 on March 23, 2017, 10:08:20 AM
will you later implement a zoom function so we can actually see over which cities they are? :)
Also can you select a satelite and get some information like it's name, purpose and nationality? :)
Those features would be really nice.


awesome project idea  :thumbsup:

Well, implementing zoom-in would be pretty hard, as I just use the image as graph background.
Currently, the program supports tracking only one satellite, but I might consider adding the ability to use multiple data sets ^_^
Title: Re: Orbit84
Post by: Dream of Omnimaga on April 15, 2017, 10:31:15 PM
You could also use 4 pics with the map zoomed in, but this would make the program 88 KB larger
Title: Re: [84+ce] Orbit84
Post by: SopaXorzTaker on May 01, 2017, 09:01:47 AM
Oh, also: zooming in wouldn't make much sense as the satellite position data is not *that* accurate, and has some deviation from the real satellite, which is a limitation of the algorithm. So that's not that useful anyway.
Title: Re: Orbit84
Post by: Dream of Omnimaga on May 01, 2017, 04:01:41 PM
Ah I see. How accurate is it?