Recent

Author Topic: trying to compile old source code (Satellite Tracking Software)  (Read 4182 times)

juanirias

  • Full Member
  • ***
  • Posts: 100
Hello everyone, here are the codes:

https://www.celestrak.com/software/tskelso-sw.php


they are from a propagator SGP4, I have achieved something by deleting a part of the code but I have error 106 (I cannot progress). Maybe can download and compile it. I'm working on linux, I don't think that's it.

"SGP4 Pascal Library Version 2.65" should be used to compile the "TrakStar Version 2.65", which is that it generates the error.

specifically if the "Look angles" & "Right Ascension / Declination" options are selected in the "Output Type" menu, the error 106 on "trakstar.pas" will be generated just after line # 174.

Thanks
« Last Edit: July 12, 2020, 07:22:19 am by juanirias »

sstvmaster

  • Sr. Member
  • ****
  • Posts: 299
Re: trying to compile old source code (Satellite Tracking Software)
« Reply #1 on: July 12, 2020, 02:47:29 pm »
Maybe this is usefull, this is from here: https://www.satsignal.eu/software/wxtrack.htm#SGP4
It is based on Dr T S Kelso's Pascal implementation.

See attachment!
greetings Maik

Windows 10,
- Lazarus 2.2.6 (stable) + fpc 3.2.2 (stable)
- Lazarus 2.2.7 (fixes) + fpc 3.3.1 (main/trunk)

jamie

  • Hero Member
  • *****
  • Posts: 6077
Re: trying to compile old source code (Satellite Tracking Software)
« Reply #2 on: July 12, 2020, 02:55:57 pm »
Hello everyone, here are the codes:

https://www.celestrak.com/software/tskelso-sw.php


they are from a propagator SGP4, I have achieved something by deleting a part of the code but I have error 106 (I cannot progress). Maybe can download and compile it. I'm working on linux, I don't think that's it.

"SGP4 Pascal Library Version 2.65" should be used to compile the "TrakStar Version 2.65", which is that it generates the error.

specifically if the "Look angles" & "Right Ascension / Declination" options are selected in the "Output Type" menu, the error 106 on "trakstar.pas" will be generated just after line # 174.

Thanks

You need to show a few lines of code here of where the error is talking place.

#106 is invalid input..
this could be a lot of things, back format of the file etc..

Being an old program maybe its using the older style PASCAL Io Assign, which has been repurposed for object coding, the correct one would be AssignFIle..

Just a guess.
The only true wisdom is knowing you know nothing

Thaddy

  • Hero Member
  • *****
  • Posts: 14166
  • Probably until I exterminate Putin.
Re: trying to compile old source code (Satellite Tracking Software)
« Reply #3 on: July 12, 2020, 04:50:39 pm »
the correct one would be AssignFIle..
That is bogus and nonsense at the same time, Jamie.
In mode TP this code should compile.
106 indicates a conversion error, see manual.
The real reason is probably related to real(48) or codepage.

Specialize a type, not a var.

juanirias

  • Full Member
  • ***
  • Posts: 100
Re: trying to compile old source code (Satellite Tracking Software)
« Reply #4 on: July 12, 2020, 04:58:31 pm »
Maybe this is usefull, this is from here: https://www.satsignal.eu/software/wxtrack.htm#SGP4
It is based on Dr T S Kelso's Pascal implementation.

See attachment!

Thanks, but need to get working the OLD code

juanirias

  • Full Member
  • ***
  • Posts: 100
Re: trying to compile old source code (Satellite Tracking Software)
« Reply #5 on: July 12, 2020, 05:00:21 pm »
the correct one would be AssignFIle..
That is bogus and nonsense at the same time, Jamie.
In mode TP this code should compile.
106 indicates a conversion error, see manual.
The real reason is probably related to real(48) or codepage.

Understand, I have the same idea, I will show more images about the error.

juanirias

  • Full Member
  • ***
  • Posts: 100
Re: trying to compile old source code (Satellite Tracking Software)
« Reply #6 on: July 12, 2020, 05:03:13 pm »
Quote

You need to show a few lines of code here of where the error is talking place.


Original source code files

juanirias

  • Full Member
  • ***
  • Posts: 100
Re: trying to compile old source code (Satellite Tracking Software)
« Reply #7 on: July 12, 2020, 05:07:16 pm »

Quote

You need to show a few lines of code here of where the error is talking place.


First error on SUPPORT.PAS

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11352
  • FPC developer.
Re: trying to compile old source code (Satellite Tracking Software)
« Reply #8 on: July 12, 2020, 05:39:27 pm »
That's low level Dos specific code and only will work on dos targets (and for 32-bits dos targets might still require modification if it passes pointers)

See if you can simply leave it out if it is non crucial.

juanirias

  • Full Member
  • ***
  • Posts: 100
Re: trying to compile old source code (Satellite Tracking Software)
« Reply #9 on: July 12, 2020, 05:44:37 pm »
Yes, when I deleted, I can compile...

Code: Pascal  [Select][+][-]
  1.  
  2.  
  3.  
  4. Procedure Cursor_On;
  5.   var
  6.     regs : registers;
  7.   begin
  8.   with regs do
  9.     begin
  10.     ah := $01;
  11.     ch := 0;
  12.     cl := 7;
  13.     end; {with}
  14.   Intr($10,regs);
  15.   end; {Procedure Cursor_On}
  16.  
  17. Procedure Cursor_Off;
  18.   var
  19.     regs : registers;
  20.   begin
  21.   with regs do
  22.     begin
  23.     ah := $01;
  24.     ch := $20;
  25.     cl := $00;
  26.     end; {with}
  27.   Intr($10,regs);
  28.   end; {Procedure Cursor_Off}
  29.  
  30.  
  31.  

juanirias

  • Full Member
  • ***
  • Posts: 100
Re: trying to compile old source code (Satellite Tracking Software)
« Reply #10 on: July 12, 2020, 05:57:05 pm »
This is the menu of  "TRAKSTAR.PAS"  and the original EXEcutable under DOSbox

juanirias

  • Full Member
  • ***
  • Posts: 100
Re: trying to compile old source code (Satellite Tracking Software)
« Reply #11 on: July 12, 2020, 08:16:27 pm »
Dear Friends, I can resolve by put attention to the codding system ISO 8859

Maybe can help me with the cursor procedures


regards, JUAN

AlexTP

  • Hero Member
  • *****
  • Posts: 2365
    • UVviewsoft
Re: trying to compile old source code (Satellite Tracking Software)
« Reply #12 on: July 12, 2020, 08:43:59 pm »
Offtop.
Why are use using Geany editor? CudaText is better (link in signature). It also can run the FPC to compile,
https://wiki.freepascal.org/CudaText#External_Tools

PascalDragon

  • Hero Member
  • *****
  • Posts: 5444
  • Compiler Developer
Re: trying to compile old source code (Satellite Tracking Software)
« Reply #13 on: July 12, 2020, 09:06:13 pm »
Maybe can help me with the cursor procedures

As you're already using the unit Crt you can use the existing CursorOn and CursorOff functions.

jamie

  • Hero Member
  • *****
  • Posts: 6077
Re: trying to compile old source code (Satellite Tracking Software)
« Reply #14 on: July 12, 2020, 09:22:26 pm »
the correct one would be AssignFIle..
That is bogus and nonsense at the same time, Jamie.
In mode TP this code should compile.
106 indicates a conversion error, see manual.
The real reason is probably related to real(48) or codepage.

Take your antics elsewhere...

 You are pretty ignorant at times Thaddy, actually most of the time.

Being an old program like it is, I used OLD documentation which falls under IO errors, 106 = bad Input..

 cause by incorrect file handling and reading the input data incorrectly..

 Assuming it worked in the past there is no reason why Read and Readln won't still read the numerical values now.

 of course there is always the chance of the wrong line endings being used but I doubt that.

 Like I said, bad File handling due to improper file control..

 and not using the proper Assignfile over assign can cause random issues , I've seen it and obviously you haven't. So much for being so savy in code.

 I am sure you will reply to increment your POST numbers, that seems to be the tool of the trade these days to gain popularity is the POSTed message you have left. Many of them not worth reading.

And btw, I looked at your Safe Pointer code, what a mess, I think I'll overwrite it with proper code that does lard up the CPU.




 


The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018