Skip to content

Commit 1c9e502

Browse files
committed
TLE data update and tweaks
1 parent 605f1c6 commit 1c9e502

4 files changed

Lines changed: 18 additions & 14 deletions

File tree

bin/fetch-tle.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,20 @@ then
1212
exit
1313
fi
1414

15+
auth_url="https://www.space-track.org/ajaxauth/login"
1516
source_url="https://www.space-track.org/basicspacedata/query/class/tle_latest/ORDINAL/1/EPOCH/%3Enow-30/orderby/NORAD_CAT_ID/format/json"
1617
tle_file="../public/data/TLE.json"
1718
output_file="../public/data/attributed-TLE.json"
1819
current_date=`date -u +"%Y-%m-%dT%H:%M:%SZ"`
1920
cookie_jar="/tmp/$USER-cookiejar"
2021

21-
echo "Downloading TLE data"
22-
curl -c $cookie_jar -b $cookie_jar https://www.space-track.org/ajaxauth/login \
22+
echo "Authenticating"
23+
curl -c $cookie_jar -b $cookie_jar "$auth_url" \
2324
-d "identity=$identity&password=$password"
2425

25-
curl --limit-rate 100K -cookie $cookie_jar "${source_url}" > $tle_file
26+
echo "Downloading TLE data"
27+
28+
curl --limit-rate 200K -cookie $cookie_jar -b $cookie_jar "${source_url}" > $tle_file
2629

2730
echo "Generating Attributed TLE file"
2831
echo "{

public/data/TLE.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

public/data/attributed-TLE.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

src/viewer/Satellites.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
Color,
99
ShaderMaterial,
1010
Object3D,
11-
// PointsMaterial
1211
} from '../utils/three';
1312
import SceneComponent from './interfaces/SceneComponent';
1413
import SatelliteStore from './SatelliteStore';
@@ -243,28 +242,30 @@ class Satellites implements SceneComponent, SelectableSatellite {
243242
throw new Error('sahderStore is not available');
244243
}
245244

245+
const satDataLen = (this.satelliteStore.satData || []).length;
246246
const geometry = new BufferGeometry();
247247
const vertices: Float32Array = new Float32Array();
248248
const sizes: Float32Array = new Float32Array();
249-
const colors: number[] = new Array(this.satelliteStore.satData.length * 4);
249+
const colors: number[] = new Array(satDataLen * 4);
250250

251-
vertices.fill(0, 0, this.satelliteStore.satData.length * 3);
252-
colors.fill(0, 0, this.satelliteStore.satData.length * 3);
253-
sizes.fill(10, 0, this.satelliteStore.satData.length);
251+
vertices.fill(0, 0, satDataLen * 3);
252+
colors.fill(0, 0, satDataLen * 3);
253+
sizes.fill(10, 0, satDataLen);
254254

255255
geometry.setAttribute('position', new Float32BufferAttribute( vertices, 3 ) );
256256
geometry.setAttribute('color', new Float32BufferAttribute( colors, 4 ) );
257-
geometry.setAttribute('size', new Float32BufferAttribute( sizes, 1 ) );
257+
geometry.setAttribute('size', new Float32BufferAttribute( sizes, 2 ) );
258258

259259
const texture = new TextureLoader().load(`${this.baseUrl}/images/circle.png`);
260260
const shader = this.shaderStore.getShader('dot2');
261261

262262
// const material = new PointsMaterial ({
263263
// color: 'grey',
264-
// size: 3,
264+
// size: 4,
265265
// sizeAttenuation: false,
266266
// vertexColors: true,
267267
// blending: AdditiveBlending,
268+
// transparent: false,
268269
// depthTest: true
269270
// });
270271

@@ -278,7 +279,7 @@ class Satellites implements SceneComponent, SelectableSatellite {
278279
fragmentShader: shader.fragment,
279280
blending: AdditiveBlending,
280281
depthTest: true,
281-
transparent: true
282+
transparent: false
282283
});
283284

284285
geometry.center();

0 commit comments

Comments
 (0)