GithubHelp home page GithubHelp logo

Comments (5)

davidcalhoun avatar davidcalhoun commented on August 19, 2024

Hey, small world! I used to work at Skybox, the company that launched those satellites :)

I think something is wrong on your side unfortunately - I'd log your arrayOfArrays to make sure it's formatted correctly.

If you check with https://www.n2yo.com/passes/?s=43797# you can see the timestamps of the next passes over you. I was able to get a result with the following, using your same TLE and lat/lng:

const tles = [
	[
		"0 SKYSAT C12",
		"1 43797U 18099AR  20029.52879878 +.00000391 +00000-0 +19261-4 0  9990",
		"2 43797 097.3805 103.0646 0003500 182.3187 177.8034 15.23559221063758"
	]
];

const allVisible = getVisibleSatellites({
	observerLat: 37.61474,
	observerLng: 34.533634,
	observerHeight: 0,
	tles,
	elevationThreshold: 0,
	timestampMS: 1580372100000
});

->
[
  {
    tleArr: [
      '0 SKYSAT C12',
      '1 43797U 18099AR  20029.52879878 +.00000391 +00000-0 +19261-4 0  9990',
      '2 43797 097.3805 103.0646 0003500 182.3187 177.8034 15.23559221063758'
    ],
    info: {
      lng: 35.80973400964123,
      lat: 32.6680981485973,
      elevation: 37.90872252964439,
      azimuth: 167.66790488533985,
      range: 765.6241128634699,
      height: 497.43671713422464,
      velocity: 7.620085604067198
    }
  }
]

from tle.js.

samuelcardillo avatar samuelcardillo commented on August 19, 2024

Small world indeed ! We are using SkySat for specific tasking so thanks not only for the code but also contributing in launching this very useful constellation 😁

By passing the variable arrayOfArrays as a const named tles (just like in your example) it then work like a charm. I am just now facing a problem with the way I try to predict passages over a week and I am guessing it comes from my timestamp but I am not sure.

function getPasses() {
  const tles = exports.registeredTLE;
  let startingDate = new Date();
  startingDate = startingDate.setHours(startingDate.getHours(), 00, 00, 00);
  let endDate = startingDate + 86400000;
  let satInfo = [];

  for (var addedSeconds = 0; addedSeconds < 86400000; addedSeconds = addedSeconds + 300000) {
    let currentDate = startingDate + addedSeconds;

    satInfo.push(tle.getVisibleSatellites({
      observerLat: 34.533634,
      observerLng: 37.614740,
      tles,
      timestampMS: currentDate
    }));

    if (currentDate === (endDate - 300000)) {
      console.log("Finished - " + satInfo.length + " predictions acquired");

      console.log(JSON.stringify(satInfo))
    }
  }
}

Depending on the starting date (if I round the hour up - like in this example - or not), the number of MS between each predictions and the windows of prediction (one day in this example), the results are completely different. In one I get results only from C12, in other I get results from C1, C2 and C3...

Is there a proper and more logical way to do that ?

from tle.js.

samuelcardillo avatar samuelcardillo commented on August 19, 2024

Hi, I am still stuck with this, I literally can't find a solution :/ Is there anyone with more knowledge that could help me ? Please ?

from tle.js.

davidcalhoun avatar davidcalhoun commented on August 19, 2024

Sorry for the delay. I believe I found the culprit in some bad caching logic on my side. Checking in a fix shortly.

from tle.js.

davidcalhoun avatar davidcalhoun commented on August 19, 2024

Feel free to reopen or comment!

from tle.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.