Code Monkey home page Code Monkey logo

Comments (5)

joshuaferrara avatar joshuaferrara commented on August 28, 2024

I'll try and take a look into this over the weekend. The results are quite close, meaning it's probably either a rounding error or some other small, hard to find issue. Will need to compare the results of node-sgp4 step by step to that of the original library and see where it goes haywire. Thanks for bringing this up!

from node-sgp4.

joshuaferrara avatar joshuaferrara commented on August 28, 2024

I've ran some tests against another sgp4 Javascript library and have found the results to be similar within 11 decimal places. Both of these libraries are based off of "Revisiting Spacetrack Report #3" (more info here).

That being said, I am still interested in verifying the library against the C implementation found on the page linked above, and will provide updates here when I've determined the results.

from node-sgp4.

joshuaferrara avatar joshuaferrara commented on August 28, 2024

Just spun up STK 11, and I'm getting much closer results than you were:

       Time (UTCG)             x (km)           y (km)          z (km)       vx (km/sec)    vy (km/sec)    vz (km/sec)
------------------------    ------------    -------------    ------------    -----------    -----------    -----------
28 Jul 2017 02:55:06.000    -6722.945053    -14092.617044    21272.547248       3.643982      -1.353283       0.302741
28 Jul 2017 02:55:07.000    -6719.301008    -14093.970175    21272.849754       3.644128      -1.352977       0.302280
28 Jul 2017 02:55:08.000    -6715.656818    -14095.323000    21273.151799       3.644273      -1.352671       0.301818
28 Jul 2017 02:55:09.000    -6712.012482    -14096.675519    21273.453382       3.644419      -1.352366       0.301357
28 Jul 2017 02:55:10.000    -6708.368000    -14098.027733    21273.754503       3.644564      -1.352060       0.300895
28 Jul 2017 02:55:11.000    -6704.723373    -14099.379641    21274.055163       3.644710      -1.351754       0.300434
28 Jul 2017 02:55:12.000    -6701.078601    -14100.731243    21274.355362       3.644855      -1.351448       0.299972
28 Jul 2017 02:55:13.000    -6697.433683    -14102.082539    21274.655099       3.645000      -1.351142       0.299511
28 Jul 2017 02:55:14.000    -6693.788620    -14103.433530    21274.954374       3.645146      -1.350837       0.299049
28 Jul 2017 02:55:15.000    -6690.143411    -14104.784214    21275.253188       3.645291      -1.350531       0.298588

from node-sgp4.

akraj31 avatar akraj31 commented on August 28, 2024

But deviation is in kilometres, and its substantial

STK Result:

28 Jul 2017 02:55:06.000    -6749.036399    -14064.485321    21282.805742
28 Jul 2017 02:55:07.000    -6745.397433    -14065.853241    21283.102965

Your Output:

28 Jul 2017 02:55:06.000    -6722.945053    -14092.617044    21272.547248
28 Jul 2017 02:55:07.000    -6719.301008    -14093.970175    21272.849754

from node-sgp4.

joshuaferrara avatar joshuaferrara commented on August 28, 2024

I agree that it's quite a large deviation, though I am unable to verify it against anything other than the code provided in AIAA-2006-6753.zip and the results from STK that I was able to obtain. That being said, I have verified the results with the linked version of the library (C++) and the results (with slight deviation from that of node-sgp4) can be seen below. Here's a link to run the code I generated these results with: https://repl.it/MrjE/1

--- SGP4 Test Application ---
Initialized satellite record with NORAD catalog ID: 20959
Start mfe = 1.81497e+06 - Stop mfe = 1.81497e+06
2017 7 28 2:55:6	-6729.5866813	-14090.1927045	21271.9693662
2017 7 28 2:55:7	-6725.9428845	-14091.5463272	21272.2727591
2017 7 28 2:55:8	-6722.2989419	-14092.8996443	21272.5756905
2017 7 28 2:55:9	-6718.6548535	-14094.2526557	21272.8781605
2017 7 28 2:55:10	-6715.0106193	-14095.6053614	21273.1801690
2017 7 28 2:55:11	-6711.3662395	-14096.9577614	21273.4817160
2017 7 28 2:55:12	-6707.7217141	-14098.3098557	21273.7828016
2017 7 28 2:55:13	-6704.0770433	-14099.6616443	21274.0834257
2017 7 28 2:55:14	-6700.4322271	-14101.0131270	21274.3835883
2017 7 28 2:55:15	-6696.7872656	-14102.3643039	21274.6832894

node-sgp4 is made to replicate the library linked above, and as it is replicating those results, this does not seem to be an issue with node-sgp4.

My only other thought is that STK is using something other than WGS84 for the propagation constants. If anyone has any further information, I would love to hear it.

from node-sgp4.

Related Issues (1)

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.