oops ephAge was integer only - potentially messing with doppler measurements
parent
c565d32f68
commit
4c3422ca6a
|
@ -13,9 +13,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// positive age = t0e in the past
|
// positive age = t0e in the past
|
||||||
int ephAge(int tow, int t0e)
|
double ephAge(double tow, int t0e)
|
||||||
{
|
{
|
||||||
int diff = tow - t0e;
|
double diff = tow - t0e;
|
||||||
if(diff > 3.5*86400)
|
if(diff > 3.5*86400)
|
||||||
diff -= 604800;
|
diff -= 604800;
|
||||||
if(diff < -3.5*86400)
|
if(diff < -3.5*86400)
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
// lat, lon, height (rad, rad, meters)
|
// lat, lon, height (rad, rad, meters)
|
||||||
std::tuple<double, double, double> ecefToWGS84(double x, double y, double z);
|
std::tuple<double, double, double> ecefToWGS84(double x, double y, double z);
|
||||||
|
|
||||||
int ephAge(int tow, int t0e);
|
double ephAge(double tow, int t0e);
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void getCoordinates(double tow, const T& iod, Point* p, bool quiet=true)
|
double getCoordinates(double tow, const T& iod, Point* p, bool quiet=true)
|
||||||
{
|
{
|
||||||
using namespace std;
|
using namespace std;
|
||||||
// here goes
|
// here goes
|
||||||
|
@ -71,7 +71,7 @@ void getCoordinates(double tow, const T& iod, Point* p, bool quiet=true)
|
||||||
double A3 = pow(sqrtA, 6.0);
|
double A3 = pow(sqrtA, 6.0);
|
||||||
|
|
||||||
double n0 = sqrt(mu/A3);
|
double n0 = sqrt(mu/A3);
|
||||||
double tk = ephAge(tow, t0e); // in seconds, should do ephAge
|
double tk = ephAge(tow, t0e);
|
||||||
|
|
||||||
double n = n0 + deltan;
|
double n = n0 + deltan;
|
||||||
if(!quiet)
|
if(!quiet)
|
||||||
|
@ -153,7 +153,7 @@ void getCoordinates(double tow, const T& iod, Point* p, bool quiet=true)
|
||||||
Vector radius(core, *p);
|
Vector radius(core, *p);
|
||||||
cerr << radius.length() << " calculated r "<<endl;
|
cerr << radius.length() << " calculated r "<<endl;
|
||||||
}
|
}
|
||||||
|
return E;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct DopplerData
|
struct DopplerData
|
||||||
|
|
Loading…
Reference in New Issue