Use SGP4 Propagator for GPS #770
@ -187,8 +187,8 @@ void SensorProcessing::processSus(
|
|||||||
double JC2000 = JD2000 / 36525.;
|
double JC2000 = JD2000 / 36525.;
|
||||||
|
|
||||||
double meanLongitude =
|
double meanLongitude =
|
||||||
sunModelParameters->omega_0 + (sunModelParameters->domega * JC2000) * PI / 180.;
|
sunModelParameters->omega_0 + (sunModelParameters->domega * JC2000) * M_PI / 180.;
|
||||||
double meanAnomaly = (sunModelParameters->m_0 + sunModelParameters->dm * JC2000) * PI / 180.;
|
double meanAnomaly = (sunModelParameters->m_0 + sunModelParameters->dm * JC2000) * M_PI / 180.;
|
||||||
|
|
||||||
double eclipticLongitude = meanLongitude + sunModelParameters->p1 * sin(meanAnomaly) +
|
double eclipticLongitude = meanLongitude + sunModelParameters->p1 * sin(meanAnomaly) +
|
||||||
sunModelParameters->p2 * sin(2 * meanAnomaly);
|
sunModelParameters->p2 * sin(2 * meanAnomaly);
|
||||||
@ -546,8 +546,8 @@ void SensorProcessing::processGps(const double gpsLatitude, const double gpsLong
|
|||||||
return;
|
return;
|
||||||
} else if (validGps) {
|
} else if (validGps) {
|
||||||
// Transforming from Degree to Radians and calculation geocentric latitude from geodetic
|
// Transforming from Degree to Radians and calculation geocentric latitude from geodetic
|
||||||
gdLongitude = gpsLongitude * PI / 180.;
|
gdLongitude = gpsLongitude * M_PI / 180.;
|
||||||
double latitudeRad = gpsLatitude * PI / 180.;
|
double latitudeRad = gpsLatitude * M_PI / 180.;
|
||||||
double factor = 1 - pow(ECCENTRICITY_WGS84, 2);
|
double factor = 1 - pow(ECCENTRICITY_WGS84, 2);
|
||||||
gcLatitude = atan(factor * tan(latitudeRad));
|
gcLatitude = atan(factor * tan(latitudeRad));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user