Skip to content

Commit

Permalink
GnssSignalBias2SinexBias: Fixed issue with unknown phase observation …
Browse files Browse the repository at this point in the history
…types missing in output file.
  • Loading branch information
sestras authored and tmayerguerr committed Feb 2, 2021
1 parent be0b86d commit aa9eb66
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions source/programs/conversion/gnss/gnssSignalBias2SinexBias.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,16 @@ void GnssSignalBias2SinexBias::readData(std::vector<Data> &data) const
try
{
readFileGnssSignalBias(iter->inNameBias, iter->biases);

// replace unknown attributes with X (code) or * (phase)
for(auto &type : iter->biases.type)
if(type == (GnssType::GALILEO + GnssType::UNKNOWN_ATTRIBUTE))
type = (type & ~GnssType::ATTRIBUTE) + GnssType::X;
if((type.type & GnssType::ATTRIBUTE.type) == GnssType::UNKNOWN_ATTRIBUTE.type)
{
type = (type & ~GnssType::ATTRIBUTE);
if(type == GnssType::RANGE)
type += GnssType::X;
}

for(auto &&bias : iter->timeVariableBiases)
{
try
Expand Down Expand Up @@ -204,6 +211,8 @@ void GnssSignalBias2SinexBias::writeData(OutFile &file, const Time &timeStart, c
// GLONASS station bias per satellite
if(isStation && type == GnssType::GLONASS && type.frequencyNumber() != 9999)
{
if(freqNo2prns.find(type.frequencyNumber()) == freqNo2prns.end())
return;
for(const auto &prn : freqNo2prns.at(type.frequencyNumber()))
writeLine(file, timeStart, timeEnd, prn, getSvn(prn), stationName, type, "ns", bias/LIGHT_VELOCITY*1e9, 0, biasSlope/LIGHT_VELOCITY*1e9, 0);
return;
Expand All @@ -220,6 +229,8 @@ void GnssSignalBias2SinexBias::writeData(OutFile &file, const Time &timeStart, c
// GLONASS station bias per satellite
if(isStation && type == GnssType::GLONASS && type.frequencyNumber() != 9999)
{
if(freqNo2prns.find(type.frequencyNumber()) == freqNo2prns.end())
continue;
for(const auto &prn : freqNo2prns.at(type.frequencyNumber()))
writeLine(file, timeStart, timeEnd, prn, getSvn(prn), stationName, (type2 & ~GnssType::TYPE) + GnssType::PHASE,
"ns", bias/LIGHT_VELOCITY*1e9, 0, biasSlope/LIGHT_VELOCITY*1e9, 0);
Expand Down

0 comments on commit aa9eb66

Please sign in to comment.