Skip to content

Commit

Permalink
TLE data update and tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ajmas committed Dec 2, 2023
1 parent 605f1c6 commit 1c9e502
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
9 changes: 6 additions & 3 deletions bin/fetch-tle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,20 @@ then
exit
fi

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

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

curl --limit-rate 100K -cookie $cookie_jar "${source_url}" > $tle_file
echo "Downloading TLE data"

curl --limit-rate 200K -cookie $cookie_jar -b $cookie_jar "${source_url}" > $tle_file

echo "Generating Attributed TLE file"
echo "{
Expand Down
2 changes: 1 addition & 1 deletion public/data/TLE.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public/data/attributed-TLE.json

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions src/viewer/Satellites.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
Color,
ShaderMaterial,
Object3D,
// PointsMaterial
} from '../utils/three';
import SceneComponent from './interfaces/SceneComponent';
import SatelliteStore from './SatelliteStore';
Expand Down Expand Up @@ -243,28 +242,30 @@ class Satellites implements SceneComponent, SelectableSatellite {
throw new Error('sahderStore is not available');
}

const satDataLen = (this.satelliteStore.satData || []).length;
const geometry = new BufferGeometry();
const vertices: Float32Array = new Float32Array();
const sizes: Float32Array = new Float32Array();
const colors: number[] = new Array(this.satelliteStore.satData.length * 4);
const colors: number[] = new Array(satDataLen * 4);

vertices.fill(0, 0, this.satelliteStore.satData.length * 3);
colors.fill(0, 0, this.satelliteStore.satData.length * 3);
sizes.fill(10, 0, this.satelliteStore.satData.length);
vertices.fill(0, 0, satDataLen * 3);
colors.fill(0, 0, satDataLen * 3);
sizes.fill(10, 0, satDataLen);

geometry.setAttribute('position', new Float32BufferAttribute( vertices, 3 ) );
geometry.setAttribute('color', new Float32BufferAttribute( colors, 4 ) );
geometry.setAttribute('size', new Float32BufferAttribute( sizes, 1 ) );
geometry.setAttribute('size', new Float32BufferAttribute( sizes, 2 ) );

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

// const material = new PointsMaterial ({
// color: 'grey',
// size: 3,
// size: 4,
// sizeAttenuation: false,
// vertexColors: true,
// blending: AdditiveBlending,
// transparent: false,
// depthTest: true
// });

Expand All @@ -278,7 +279,7 @@ class Satellites implements SceneComponent, SelectableSatellite {
fragmentShader: shader.fragment,
blending: AdditiveBlending,
depthTest: true,
transparent: true
transparent: false
});

geometry.center();
Expand Down

0 comments on commit 1c9e502

Please sign in to comment.