Skip to content

Commit

Permalink
oops ephAge was integer only - potentially messing with doppler measu…
Browse files Browse the repository at this point in the history
…rements
  • Loading branch information
ahupowerdns committed Dec 20, 2019
1 parent c565d32 commit 4c3422c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ephemeris.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
*/

// 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)
diff -= 604800;
if(diff < -3.5*86400)
Expand Down
8 changes: 4 additions & 4 deletions ephemeris.hh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
// lat, lon, height (rad, rad, meters)
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>
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;
// here goes
Expand Down Expand Up @@ -71,7 +71,7 @@ void getCoordinates(double tow, const T& iod, Point* p, bool quiet=true)
double A3 = pow(sqrtA, 6.0);

double n0 = sqrt(mu/A3);
double tk = ephAge(tow, t0e); // in seconds, should do ephAge
double tk = ephAge(tow, t0e);

double n = n0 + deltan;
if(!quiet)
Expand Down Expand Up @@ -153,7 +153,7 @@ void getCoordinates(double tow, const T& iod, Point* p, bool quiet=true)
Vector radius(core, *p);
cerr << radius.length() << " calculated r "<<endl;
}

return E;
}

struct DopplerData
Expand Down

0 comments on commit 4c3422c

Please sign in to comment.