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

Commit120b939

Browse files
committed
alpha-5
1 parent4668955 commit120b939

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

‎src/js/sgp4.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const wgs84 = 3;
2020
classElsetRec{
2121
constructor(){
2222
this.whichconst=wgs72;
23-
this.satnum=0;
23+
this.satID=null;
2424
this.epochyr=0;
2525
this.epochtynumrev=0;
2626
this.error=0;
@@ -2221,7 +2221,7 @@ class TLE
22212221
this.line1=null;
22222222
this.line2=null;
22232223
this.intlid=null;
2224-
this.objectNum=0;
2224+
this.objectID=null;
22252225
this.epoch=null;
22262226
this.ndot=0;
22272227
this.nddot=0;
@@ -2290,14 +2290,14 @@ class TLE
22902290
this.intlid=id;
22912291
}
22922292

2293-
getObjectNum()
2293+
getObjectID()
22942294
{
2295-
returnthis.objectNum;
2295+
returnthis.objectID;
22962296
}
22972297

2298-
setObjectNum(on)
2298+
setObjectID(id)
22992299
{
2300-
this.objectNum=on;
2300+
this.objectID=id;
23012301
}
23022302

23032303
getEpoch()
@@ -2471,13 +2471,13 @@ class TLE
24712471

24722472

24732473

2474-
this.objectNum=this.gd(line1,2,7);
2475-
this.objectNum=this.objectNum|0;// cast to int
2474+
this.objectID=line1.substring(2,7).trim();
24762475

2477-
varo2=this.gd(line1,2,7);
2478-
o2=o2|0;
2476+
varo2=line1.substring(2,7).trim();
24792477

2480-
if(this.objectNum!=o2)this.addParseError("ids don't match");
2478+
if(this.objectID!=o2)this.addParseError("ids don't match");
2479+
2480+
while(this.objectID.startsWith('0'))this.objectID=this.objectID.substring(1);
24812481

24822482
this.rec.classification=line1.charAt(7);
24832483

@@ -2516,7 +2516,7 @@ class TLE
25162516

25172517
this.rec.elnum=this.elnum;
25182518
this.rec.revnum=this.revnum;
2519-
this.rec.satnum=this.objectNum;
2519+
this.rec.satID=this.objectID;
25202520
this.rec.bstar=this.bstar;
25212521
this.rec.inclo=this.incDeg*deg2rad;
25222522
this.rec.nodeo=this.raanDeg*deg2rad;

‎src/js/testsgp4.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function generateVerificationOutputs(verins)
2020
{
2121
v=verins[i];
2222
tle=newTLE(v.line1,v.line2);
23-
id=tle.getObjectNum();
23+
id=tle.getObjectID();
2424
entries=newArray();
2525

2626
vo=newObject();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp