Go to the documentation of this file.
61 pos.transformTo(geocentric ? Position::Geocentric : Position::Geodetic);
63 double lat = (geocentric ?
pos.getGeocentricLatitude()
66 double ca =
::cos(lat);
67 double sa =
::sin(lat);
68 double co =
::cos(lon);
72 R(0,0) = -sa*co; R(0,1) = -sa*
so; R(0,2) = ca;
73 R(1,0) = -
so; R(1,1) = co; R(1,2) = 0.;
74 R(2,0) = ca*co; R(2,1) = ca*
so; R(2,2) = sa;
86 Exception E(
"std except: " +
string(e.what()));
115 for(
int i=0; i<3; i++) {
double r=R(0,i); R(0,i)=R(2,i); R(2,i)=r; }
119 catch(exception& e) {
120 Exception E(
"std except: " +
string(e.what()));
185 double shadowFactor(
double angRadEarth,
double angRadSun,
double angSeparation)
188 if(angSeparation >= angRadEarth+angRadSun)
192 if(angSeparation <= fabs(angRadEarth-angRadSun))
196 double r=angRadSun, R=angRadEarth, L=angSeparation;
197 if(angRadSun > angRadEarth)
199 r=angRadEarth; R=angRadSun;
201 double cosalpha = (R/L)*(1.0+(L/R)*(L/R)-(r/R)*(r/R))/2.0;
202 double cosbeta = (L/r) - (R/r)*cosalpha;
203 double sinalpha = ::sqrt(1.0-cosalpha*cosalpha);
204 double sinbeta = ::sqrt(1.0-cosbeta*cosbeta);
205 double alpha = ::asin(sinalpha);
206 double beta = ::asin(sinbeta);
207 double shadow = r*r*(
beta-sinbeta*cosbeta)+R*R*(alpha-sinalpha*cosalpha);
208 shadow /= ::acos(-1.0)*angRadSun*angRadSun;
212 catch(exception& e) {
213 Exception E(
"std except: " +
string(e.what()));
228 double svrange = z.
mag();
229 double d = -1.0/svrange;
235 double dSun = sSun.
radius();
241 double sesa = ::acos(-z.dot(sSun));
244 double angRadSun =
DEG_TO_RAD * 0.2666 / (dSun/149598.0e6);
246 double angRadEarth = ::asin(6378137.0/svrange);
277 double d = -1.0/sSat.
mag();
303 for(
int i=0; i<3; i++) {
314 Exception E(
"std except: " +
string(e.what()));
334 double svrange, angmom;
340 Z =
pos*(-1.0/svrange);
347 Y.transformTo(Position::Cartesian);
384 if(rot.
rows() != 3 || rot.
cols() != 3) {
396 Exception e(
"Satellite and receiver positions identical.");
408 azimuth = ::atan2(body(1),body(0)) *
RAD_TO_DEG;
409 if(azimuth < 0.0) azimuth += 360.;
412 catch(exception& e) {
413 Exception E(
"std except: " +
string(e.what()));
434 d = 1.0/sSun.mag(); sSun = sSun * d;
435 d = 1.0/sSat.
mag(); sSat = sSat * d;
438 return (::acos(sSat.
dot(sSun)));
441 catch(exception& e) {
442 Exception E(
"std except: " +
string(e.what()));
466 double&
beta,
double& phi)
475 inertialV.
setECEF(satV.X()-omega*satR.Y(),satV.Y()+omega*satR.X(),satV.Z());
483 d = 1.0/sSun.
mag(); sSun = sSun * d;
484 d = 1.0/sSat.
mag(); sSat = d * sSat;
485 d = 1.0/sVel.
mag(); sVel = d * sVel;
488 u = sSat.
cross(sVel);
491 double udotsun(u.
dot(sSun));
492 beta =
PI/2.0 - ::acos(udotsun);
500 w = sSun - udotsun*u;
505 phi = ::acos(sSat.dot(w));
506 if(sSat.dot(u.cross(w)) < 0.0)
515 catch(exception& e) {
516 Exception E(
"std except: " +
string(e.what()));
535 const Position& sun,
const bool& blkIIRF,
double& yawrate)
547 yaw = ::atan2(tanb, -sinmu);
549 yaw = ::atan2(-tanb, sinmu);
555 yawrate = orbv * tanb * cosmu / (sinmu*sinmu+tanb*tanb);
double satelliteYawAngle(const Position &pos, const Position &vel, const Position &sun, const bool &blkIIRF, double &yawrate)
Matrix< double > northEastUp(Position &pos, bool geocentric)
Same as upEastNorth(), but with rows re-ordered.
Position & transformTo(CoordinateSystem sys) noexcept
Matrix< double > northEastUpGeocentric(Position &pos)
Same as northEastUp(pos, true).
virtual double angVelocity() const noexcept
Matrix< double > upEastNorthGeodetic(Position &pos)
Same as upEastNorth, but using geodetic coordinates.
@ Y
Encrypted legacy GPS precise code.
size_t cols() const
The number of columns in the matrix.
double Y() const noexcept
return Y coordinate (meters)
double Z() const noexcept
return Z coordinate (meters)
const double TWO_PI
GPS value of PI*2.
size_t rows() const
The number of rows in the matrix.
Matrix< double > upEastNorth(Position &pos, bool geocentric)
const double PI
GPS value of PI; also specified by GAL.
Position & asECEF() noexcept
double sin(gnsstk::Angle x)
double shadowFactor(const Position &sv, const Position &sun)
Position & setECEF(const double X, const double Y, const double Z) noexcept
double dot(const Triple &right) const noexcept
void satelliteNadirAzimuthAngles(const Position &sv, const Position &rx, const Matrix< double > &rot, double &nadir, double &azimuth)
static const double RAD_TO_DEG
Conversion Factor from radians to degrees (units: degrees)
Matrix< double > satelliteAttitude(const Position &sat, const Position &sun)
double radius() const noexcept
double satelliteEarthSunAngle(const Position &sat, const Position &sun)
double cos(gnsstk::Angle x)
double beta(double x, double y)
#define GNSSTK_RETHROW(exc)
Matrix< double > orbitNormalAttitude(const Position &pos, const Position &vel)
double X() const noexcept
return X coordinate (meters)
double tan(gnsstk::Angle x)
Matrix< double > upEastNorthGeocentric(Position &pos)
void sunOrbitAngles(const Position &pos, const Position &vel, const Position &sun, double &beta, double &phi)
page HOWTO subpage DoxygenGuide Documenting Your Code page DoxygenGuide Documenting Your Code todo Flesh out this document section doctips Tips for Documenting When defining make sure that the prototype is identical between the cpp and hpp including both the namespaces and the parameter names for you have std::string as the return type in the hpp file and string as the return type in the cpp Doxygen may get confused and autolink to the cpp version with no documentation If you don t use the same parameter names between the cpp and hpp that will also confuse Doxygen Don t put type information in return or param documentation It doesn t really add anything and will often cause Doxygen to complain and not produce the documentation< br > use note Do not put a comma after a param name unless you mean to document multiple parameters< br/> the output stream</code >< br/> z the ECEF position of the antenna</code > Don t put your Doxygen documentation for shared functions methods in the cpp put it in the hpp group them like so
Triple cross(const Triple &right) const noexcept
Matrix< double > northEastUpGeodetic(Position &pos)
Same as northEastUp(pos, false).
#define GNSSTK_THROW(exc)
static const double DEG_TO_RAD
Conversion Factor from degrees to radians (units: degrees^-1)
double mag() const noexcept
gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:41