// Copyright (c) CNES 2008 // // This software is part of CelestLab, a CNES toolbox for Scilab // // This software is governed by the CeCILL license under French law and // abiding by the rules of distribution of free software. You can use, // modify and/ or redistribute the software under the terms of the CeCILL // license as circulated by CEA, CNRS and INRIA at the following URL // 'http://www.cecill.info'. cjd = 18440.78495062; ecc = 0.1859667; inc = 0.59809291873192083; argp = 5.79041602748851503; raan = 6.08638547138320973; ma = 0.33730931255743207; mm = 0.00078715742401298; bstar = 0.000028098; delta_t = [0. 21600. 43200. 64800. 86400. 108000. 129600. 151200. 172800. 194400. 216000. 237600. 259200. ] delta_t = column 1 to 7 0. 21600. 43200. 64800. 86400. 108000. 129600. column 8 to 13 151200. 172800. 194400. 216000. 237600. 259200. whichconst = "wgs72"; opsmode = "impr"; [pos, vel] = CLx_tle_sgp4(cjd, ecc, inc, argp, raan, ma, mm, bstar, delta_t, whichconst, opsmode); // results (TEME): time (mn), position (km), speed (km/s) results = [delta_t'/60, pos'/1000, vel'/1000]; expected_results = [ .. 0.000000000000 7022.465292664064 -1400.082967553555 0.039951554165 1.893841014513 6.405893759210 4.534807250355; .. 360.000000000000 -7154.031202015707 -3783.176825036568 -3536.194122942216 4.741887408996 -4.151817765374 -2.093935424907; .. 720.000000000000 -7134.593401193215 6531.686413336449 3260.271864825572 -4.113793027161 -2.911922038623 -2.557327850931; .. 1080.000000000000 5568.539011812065 4492.069925905462 3863.876419829052 -4.209106475593 5.159719888480 2.744852979555; .. 1440.000000000000 -938.559239429339 -6268.187488313942 -4294.029247511629 7.536105209256 -0.427127707124 0.989878079559; .. 1800.000000000000 -9680.561217281351 2802.477713539007 124.106880382441 -0.905874102159 -4.659467969920 -3.227347516713; .. 2160.000000000000 190.197969878612 7746.966536135243 5110.006754118666 -6.112325142014 1.527008183521 -0.139152357883; .. 2520.000000000000 5579.556401157335 -3995.613967894304 -1518.821089660352 4.767927482844 5.123185300954 4.276837354502; .. 2880.000000000000 -8650.730822189496 -1914.938115251894 -3007.036034428082 3.067165126543 -4.828384068444 -2.515322835722; .. 3240.000000000000 -5429.792041644417 7574.364937924353 3747.393052358907 -4.999442109604 -1.800561422305 -2.229392830241; .. 3600.000000000000 6759.045837217934 2001.581982196576 2783.551925329178 -2.180993947177 6.402085603047 3.644723951605; .. 3960.000000000000 -3791.445315589633 -5712.956178939018 -4533.486307143728 6.668817492548 -2.516382326527 -0.082384353747; .. 4320.000000000000 -9060.473735694362 4658.709525022786 813.686731534231 -2.232832782743 -4.110453489937 -3.157345433457 .. ]; assert_checkalmostequal(results, expected_results);