1 |
(* ***** BEGIN LICENSE BLOCK *****
|
2 |
* Version: MPL 1.1
|
3 |
*
|
4 |
* The contents of this file are subject to the Mozilla Public License Version
|
5 |
* 1.1 (the "License"); you may not use this file except in compliance with
|
6 |
* the License. You may obtain a copy of the License at
|
7 |
* http://www.mozilla.org/MPL/
|
8 |
*
|
9 |
* Software distributed under the License is distributed on an "AS IS" basis,
|
10 |
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
11 |
* for the specific language governing rights and limitations under the
|
12 |
* License.
|
13 |
*
|
14 |
* The Original Code is TurboPower SysTools
|
15 |
*
|
16 |
* The Initial Developer of the Original Code is
|
17 |
* TurboPower Software
|
18 |
*
|
19 |
* Portions created by the Initial Developer are Copyright (C) 1996-2002
|
20 |
* the Initial Developer. All Rights Reserved.
|
21 |
*
|
22 |
* Contributor(s):
|
23 |
*
|
24 |
* ***** END LICENSE BLOCK ***** *)
|
25 |
|
26 |
unit ExJupStU;
|
27 |
|
28 |
interface
|
29 |
|
30 |
uses
|
31 |
Windows, Messages, SysUtils, Classes, Graphics, Controls,
|
32 |
Forms, Dialogs, StdCtrls;
|
33 |
|
34 |
type
|
35 |
TForm1 = class(TForm)
|
36 |
Button1: TButton;
|
37 |
Memo1: TMemo;
|
38 |
edDate: TEdit;
|
39 |
edTime: TEdit;
|
40 |
Label1: TLabel;
|
41 |
Label2: TLabel;
|
42 |
procedure Button1Click(Sender: TObject);
|
43 |
procedure FormCreate(Sender: TObject);
|
44 |
private
|
45 |
{ Private declarations }
|
46 |
public
|
47 |
{ Public declarations }
|
48 |
end;
|
49 |
|
50 |
var
|
51 |
Form1: TForm1;
|
52 |
|
53 |
implementation
|
54 |
|
55 |
{$R *.DFM}
|
56 |
|
57 |
uses
|
58 |
StDate, StDateSt, StAstro, StJupSat;
|
59 |
|
60 |
procedure TForm1.Button1Click(Sender: TObject);
|
61 |
var
|
62 |
D : TDateTime;
|
63 |
XS,
|
64 |
YS : string[20];
|
65 |
JS : TStJupSats;
|
66 |
begin
|
67 |
Memo1.Clear;
|
68 |
|
69 |
D := StrToDate(edDate.Text);
|
70 |
if edTime.Text > '' then
|
71 |
D := D + StrToTime(edTime.Text);
|
72 |
|
73 |
JS := GetJupSats(D, False, False);
|
74 |
|
75 |
Memo1.Lines.Add('Low Precision');
|
76 |
Memo1.Lines.Add('--------------------------------');
|
77 |
Str(JS.Io.X:6:2, XS);
|
78 |
Str(JS.Io.Y:6:2, YS);
|
79 |
Memo1.Lines.Add('Io ' + XS + ' ' + YS);
|
80 |
|
81 |
Str(JS.Europa.X:6:2, XS);
|
82 |
Str(JS.Europa.Y:6:2, YS);
|
83 |
Memo1.Lines.Add('Europa ' + XS + ' ' + YS);
|
84 |
|
85 |
Str(JS.Ganymede.X:6:2, XS);
|
86 |
Str(JS.Ganymede.Y:6:2, YS);
|
87 |
Memo1.Lines.Add('Ganymede ' + XS + ' ' + YS);
|
88 |
|
89 |
Str(JS.Callisto.X:6:2, XS);
|
90 |
Str(JS.Callisto.Y:6:2, YS);
|
91 |
Memo1.Lines.Add('Callisto ' + XS + ' ' + YS);
|
92 |
|
93 |
|
94 |
Memo1.Lines.Add(' ');
|
95 |
|
96 |
JS := GetJupSats(D, True, False);
|
97 |
Memo1.Lines.Add('High Precision - Non Shadow');
|
98 |
Memo1.Lines.Add('--------------------------------');
|
99 |
|
100 |
Str(JS.Io.X:8:4, XS);
|
101 |
Str(JS.Io.Y:8:4, YS);
|
102 |
Memo1.Lines.Add('Io ' + XS + ' ' + YS);
|
103 |
|
104 |
Str(JS.Europa.X:8:4, XS);
|
105 |
Str(JS.Europa.Y:8:4, YS);
|
106 |
Memo1.Lines.Add('Europa ' + XS + ' ' + YS);
|
107 |
|
108 |
Str(JS.Ganymede.X:8:4, XS);
|
109 |
Str(JS.Ganymede.Y:8:4, YS);
|
110 |
Memo1.Lines.Add('Ganymede ' + XS + ' ' + YS);
|
111 |
|
112 |
Str(JS.Callisto.X:8:4, XS);
|
113 |
Str(JS.Callisto.Y:8:4, YS);
|
114 |
Memo1.Lines.Add('Callisto ' + XS + ' ' + YS);
|
115 |
|
116 |
|
117 |
Memo1.Lines.Add(' ');
|
118 |
|
119 |
JS := GetJupSats(D, True, True);
|
120 |
Memo1.Lines.Add('High Precision - Shadow');
|
121 |
Memo1.Lines.Add('--------------------------------');
|
122 |
|
123 |
Str(JS.Io.X:8:4, XS);
|
124 |
Str(JS.Io.Y:8:4, YS);
|
125 |
Memo1.Lines.Add('Io ' + XS + ' ' + YS);
|
126 |
|
127 |
Str(JS.Europa.X:8:4, XS);
|
128 |
Str(JS.Europa.Y:8:4, YS);
|
129 |
Memo1.Lines.Add('Europa ' + XS + ' ' + YS);
|
130 |
|
131 |
Str(JS.Ganymede.X:8:4, XS);
|
132 |
Str(JS.Ganymede.Y:8:4, YS);
|
133 |
Memo1.Lines.Add('Ganymede ' + XS + ' ' + YS);
|
134 |
|
135 |
Str(JS.Callisto.X:8:4, XS);
|
136 |
Str(JS.Callisto.Y:8:4, YS);
|
137 |
Memo1.Lines.Add('Callisto ' + XS + ' ' + YS);
|
138 |
end;
|
139 |
|
140 |
procedure TForm1.FormCreate(Sender: TObject);
|
141 |
begin
|
142 |
edDate.Text := DateToStr(Date);
|
143 |
edTime.Text := '';
|
144 |
end;
|
145 |
|
146 |
end.
|