本文整理汇总了C++中SatIDSet::insert方法的典型用法代码示例。如果您正苦于以下问题:C++ SatIDSet::insert方法的具体用法?C++ SatIDSet::insert怎么用?C++ SatIDSet::insert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SatIDSet
的用法示例。
在下文中一共展示了SatIDSet::insert方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: value
// Returns a satTypeValueMap object, filtering the target observables.
//
// @param gData Data object holding the data.
//
satTypeValueMap& SimpleFilter::Process(satTypeValueMap& gData)
throw(ProcessingException)
{
try
{
SatIDSet satRejectedSet;
// Check all the indicated TypeID's
TypeIDSet::const_iterator pos;
for (pos = filterTypeSet.begin(); pos != filterTypeSet.end(); ++pos)
{
double value(0.0);
// Loop through all the satellites
satTypeValueMap::iterator it;
for (it = gData.begin(); it != gData.end(); ++it)
{
try
{
// Try to extract the values
value = (*it).second(*pos);
// Now, check that the value is within bounds
if ( !( checkValue(value) ) )
{
// If value is out of bounds, then schedule this
// satellite for removal
satRejectedSet.insert( (*it).first );
}
}
catch(...)
{
// If some value is missing, then schedule this satellite
// for removal
satRejectedSet.insert( (*it).first );
}
}
// Before checking next TypeID, let's remove satellites with
// data out of bounds
gData.removeSatID(satRejectedSet);
}
return gData;
}
catch(Exception& u)
{
// Throw an exception if something unexpected happens
ProcessingException e( getClassName() + ":"
+ u.what() );
GPSTK_THROW(e);
}
} // End of 'SimpleFilter::Process()'
示例2: checkLimits
// This method checks the limits and modifies 'gData' accordingly.
void SolverPPPFB::checkLimits( gnssRinex& gData,
double codeLimit,
double phaseLimit )
{
// Set to store rejected satellites
SatIDSet satRejectedSet;
// Let's check limits
for( satTypeValueMap::iterator it = gData.body.begin();
it != gData.body.end();
++it )
{
// Check postfit values and mark satellites as rejected
if( std::abs((*it).second( TypeID::postfitC )) > codeLimit )
{
satRejectedSet.insert( (*it).first );
}
if( std::abs((*it).second( TypeID::postfitL )) > phaseLimit )
{
satRejectedSet.insert( (*it).first );
}
} // End of 'for( satTypeValueMap::iterator it = gds.body.begin();...'
// Update the number of rejected measurements
rejectedMeasurements += satRejectedSet.size();
// Remove satellites with missing data
gData.removeSatID(satRejectedSet);
} // End of method 'SolverPPPFB::checkLimits()'
示例3: e
/* Returns a satTypeValueMap object, adding the new data generated
* when calling this object.
*
* @param gData Data object holding the data.
*/
satTypeValueMap& ComputeMelbourneWubbena::Process(satTypeValueMap& gData)
throw(ProcessingException)
{
try
{
double value1(0.0);
double value2(0.0);
double value3(0.0);
double value4(0.0);
SatIDSet satRejectedSet;
// Loop through all the satellites
satTypeValueMap::iterator it;
for (it = gData.begin(); it != gData.end(); ++it)
{
try
{
// Try to extract the values
value1 = (*it).second(type1);
value2 = (*it).second(type2);
value3 = (*it).second(type3);
value4 = (*it).second(type4);
}
catch(...)
{
// If some value is missing, then schedule this satellite
// for removal
satRejectedSet.insert( (*it).first );
continue;
}
// If everything is OK, then get the new value inside
// the structure
(*it).second[resultType] = getCombination( value1,
value2,
value3,
value4 );
}
// Remove satellites with missing data
gData.removeSatID(satRejectedSet);
return gData;
}
catch(Exception& u)
{
// Throw an exception if something unexpected happens
ProcessingException e( getClassName() + ":"
+ StringUtils::asString( getIndex() ) + ":"
+ u.what() );
GPSTK_THROW(e);
}
} // End of method 'ComputeMelbourneWubbena::Process()'
示例4: scaleFact
/* Returns a satTypeValueMap object, adding the new data
* generated when calling this object.
*
* @param time Epoch corresponding to the data.
* @param gData Data object holding the data.
*/
satTypeValueMap& ComputeSimpleWeights::Process( const CommonTime& time,
satTypeValueMap& gData )
throw(ProcessingException)
{
try
{
// If we are using a 5th order Taylor-based differencing filter, the
// corresponding scale factor to convert from covariance matrix to
// double-differenced covariance matrix is 1.509551839.
double scaleFact( 1.509551839 );
// Declare some important constants
double tropoVar( 0.0004 ); // (0.02 m)^2
double multiVar( 0.000025 ); // (0.005 m)^2
// We need a NBTropModel initialized with dummy values
NBTropModel tropoObj(0.0, 0.0, 1);
SatIDSet satRejectedSet;
// Loop through all the satellites
for( satTypeValueMap::iterator it = gData.begin();
it != gData.end();
++it )
{
double elevP( 0.0 );
try
{
elevP = gData.getValue( (*it).first, TypeID::elevation );
}
catch(...)
{
// If some value is missing, then schedule this satellite
// for removal
satRejectedSet.insert( (*it).first );
continue;
}
// If everything is OK, then compute the weight value and
// put it into the GDS structure
double mt( tropoObj.dry_mapping_function(elevP) );
double weight( 1.0 / ( scaleFact*( mt*mt*tropoVar + multiVar ) ) );
(*it).second[TypeID::weight] = weight;
}
// Remove satellites with missing data
gData.removeSatID(satRejectedSet);
return gData;
}
catch(Exception& u)
{
// Throw an exception if something unexpected happens
ProcessingException e( getClassName() + ":"
+ u.what() );
GPSTK_THROW(e);
}
} // End of method 'ComputeSimpleWeightsWeights::Process()'
示例5: sunPos
/* Returns a satTypeValueMap object, adding the new data generated when
* calling this object.
*
* @param time Epoch corresponding to the data.
* @param gData Data object holding the data.
*/
satTypeValueMap& ComputeSatPCenter::Process(const DayTime& time,
satTypeValueMap& gData)
throw(ProcessingException)
{
try
{
// Compute Sun position at this epoch
SunPosition sunPosition;
Triple sunPos(sunPosition.getPosition(time));
// Define a Triple that will hold satellite position, in ECEF
Triple svPos(0.0, 0.0, 0.0);
SatIDSet satRejectedSet;
// Loop through all the satellites
satTypeValueMap::iterator it;
for (it = gData.begin(); it != gData.end(); ++it)
{
// Use ephemeris if satellite position is not already computed
if( ( (*it).second.find(TypeID::satX) == (*it).second.end() ) ||
( (*it).second.find(TypeID::satY) == (*it).second.end() ) ||
( (*it).second.find(TypeID::satZ) == (*it).second.end() ) )
{
if(pEphemeris==NULL)
{
// If ephemeris is missing, then remove all satellites
satRejectedSet.insert( (*it).first );
continue;
}
else
{
// Try to get satellite position
// if it is not already computed
try
{
// For our purposes, position at receive time
// is fine enough
Xvt svPosVel(pEphemeris->getXvt( (*it).first, time ));
// If everything is OK, then continue processing.
svPos[0] = svPosVel.x.theArray[0];
svPos[1] = svPosVel.x.theArray[1];
svPos[2] = svPosVel.x.theArray[2];
}
catch(...)
{
// If satellite is missing, then schedule it
// for removal
satRejectedSet.insert( (*it).first );
continue;
}
}
}
else
{
// Get satellite position out of GDS
svPos[0] = (*it).second[TypeID::satX];
svPos[1] = (*it).second[TypeID::satY];
svPos[2] = (*it).second[TypeID::satZ];
} // End of 'if( ( (*it).second.find(TypeID::satX) == ...'
// Let's get the satellite antenna phase correction value in
// meters, and insert it in the GNSS data structure.
(*it).second[TypeID::satPCenter] =
getSatPCenter((*it).first, time, svPos, sunPos);
} // End of 'for (it = gData.begin(); it != gData.end(); ++it)'
// Remove satellites with missing data
gData.removeSatID(satRejectedSet);
return gData;
}
catch(Exception& u)
{
// Throw an exception if something unexpected happens
//.........这里部分代码省略.........
示例6: threshold
/* Returns a satTypeValueMap object, adding the new data generated
* when calling this object.
*
* @param epoch Time of observations.
* @param gData Data object holding the data.
*/
satTypeValueMap& EclipsedSatFilter::Process( const CommonTime& epoch,
satTypeValueMap& gData )
throw(ProcessingException)
{
try
{
SatIDSet satRejectedSet;
// Set the threshold to declare that satellites are in eclipse
// threshold = cos(180 - coneAngle/2)
double threshold( std::cos(PI - coneAngle/2.0*DEG_TO_RAD) );
// Compute Sun position at this epoch, and store it in a Triple
SunPosition sunPosition;
Triple sunPos(sunPosition.getPosition(epoch));
// Define a Triple that will hold satellite position, in ECEF
Triple svPos(0.0, 0.0, 0.0);
// Loop through all the satellites
satTypeValueMap::iterator it;
for (it = gData.begin(); it != gData.end(); ++it)
{
// Check if satellite position is not already computed
if( ( (*it).second.find(TypeID::satX) == (*it).second.end() ) ||
( (*it).second.find(TypeID::satY) == (*it).second.end() ) ||
( (*it).second.find(TypeID::satZ) == (*it).second.end() ) )
{
// If satellite position is missing, then schedule this
// satellite for removal
satRejectedSet.insert( (*it).first );
continue;
}
else
{
// Get satellite position out of GDS
svPos[0] = (*it).second[TypeID::satX];
svPos[1] = (*it).second[TypeID::satY];
svPos[2] = (*it).second[TypeID::satZ];
}
// Unitary vector from Earth mass center to satellite
Triple rk( svPos.unitVector() );
// Unitary vector from Earth mass center to Sun
Triple ri( sunPos.unitVector() );
// Get dot product between unitary vectors = cosine(angle)
double cosAngle(ri.dot(rk));
// Check if satellite is within shadow
if(cosAngle <= threshold)
{
// If satellite is eclipsed, then schedule it for removal
satRejectedSet.insert( (*it).first );
// Keep track of last known epoch the satellite was in eclipse
shadowEpoch[(*it).first] = epoch;
continue;
}
else
{
// Maybe the satellite is out fo shadow, but it was recently
// in eclipse. Check also that.
if( shadowEpoch.find( (*it).first ) != shadowEpoch.end() )
{
// If satellite was recently in eclipse, check if elapsed
// time is less or equal than postShadowPeriod
if( std::abs( ( epoch - shadowEpoch[(*it).first] ) ) <=
postShadowPeriod )
{
// Satellite left shadow, but too recently. Delete it
satRejectedSet.insert( (*it).first );
}
else
{
// If satellite left shadow a long time ago, set it free
shadowEpoch.erase( (*it).first );
}
}
}
}
// Remove satellites with missing data
gData.removeSatID(satRejectedSet);
return gData;
}
//.........这里部分代码省略.........
示例7: maxElevation
// Returns a reference to a gnssSatTypeValue object after differencing the
// data type values given in the diffTypes field with respect to reference
// satellite data.
//
// @param gData Data object holding the data.
//
satTypeValueMap& NablaOp::Process(satTypeValueMap& gData)
throw(ProcessingException)
{
try
{
double maxElevation(0.0);
// If configured to do so, let's look for reference satellite
if (lookReferenceSat)
{
// Loop through all satellites in reference station data set,
// looking for reference satellite
satTypeValueMap::iterator it;
for (it = gData.begin(); it != gData.end(); ++it)
{
// The satellite with the highest elevation will usually be
// the reference satellite
if ( gData((*it).first)(TypeID::elevation) > maxElevation )
{
refSat = (*it).first;
maxElevation = gData((*it).first)(TypeID::elevation);
}
}
} // End of 'if (lookReferenceSat)'
// We will use reference satellite data as reference data
satTypeValueMap refData(gData.extractSatID(refSat));
// We must remove reference satellite data from data set
gData.removeSatID(refSat);
SatIDSet satRejectedSet;
// Loop through all the satellites in station data set
satTypeValueMap::iterator it;
for (it = gData.begin(); it != gData.end(); ++it)
{
// We must compute the difference for all types in
// 'diffTypes' set
TypeIDSet::const_iterator itType;
for(itType = diffTypes.begin(); itType != diffTypes.end(); ++itType)
{
double value1(0.0);
double value2(0.0);
try
{
// Let's try to compute the difference
value1 = gData((*it).first)(*itType);
value2 = refData(refSat)(*itType);
// Get difference into data structure
gData((*it).first)((*itType)) = value1 - value2;
}
catch(...)
{
// If some value is missing, then schedule this satellite
// for removal
satRejectedSet.insert( (*it).first );
continue;
}
} // End of 'for(itType = diffTypes.begin(); ...'
} // End of 'for (it = gData.begin(); it != gData.end(); ++it)'
// Remove satellites with missing data
gData.removeSatID(satRejectedSet);
return gData;
}
catch(Exception& u)
{
//.........这里部分代码省略.........
示例8: e
/* Returns a satTypeValueMap object, adding the new data generated
* when calling this object.
*
* @param epoch Time of observations.
* @param gData Data object holding the data.
* @param epochflag Epoch flag.
*/
satTypeValueMap& LICSDetector::Process( const CommonTime& epoch,
satTypeValueMap& gData,
const short& epochflag )
throw(ProcessingException)
{
try
{
double value1(0.0);
double lli1(0.0);
double lli2(0.0);
SatIDSet satRejectedSet;
// Loop through all the satellites
satTypeValueMap::iterator it;
for (it = gData.begin(); it != gData.end(); ++it)
{
try
{
// Try to extract the values
value1 = (*it).second(obsType);
}
catch(...)
{
// If some value is missing, then schedule this satellite
// for removal
satRejectedSet.insert( (*it).first );
continue;
}
if (useLLI)
{
try
{
// Try to get the LLI1 index
lli1 = (*it).second(lliType1);
}
catch(...)
{
// If LLI #1 is not found, set it to zero
// You REALLY want to have BOTH LLI indexes properly set
lli1 = 0.0;
}
try
{
// Try to get the LLI2 index
lli2 = (*it).second(lliType2);
}
catch(...)
{
// If LLI #2 is not found, set it to zero
// You REALLY want to have BOTH LLI indexes properly set
lli2 = 0.0;
}
}
// If everything is OK, then get the new values inside the
// structure. This way of computing it allows concatenation of
// several different cycle slip detectors
(*it).second[resultType1] += getDetection( epoch,
(*it).first,
(*it).second,
epochflag,
value1,
lli1,
lli2 );
if ( (*it).second[resultType1] > 1.0 )
{
(*it).second[resultType1] = 1.0;
}
// We will mark both cycle slip flags
(*it).second[resultType2] = (*it).second[resultType1];
}
// Remove satellites with missing data
gData.removeSatID(satRejectedSet);
return gData;
}
catch(Exception& u)
{
// Throw an exception if something unexpected happens
ProcessingException e( getClassName() + ":"
+ u.what() );
GPSTK_THROW(e);
//.........这里部分代码省略.........
示例9: weight
/* Returns a satTypeValueMap object, adding the new data generated
* when calling this object.
*
* @param gData Data object holding the data.
*/
satTypeValueMap& ComputeIURAWeights::Process( const DayTime& time,
satTypeValueMap& gData )
throw(ProcessingException)
{
try
{
// By default set the wight as a very small value
double weight(0.000001);
SatIDSet satRejectedSet;
// Loop through all the satellites
satTypeValueMap::iterator it;
for( it = gData.begin(); it != gData.end(); ++it )
{
try
{
// Try to extract the weight value
if( pBCEphemeris != NULL )
{
weight = getWeight( ((*it).first), time, pBCEphemeris );
}
else
{
if( pTabEphemeris != NULL )
{
weight = getWeight( ((*it).first), time, pTabEphemeris );
}
}
}
catch(...)
{
// If some value is missing, then schedule this
// satellite for removal
satRejectedSet.insert( (*it).first );
continue;
}
// If everything is OK, then get the new value inside
// the GDS structure
(*it).second[TypeID::weight] = weight;
} // End of 'for( it = gData.begin(); it != gData.end(); ++it )'
// Remove satellites with missing data
gData.removeSatID(satRejectedSet);
return gData;
}
catch(Exception& u)
{
// Throw an exception if something unexpected happens
ProcessingException e( getClassName() + ":"
+ StringUtils::asString( getIndex() ) + ":"
+ u.what() );
GPSTK_THROW(e);
}
} // End of method 'ComputeIURAWeights::Process()'
示例10: codeObs
/* Returns a satTypeValueMap object, adding the new data generated
* when calling this object.
*
* @param gData Data object holding the data.
*/
satTypeValueMap& CodeSmoother::Process(satTypeValueMap& gData)
throw(ProcessingException)
{
try
{
double codeObs(0.0);
double phaseObs(0.0);
double flagObs(0.0);
SatIDSet satRejectedSet;
// Loop through all satellites
satTypeValueMap::iterator it;
for (it = gData.begin(); it != gData.end(); ++it)
{
try
{
// Try to extract the values
codeObs = (*it).second(codeType);
phaseObs = (*it).second(phaseType);
flagObs = (*it).second(csFlag);
}
catch(...)
{
// If some value is missing, then schedule this satellite
// for removal
satRejectedSet.insert( (*it).first );
continue;
}
// If everything is OK, then call smoothing function
(*it).second[resultType] = getSmoothing( (*it).first,
codeObs,
phaseObs,
flagObs );
}
// Remove satellites with missing data
gData.removeSatID(satRejectedSet);
return gData;
}
catch(Exception& u)
{
// Throw an exception if something unexpected happens
ProcessingException e( getClassName() + ":"
+ StringUtils::asString( getIndex() ) + ":"
+ u.what() );
GPSTK_THROW(e);
}
} // End of method 'CodeSmoother::Process()'
示例11: csflag
/* Returns a satTypeValueMap object, adding the new data generated
* when calling this object.
*
* @param epoch Time of observations.
* @param gData Data object holding the data.
*/
satTypeValueMap& PhaseCodeAlignment::Process( const CommonTime& epoch,
satTypeValueMap& gData )
throw(ProcessingException)
{
try
{
SatIDSet satRejectedSet;
// Loop through all the satellites
for( satTypeValueMap::iterator it = gData.begin();
it != gData.end();
++it )
{
// Check if satellite currently has entries
std::map<SatID, alignData>::const_iterator itDat(
svData.find( (*it).first ) );
if( itDat == svData.end() )
{
// If it doesn't have an entry, insert one
alignData aData;
svData[ (*it).first ] = aData;
}
// Place to store if there was a cycle slip. False by default
bool csflag(false);
// Check if we want to use satellite arcs of cycle slip flags
if(useSatArcs)
{
double arcN(0.0);
try
{
// Try to extract the satellite arc value
arcN = (*it).second(TypeID::satArc);
}
catch(...)
{
// If satellite arc is missing, then schedule this
// satellite for removal
satRejectedSet.insert( (*it).first );
continue;
}
// Check if satellite arc has changed
if( svData[(*it).first].arcNumber != arcN )
{
// Set flag
csflag = true;
// Update satellite arc information
svData[(*it).first].arcNumber = arcN;
}
} // End of first part of 'if(useSatArcs)'
else
{
double flag(0.0);
try
{
// Try to extract the CS flag value
flag = (*it).second(watchCSFlag);
}
catch(...)
{
// If flag is missing, then schedule this satellite
// for removal
satRejectedSet.insert( (*it).first );
continue;
}
//.........这里部分代码省略.........
示例12: elevation
/** Returns a satTypeValueMap object, adding the new data generated when
* calling a modeling object.
*
* @param time Epoch.
* @param gData Data object holding the data.
*/
satTypeValueMap& IonexModel::Process( const DayTime& time,
satTypeValueMap& gData )
throw(Exception)
{
SatIDSet satRejectedSet;
try
{
// Loop through all the satellites
satTypeValueMap::iterator stv;
for(stv = gData.begin(); stv != gData.end(); ++stv)
{
// First check if ionex maps were set
if(pDefaultMaps==NULL)
{
// If ionex maps are missing, then remove all satellites
satRejectedSet.insert( stv->first );
continue;
}
// If elevation or azimuth is missing, then remove satellite
if( stv->second.find(TypeID::elevation) == stv->second.end() ||
stv->second.find(TypeID::azimuth) == stv->second.end() )
{
satRejectedSet.insert( stv->first );
continue;
}
else
{
// Scalars to hold satellite elevation, azimuth, ionospheric
// map and ionospheric slant delays
double elevation( stv->second(TypeID::elevation) );
double azimuth( stv->second(TypeID::azimuth) );
double ionoMap(0.0);
double ionexL1(0.0), ionexL2(0.0), ionexL5(0.0); // GPS
double ionexL6(0.0), ionexL7(0.0), ionexL8(0.0); // Galileo
// calculate the position of the ionospheric pierce-point
// corresponding to the receiver-satellite ray
Position IPP = rxPos.getIonosphericPiercePoint( elevation,
azimuth,
ionoHeight);
// TODO
// Checking the collinearity of rxPos, IPP and SV
// Let's get TEC, RMS and ionosphere height for IPP
// at current epoch
Position pos(IPP);
pos.transformTo(Position::Geocentric);
Triple val = pDefaultMaps->getIonexValue( time, pos );
// just to make it handy for useage
double tecval = val[0];
try
{
ionoMap = pDefaultMaps->iono_mapping_function( elevation,
ionoMapType);
// Compute ionospheric slant correction
ionexL1 = pDefaultMaps->getIonoL1( elevation,
tecval,
ionoMapType);
ionexL2 = pDefaultMaps->getIonoL2( elevation,
tecval,
ionoMapType);
ionexL5 = pDefaultMaps->getIonoL5( elevation,
tecval,
ionoMapType);
ionexL6 = pDefaultMaps->getIonoL6( elevation,
tecval,
ionoMapType);
ionexL7 = pDefaultMaps->getIonoL7( elevation,
tecval,
ionoMapType);
ionexL8 = pDefaultMaps->getIonoL8( elevation,
//.........这里部分代码省略.........
示例13: flag
/* Returns a satTypeValueMap object, adding the new data generated
* when calling this object.
*
* @param epoch Time of observations.
* @param gData Data object holding the data.
*/
satTypeValueMap& SatArcMarker::Process( const CommonTime& epoch,
satTypeValueMap& gData )
throw(ProcessingException)
{
try
{
double flag(0.0);
SatIDSet satRejectedSet;
// Loop through all the satellites
for ( satTypeValueMap::iterator it = gData.begin();
it != gData.end();
++it )
{
try
{
// Try to extract the CS flag value
flag = (*it).second(watchCSFlag);
}
catch(...)
{
// If flag is missing, then schedule this satellite
// for removal
satRejectedSet.insert( (*it).first );
continue;
}
// Check if satellite currently has entries
std::map<SatID, double>::const_iterator itArc(
satArcMap.find( (*it).first ) );
if( itArc == satArcMap.end() )
{
// If it doesn't have an entry, insert one
satArcMap[ (*it).first ] = 0.0;
satArcChangeMap[ (*it).first ] = CommonTime::BEGINNING_OF_TIME;
// This is a new satellite
satIsNewMap[ (*it).first ] = true;
}
// Check if we are inside unstable period
bool insideUnstable(std::abs(epoch-satArcChangeMap[(*it).first]) <=
unstablePeriod );
// Satellites can be new only once, and having at least once a
// flag > 0.0 outside 'unstablePeriod' will make them old.
if( satIsNewMap[ (*it).first ] &&
!insideUnstable &&
flag <= 0.0 )
{
satIsNewMap[ (*it).first ] = false;
}
// Check if there was a cycle slip
if ( flag > 0.0 )
{
// Increment the value of "TypeID::satArc"
satArcMap[ (*it).first ] = satArcMap[ (*it).first ] + 1.0;
// Update arc change epoch
satArcChangeMap[ (*it).first ] = epoch;
// If we want to delete unstable satellites, we must do it
// also when arc changes, but only if this SV is not new
if ( deleteUnstableSats &&
(!satIsNewMap[ (*it).first ]) )
{
satRejectedSet.insert( (*it).first );
}
}
// Test if we want to delete unstable satellites. Only do it
// if satellite is NOT new and we are inside unstable period
if ( insideUnstable &&
deleteUnstableSats &&
( !satIsNewMap[ (*it).first ] ) )
{
satRejectedSet.insert( (*it).first );
}
// We will insert satellite arc number
(*it).second[TypeID::satArc] = satArcMap[ (*it).first ];
}
// Remove satellites with missing data
gData.removeSatID(satRejectedSet);
//.........这里部分代码省略.........
示例14: observable
/* Returns a satTypeValueMap object, adding the new data generated when
* calling a modeling object.
*
* @param time Epoch.
* @param gData Data object holding the data.
*/
satTypeValueMap& BasicModel::Process( const DayTime& time,
satTypeValueMap& gData )
throw(ProcessingException)
{
try
{
SatIDSet satRejectedSet;
// Loop through all the satellites
satTypeValueMap::iterator stv;
for( stv = gData.begin();
stv != gData.end();
++stv )
{
// Scalar to hold temporal value
double observable( (*stv).second(defaultObservable) );
// A lot of the work is done by a CorrectedEphemerisRange object
CorrectedEphemerisRange cerange;
try
{
// Compute most of the parameters
cerange.ComputeAtTransmitTime( time,
observable,
rxPos,
(*stv).first,
*(getDefaultEphemeris()) );
}
catch(InvalidRequest& e)
{
// If some problem appears, then schedule this satellite
// for removal
satRejectedSet.insert( (*stv).first );
continue; // Skip this SV if problems arise
}
// Let's test if satellite has enough elevation over horizon
if ( rxPos.elevationGeodetic(cerange.svPosVel) < minElev )
{
// Mark this satellite if it doesn't have enough elevation
satRejectedSet.insert( (*stv).first );
continue;
}
// Computing Total Group Delay (TGD - meters), if possible
double tempTGD(getTGDCorrections( time,
(*pDefaultEphemeris),
(*stv).first ) );
// Now we have to add the new values to the data structure
(*stv).second[TypeID::dtSat] = cerange.svclkbias;
// Now, lets insert the geometry matrix
(*stv).second[TypeID::dx] = cerange.cosines[0];
(*stv).second[TypeID::dy] = cerange.cosines[1];
(*stv).second[TypeID::dz] = cerange.cosines[2];
// When using pseudorange method, this is 1.0
(*stv).second[TypeID::cdt] = 1.0;
// Now we have to add the new values to the data structure
(*stv).second[TypeID::rho] = cerange.rawrange;
(*stv).second[TypeID::rel] = -cerange.relativity;
(*stv).second[TypeID::elevation] = cerange.elevationGeodetic;
(*stv).second[TypeID::azimuth] = cerange.azimuthGeodetic;
// Let's insert satellite position at transmission time
(*stv).second[TypeID::satX] = cerange.svPosVel.x[0];
(*stv).second[TypeID::satY] = cerange.svPosVel.x[1];
(*stv).second[TypeID::satZ] = cerange.svPosVel.x[2];
// Let's insert satellite velocity at transmission time
(*stv).second[TypeID::satVX] = cerange.svPosVel.v[0];
(*stv).second[TypeID::satVY] = cerange.svPosVel.v[1];
(*stv).second[TypeID::satVZ] = cerange.svPosVel.v[2];
// Apply correction to C1 observable, if appropriate
if(useTGD)
{
// Look for C1
if( (*stv).second.find(TypeID::C1) != (*stv).second.end() )
{
(*stv).second[TypeID::C1] =
(*stv).second[TypeID::C1] - tempTGD;
};
};
//.........这里部分代码省略.........
示例15: e
/* Returns a reference to a satTypeValueMap object after differencing
* data type values given in 'diffTypes' field with respect to
* reference station data in 'refData' field.
*
* @param gData Data object holding the data.
*/
satTypeValueMap& DeltaOp::Process(satTypeValueMap& gData)
throw(ProcessingException)
{
try
{
SatIDSet satRejectedSet;
// Loop through all the satellites in the station data set
satTypeValueMap::iterator it;
for (it = gData.begin(); it != gData.end(); ++it)
{
// Let's find if the same satellite is present in refData
satTypeValueMap::const_iterator itref;
itref = refData.find((*it).first);
// If we found the satellite, let's proceed with the differences
if (itref != refData.end())
{
// We must compute the difference for all the types in
// 'diffTypes' set
TypeIDSet::const_iterator itType;
for( itType = diffTypes.begin();
itType != diffTypes.end();
++itType )
{
double value1(0.0);
double value2(0.0);
try
{
// Let's try to compute the difference
value1 = gData((*it).first)(*itType);
value2 = refData((*it).first)(*itType);
// Get difference into data structure
gData((*it).first)((*itType)) = value1 - value2;
}
catch(...)
{
// If some value is missing, then schedule this
// satellite for removal
satRejectedSet.insert( (*it).first );
// Skip this value if problems arise
continue;
}
} // End of 'for( itType = diffTypes.begin(); ...'
// update CSFlag
if(updateCSFlag)
{
double CSValue1 = gData[it->first][TypeID::CSL1]
+refData[it->first][TypeID::CSL1];
double CSValue2 = gData[it->first][TypeID::CSL2]
+refData[it->first][TypeID::CSL2];
gData[it->first][TypeID::CSL1] = (CSValue1 > 0.0) ? 1.0 : 0.0;
gData[it->first][TypeID::CSL2] = (CSValue2 > 0.0) ? 1.0 : 0.0;
} // End of 'if(updateCSFlag)'
}
else
{
// If we didn't find the same satellite in both sets, mark
// it for deletion
satRejectedSet.insert( (*it).first );
continue;
} // End of 'if (itref != refData.end())'
} // End of 'for (it = gData.begin(); it != gData.end(); ++it)'
// If ordered so, delete the missing satellites
if (deleteMissingSats)
{
gData.removeSatID(satRejectedSet);
}
return gData;
//.........这里部分代码省略.........