Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0c678d7

Browse files
committed
swift version
1 parenta595320 commit0c678d7

File tree

10 files changed

+2608
-0
lines changed

10 files changed

+2608
-0
lines changed

‎src/swift/sgp4/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
/*.xcodeproj
5+
xcuserdata/

‎src/swift/sgp4/Package.swift

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// swift-tools-version:5.3
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
letpackage=Package(
7+
name:"sgp4",
8+
dependencies:[
9+
// Dependencies declare other packages that this package depends on.
10+
// .package(url: /* package url */, from: "1.0.0"),
11+
],
12+
targets:[
13+
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
14+
// Targets can depend on other targets in this package, and on products in packages this package depends on.
15+
.target(
16+
name:"sgp4",
17+
dependencies:[]),
18+
.testTarget(
19+
name:"sgp4Tests",
20+
dependencies:["sgp4"]),
21+
]
22+
)

‎src/swift/sgp4/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#sgp4
2+
3+
A description of this package.
Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
// This module implements the elsetrec data type from Vallado's SGP4 code.
2+
//
3+
// From SGP4.h
4+
// #define SGP4Version "SGP4 Version 2016-03-09"
5+
//
6+
// @author aholinch
7+
8+
structElsetRec{
9+
10+
varwhichconst:Int32=Int32(SGP4.WGS72);
11+
varsatnum:Int32=0
12+
varepochyr:Int32=0
13+
varepochtynumrev:Int32=0
14+
varerror:Int32=0
15+
varoperationmode:Character="a"
16+
varinitChar:Character="n"
17+
varmethod:Character="n"
18+
vara:Double=0
19+
varaltp:Double=0
20+
varalta:Double=0
21+
varepochdays:Double=0
22+
varjdsatepoch:Double=0
23+
varjdsatepoch_f:Double=0
24+
varnddot:Double=0
25+
varndot:Double=0
26+
varbstar:Double=0
27+
varrcse:Double=0
28+
varinclo:Double=0
29+
varnodeo:Double=0
30+
varecco:Double=0
31+
varargpo:Double=0
32+
varmo:Double=0
33+
varno_kozai:Double=0
34+
35+
// sgp4fix add new variables from tle
36+
varclassification:Character="u"
37+
varintldesg:String=""
38+
varephtype:Int32=0
39+
varelnum:Int64=0
40+
varrevnum:Int64=0
41+
42+
// sgp4fix add unkozai'd variable
43+
varno_unkozai:Double=0
44+
45+
// sgp4fix add singly averaged variables
46+
varam:Double=0
47+
varem:Double=0
48+
varim:Double=0
49+
varo_m:Double=0 // usually Om in other languages that don't care so much about snake case
50+
varom:Double=0
51+
varmm:Double=0
52+
varnm:Double=0
53+
vart:Double=0
54+
55+
// sgp4fix add constant parameters to eliminate mutliple calls during execution
56+
vartumin:Double=0
57+
varmu:Double=0
58+
varradiusearthkm:Double=0
59+
varxke:Double=0
60+
varj2:Double=0
61+
varj3:Double=0
62+
varj4:Double=0
63+
varj3oj2:Double=0
64+
65+
// Additional elements to capture relevant TLE and object information:
66+
vardia_mm:Int64=0// RSO dia in mm
67+
varperiod_sec:Double=0// Period in seconds
68+
varactive:Character="n" // "Active S/C" flag (0=n 1=y)
69+
varnot_orbital:Character="n" // "Orbiting S/C" flag (0=n 1=y)
70+
varrcs_m2:Double=0 // "RCS (m^2)" storage
71+
72+
// temporary variables because the original authors call the same method with different variables
73+
varep:Double=0
74+
varinclp:Double=0
75+
varnodep:Double=0
76+
varargpp:Double=0
77+
varmp:Double=0
78+
79+
80+
varisimp:Int32=0
81+
varaycof:Double=0
82+
varcon41:Double=0
83+
varcc1:Double=0
84+
varcc4:Double=0
85+
varcc5:Double=0
86+
vard2:Double=0
87+
vard3:Double=0
88+
vard4:Double=0
89+
vardelmo:Double=0
90+
vareta:Double=0
91+
varargpdot:Double=0
92+
varomgcof:Double=0
93+
varsinmao:Double=0
94+
vart2cof:Double=0
95+
vart3cof:Double=0
96+
vart4cof:Double=0
97+
vart5cof:Double=0
98+
varx1mth2:Double=0
99+
varx7thm1:Double=0
100+
varmdot:Double=0
101+
varnodedot:Double=0
102+
varxlcof:Double=0
103+
varxmcof:Double=0
104+
varnodecf:Double=0
105+
106+
// deep space
107+
varirez:Int32=0
108+
vard2201:Double=0
109+
vard2211:Double=0
110+
vard3210:Double=0
111+
vard3222:Double=0
112+
vard4410:Double=0
113+
vard4422:Double=0
114+
vard5220:Double=0
115+
vard5232:Double=0
116+
vard5421:Double=0
117+
vard5433:Double=0
118+
vardedt:Double=0
119+
vardel1:Double=0
120+
vardel2:Double=0
121+
vardel3:Double=0
122+
vardidt:Double=0
123+
vardmdt:Double=0
124+
vardnodt:Double=0
125+
vardomdt:Double=0
126+
vare3:Double=0
127+
varee2:Double=0
128+
varpeo:Double=0
129+
varpgho:Double=0
130+
varpho:Double=0
131+
varpinco:Double=0
132+
varplo:Double=0
133+
varse2:Double=0
134+
varse3:Double=0
135+
varsgh2:Double=0
136+
varsgh3:Double=0
137+
varsgh4:Double=0
138+
varsh2:Double=0
139+
varsh3:Double=0
140+
varsi2:Double=0
141+
varsi3:Double=0
142+
varsl2:Double=0
143+
varsl3:Double=0
144+
varsl4:Double=0
145+
vargsto:Double=0
146+
varxfact:Double=0
147+
varxgh2:Double=0
148+
varxgh3:Double=0
149+
varxgh4:Double=0
150+
varxh2:Double=0
151+
varxh3:Double=0
152+
varxi2:Double=0
153+
varxi3:Double=0
154+
varxl2:Double=0
155+
varxl3:Double=0
156+
varxl4:Double=0
157+
varxlamo:Double=0
158+
varzmol:Double=0
159+
varzmos:Double=0
160+
varatime:Double=0
161+
varxli:Double=0
162+
varxni:Double=0
163+
varsnodm:Double=0
164+
varcnodm:Double=0
165+
varsinim:Double=0
166+
varcosim:Double=0
167+
varsinomm:Double=0
168+
varcosomm:Double=0
169+
varday:Double=0
170+
varemsq:Double=0
171+
vargam:Double=0
172+
varrtemsq:Double=0
173+
vars1:Double=0
174+
vars2:Double=0
175+
vars3:Double=0
176+
vars4:Double=0
177+
vars5:Double=0
178+
vars6:Double=0
179+
vars7:Double=0
180+
varss1:Double=0
181+
varss2:Double=0
182+
varss3:Double=0
183+
varss4:Double=0
184+
varss5:Double=0
185+
varss6:Double=0
186+
varss7:Double=0
187+
varsz1:Double=0
188+
varsz2:Double=0
189+
varsz3:Double=0
190+
varsz11:Double=0
191+
varsz12:Double=0
192+
varsz13:Double=0
193+
varsz21:Double=0
194+
varsz22:Double=0
195+
varsz23:Double=0
196+
varsz31:Double=0
197+
varsz32:Double=0
198+
varsz33:Double=0
199+
varz1:Double=0
200+
varz2:Double=0
201+
varz3:Double=0
202+
varz11:Double=0
203+
varz12:Double=0
204+
varz13:Double=0
205+
varz21:Double=0
206+
varz22:Double=0
207+
varz23:Double=0
208+
varz31:Double=0
209+
varz32:Double=0
210+
varz33:Double=0
211+
varargpm:Double=0
212+
varinclm:Double=0
213+
varnodem:Double=0
214+
vardndt:Double=0
215+
vareccsq:Double=0
216+
217+
// for initl
218+
varainv:Double=0
219+
varao:Double=0
220+
varcon42:Double=0
221+
varcosio:Double=0
222+
varcosio2:Double=0
223+
varomeosq:Double=0
224+
varposq:Double=0
225+
varrp:Double=0
226+
varrteosq:Double=0
227+
varsinio:Double=0
228+
229+
init(){
230+
}
231+
} // end struct
232+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp