Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/rcv/binex.c
Original file line number Diff line number Diff line change
Expand Up @@ -995,8 +995,8 @@ static uint8_t *decode_bnx_7f_05_obs(raw_t *raw, uint8_t *buff, int sat,
freq=code2freq(sys,codes[code[k]],fcn);
data->P[i]=range[k];
data->L[i]=phase[k]*freq/CLIGHT;
data->D[i]=dopp[k];
data->SNR[i]=cnr[k];
data->D[i]=(float)dopp[k];
data->SNR[i]=(float)cnr[k];
data->code[i]=codes[code[k]];
data->LLI[i]=slip[k]?1:0;
mask[k]=1;
Expand All @@ -1016,8 +1016,8 @@ static uint8_t *decode_bnx_7f_05_obs(raw_t *raw, uint8_t *buff, int sat,
freq=code2freq(sys,codes[code[k]],fcn);
data->P[i]=range[k];
data->L[i]=phase[k]*freq/CLIGHT;
data->D[i]=dopp[k];
data->SNR[i]=cnr[k];
data->D[i]=(float)dopp[k];
data->SNR[i]=(float)cnr[k];
data->code[i]=codes[code[k]];
data->LLI[i]=slip[k]?1:0;
mask[k]=1;
Expand Down
6 changes: 3 additions & 3 deletions src/rcv/crescent.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static int decode_cresraw(raw_t *raw)
raw->obs.data[n].P[0]=pr;
raw->obs.data[n].L[0]=cp*freq/CLIGHT;
raw->obs.data[n].D[0]=-(float)(dop*freq/CLIGHT);
raw->obs.data[n].SNR[0]=snr;
raw->obs.data[n].SNR[0]=(float)snr;
raw->obs.data[n].LLI[0]=(uint8_t)lli;
raw->obs.data[n].code[0]=CODE_L1C;

Expand Down Expand Up @@ -256,7 +256,7 @@ static int decode_cresraw2(raw_t *raw)
raw->obs.data[n].P[j]=pr[j]==0.0?0.0:pr[j]-toff;
raw->obs.data[n].L[j]=cp[j]==0.0?0.0:cp[j]-toff*freq[j]/CLIGHT;
raw->obs.data[n].D[j]=-(float)dop[j];
raw->obs.data[n].SNR[j]=snr[j];
raw->obs.data[n].SNR[j]=(float)snr[j];
raw->obs.data[n].LLI[j]=(uint8_t)lli[j];
raw->obs.data[n].code[j]=j==0?CODE_L1C:CODE_L2P;
}
Expand Down Expand Up @@ -461,7 +461,7 @@ static int decode_cresgloraw(raw_t *raw)
raw->obs.data[n].P[j]=pr[j]==0.0?0.0:pr[j]-toff;
raw->obs.data[n].L[j]=cp[j]==0.0?0.0:cp[j]-toff*freq[j]/CLIGHT;
raw->obs.data[n].D[j]=-(float)dop[j];
raw->obs.data[n].SNR[j]=snr[j];
raw->obs.data[n].SNR[j]=(float)snr[j];
raw->obs.data[n].LLI[j]=(uint8_t)lli[j];
raw->obs.data[n].code[j]=j==0?CODE_L1C:CODE_L2P;
}
Expand Down
2 changes: 1 addition & 1 deletion src/rcv/javad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1612,7 +1612,7 @@ static int decode_xE(raw_t *raw, char sig)

if ((idx=checkpri(sys,code,raw->opt,idx))>=0) {
if (!settag(raw->obuf.data+i,raw->time)) continue;
raw->obuf.data[i].SNR[idx]=cnr*0.25;
raw->obuf.data[i].SNR[idx]=(float)(cnr*0.25);
}
}
return 0;
Expand Down
10 changes: 5 additions & 5 deletions src/rcv/novatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ static int obsindex(obs_t *obs, gtime_t time, int sat)
obs->data[i].sat=sat;
for (j=0;j<NFREQ+NEXOBS;j++) {
obs->data[i].L[j]=obs->data[i].P[j]=0.0;
obs->data[i].D[j]=obs->data[i].SNR[j]=0.0;
obs->data[i].D[j]=obs->data[i].SNR[j]=0.0f;
obs->data[i].LLI[j]=0;
obs->data[i].code[j]=CODE_NONE;
}
Expand Down Expand Up @@ -438,7 +438,7 @@ static int decode_rangecmpb(raw_t *raw)
raw->obs.data[index].L [idx]=adr;
raw->obs.data[index].P [idx]=psr;
raw->obs.data[index].D [idx]=(float)dop;
raw->obs.data[index].SNR[idx]=snr;
raw->obs.data[index].SNR[idx]=(float)snr;
raw->obs.data[index].LLI[idx]=(uint8_t)lli;
raw->obs.data[index].code[idx]=(uint8_t)code;
}
Expand Down Expand Up @@ -521,7 +521,7 @@ static int decode_rangeb(raw_t *raw)
raw->obs.data[index].L [idx]=-adr;
raw->obs.data[index].P [idx]=psr;
raw->obs.data[index].D [idx]=(float)dop;
raw->obs.data[index].SNR[idx]=snr;
raw->obs.data[index].SNR[idx]=(float)snr;
raw->obs.data[index].LLI[idx]=(uint8_t)lli;
raw->obs.data[index].code[idx]=(uint8_t)code;
}
Expand Down Expand Up @@ -1113,7 +1113,7 @@ static int decode_rgeb(raw_t *raw)
raw->obs.data[index].L [freq]=-adr; /* flip sign */
raw->obs.data[index].P [freq]=psr;
raw->obs.data[index].D [freq]=(float)dop;
raw->obs.data[index].SNR[freq]=0.0<=snr&&snr<255.0?snr:0;
raw->obs.data[index].SNR[freq]=0.0<=snr&&snr<255.0?(float)snr:0.0f;
raw->obs.data[index].LLI[freq]=(uint8_t)lli;
raw->obs.data[index].code[freq]=freq==0?CODE_L1C:CODE_L2P;
}
Expand Down Expand Up @@ -1178,7 +1178,7 @@ static int decode_rged(raw_t *raw)
raw->obs.data[index].L [freq]=adr;
raw->obs.data[index].P [freq]=psr;
raw->obs.data[index].D [freq]=(float)dop;
raw->obs.data[index].SNR[freq]=snr;
raw->obs.data[index].SNR[freq]=(float)snr;
raw->obs.data[index].LLI[freq]=(uint8_t)lli;
raw->obs.data[index].code[freq]=freq==0?CODE_L1C:CODE_L2P;
}
Expand Down
5 changes: 2 additions & 3 deletions src/rcv/nvs.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ static int decode_xf5raw(raw_t *raw)
{
gtime_t time;
double tadj=0.0,toff=0.0,tn;
int dTowInt;
double dTowUTC, dTowGPS, dTowFrac, L1, P1, D1;
double gpsutcTimescale;
uint8_t rcvTimeScaleCorr, sys, carrNo;
Expand Down Expand Up @@ -105,7 +104,7 @@ static int decode_xf5raw(raw_t *raw)
dTowGPS = dTowUTC + gpsutcTimescale;

/* Tweak pseudoranges to allow Rinex to represent the NVS time of measure */
dTowInt = 10.0*floor((dTowGPS/10.0)+0.5);
int dTowInt = (int)(10.0*floor((dTowGPS/10.0)+0.5));
dTowFrac = dTowGPS - (double) dTowInt;
time=gpst2time(week, dTowInt*0.001);

Expand Down Expand Up @@ -262,7 +261,7 @@ static int decode_gloephem(int sat, raw_t *raw)
geph.acc[0]=R8(p+51) * 1e+6;
geph.acc[1]=R8(p+59) * 1e+6;
geph.acc[2]=R8(p+67) * 1e+6;
tb = R8(p+75) * 1e-3;
tb = (int)(R8(p+75) * 1e-3);
tk = tb;
geph.gamn =R4(p+83);
geph.taun =R4(p+87) * 1e-3;
Expand Down
12 changes: 6 additions & 6 deletions src/rcv/rt17.c
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,7 @@ static int DecodeType17(raw_t *Raw, uint32_t rif)
if (Flags1 & M_BIT6) /* L1 data valid */
{
/* Measure of L1 signal strength (dB * 4) */
obs->SNR[0] = U1(p)*0.25;
obs->SNR[0] = (float)(U1(p)*0.25);
p++;

/* Full L1 C/A code or P-code pseudorange (meters) */
Expand All @@ -1725,7 +1725,7 @@ static int DecodeType17(raw_t *Raw, uint32_t rif)
if (Flags1 & M_BIT0) /* L2 data loaded */
{
/* Measure of L2 signal strength (dB * 4) */
obs->SNR[1] = U1(p)*0.25;
obs->SNR[1] = (float)(U1(p)*0.25);
p++;

/* L2 Continuous Phase (cycles) */
Expand Down Expand Up @@ -1784,7 +1784,7 @@ static int DecodeType17(raw_t *Raw, uint32_t rif)
if (Flags1 & M_BIT6) /* L1 data valid */
{
/* Measure of satellite signal strength (dB) */
obs->SNR[0] = R8(p);
obs->SNR[0] = (float)R8(p);
p += 8;

/* Full L1 C/A code or P-code pseudorange (meters) */
Expand All @@ -1797,7 +1797,7 @@ static int DecodeType17(raw_t *Raw, uint32_t rif)
p += 8;

/* L1 Doppler (Hz) */
obs->D[0] = R8(p);
obs->D[0] = (float)R8(p);
p += 8;

/* Reserved 8 bytes */
Expand All @@ -1807,7 +1807,7 @@ static int DecodeType17(raw_t *Raw, uint32_t rif)
if (Flags1 & M_BIT0) /* L2 data loaded */
{
/* Measure of L2 signal strength (dB) */
obs->SNR[1] = R8(p);
obs->SNR[1] = (float)R8(p);
p += 8;

/* L2 Continuous Phase (cycles) */
Expand All @@ -1833,7 +1833,7 @@ static int DecodeType17(raw_t *Raw, uint32_t rif)
p++; /* U1 Reserved byte */

/* L2 Doppler (Hz) */
obs->D[1] = R8(p);
obs->D[1] = (float)R8(p);
p += 8;
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/rcv/skytraq.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ static int decode_stqraw(raw_t *raw)

raw->obs.data[n].P[0]=pr1;
raw->obs.data[n].L[0]=cp1;
raw->obs.data[n].D[0]=!(ind&2)?0.0:R4(p+18);
raw->obs.data[n].D[0]=!(ind&2)?0.0f:(float)R4(p+18);
raw->obs.data[n].SNR[0]=U1(p+1);
raw->obs.data[n].LLI[0]=0;
raw->obs.data[n].code[0]=sys==SYS_CMP?CODE_L2I:CODE_L1C;
Expand All @@ -289,7 +289,7 @@ static int decode_stqraw(raw_t *raw)

for (j=1;j<NFREQ+NEXOBS;j++) {
raw->obs.data[n].L[j]=raw->obs.data[n].P[j]=0.0;
raw->obs.data[n].D[j]=raw->obs.data[n].SNR[j]=0.0;
raw->obs.data[n].D[j]=raw->obs.data[n].SNR[j]=0.0f;
raw->obs.data[n].LLI[j]=0;
raw->obs.data[n].code[j]=CODE_NONE;
}
Expand All @@ -301,7 +301,7 @@ static int decode_stqraw(raw_t *raw)
/* decode skytraq extended raw measurement data v.1 (0xE5) -------------------*/
static int decode_stqrawx(raw_t *raw)
{
uint8_t *p=raw->buff+4,ind;
uint8_t *p=raw->buff+4;
double tow,peri,pr1,cp1;
int i,j,k,ver,week,nsat,sys,sig,prn,sat,n=0,idx;

Expand Down Expand Up @@ -335,7 +335,7 @@ static int decode_stqrawx(raw_t *raw)
if (sys==SYS_GLO) {
raw->nav.geph[prn-1].frq=(int)(U1(p+2)&0xF)-7;
}
ind=U2(p+27);
uint16_t ind=U2(p+27);
pr1=!(ind&1)?0.0:R8(p+ 4);
cp1=!(ind&4)?0.0:R8(p+12);
cp1-=floor((cp1+1E9)/2E9)*2E9; /* -10^9 < cp1 < 10^9 */
Expand All @@ -349,15 +349,15 @@ static int decode_stqrawx(raw_t *raw)
raw->obs.data[n].rcv=0;
for (k=0;k<NFREQ+NEXOBS;k++) {
raw->obs.data[n].L[k]=raw->obs.data[n].P[k]=0.0;
raw->obs.data[n].D[k]=raw->obs.data[n].SNR[k]=0.0;
raw->obs.data[n].D[k]=raw->obs.data[n].SNR[k]=0.0f;
raw->obs.data[n].LLI[k]=0;
raw->obs.data[n].code[k]=CODE_NONE;
}
n++;
}
raw->obs.data[j].P[idx]=pr1;
raw->obs.data[j].L[idx]=cp1;
raw->obs.data[j].D[idx]=!(ind&2)?0.0:R4(p+20);
raw->obs.data[j].D[idx]=!(ind&2)?0.0f:(float)R4(p+20);
raw->obs.data[j].SNR[idx]=U1(p+3);
raw->obs.data[j].LLI[idx]=0;
raw->obs.data[j].code[idx]=sig;
Expand Down
6 changes: 3 additions & 3 deletions src/rcv/swiftnav.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ static int sisa_index(double value)
else if (value<=0.5) return (int)(value/0.01);
else if (value<=1.0) return (int)((value-0.5)/0.02)+50;
else if (value<=2.0) return (int)((value-1.0)/0.04)+75;
return ((int)(value-2.0)/0.16)+100;
return (int)((value-2.0)/0.16)+100;
}

/* SBP checksum calculation --------------------------------------------------*/
Expand Down Expand Up @@ -533,7 +533,7 @@ static int decode_msgobs(raw_t *raw) {
raw->obuf.data[ii].P[freq] = (flags & 0x1) ? pseudorange : 0.0;
raw->obuf.data[ii].L[freq] = (flags & 0x2) ? carr_phase : 0.0;
raw->obuf.data[ii].D[freq] = (flags & 0x8) ? (float)freq_doppler : 0.0f;
raw->obuf.data[ii].SNR[freq] = cn0_int * 0.25;
raw->obuf.data[ii].SNR[freq] = (float)(cn0_int * 0.25);
raw->obuf.data[ii].code[freq] = code;

if (flags & 0x2) {
Expand Down Expand Up @@ -1570,7 +1570,7 @@ extern int input_sbpjsonf(raw_t *raw, FILE *fp) {
pcPayloadBeg = (uint8_t *)strchr((char *)pcTmp, '\"') + 1;
pcPayloadEnd = (uint8_t *)strchr((char *)pcPayloadBeg, '\"') - 1;
if ((NULL == pcPayloadBeg) || (NULL == pcPayloadEnd)) return 0;
uPayloadSize = pcPayloadEnd - pcPayloadBeg + 1;
uPayloadSize = (uint32_t)(pcPayloadEnd - pcPayloadBeg) + 1;
pcPayloadEnd[1] = 0;
/* fprintf(stderr, "%4d: %s\n", uPayloadSize, pcPayloadBeg); */
memset(puPayloadTmp, 0, sizeof(puPayloadTmp));
Expand Down
26 changes: 13 additions & 13 deletions src/rcv/ublox.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ static int decode_rxmraw(raw_t *raw)

for (j=1;j<NFREQ+NEXOBS;j++) {
raw->obs.data[n].L[j]=raw->obs.data[n].P[j]=0.0;
raw->obs.data[n].D[j]=raw->obs.data[n].SNR[j]=0.0;
raw->obs.data[n].Lstd[j]=raw->obs.data[n].Pstd[j]=0.0;
raw->obs.data[n].D[j]=raw->obs.data[n].SNR[j]=0.0f;
raw->obs.data[n].Lstd[j]=raw->obs.data[n].Pstd[j]=0.0f;
raw->obs.data[n].LLI[j]=0;
raw->obs.data[n].code[j]=CODE_NONE;
}
Expand Down Expand Up @@ -524,19 +524,19 @@ static int decode_rxmrawx(raw_t *raw)
raw->obs.data[n].rcv=0;
for (k=0;k<NFREQ+NEXOBS;k++) {
raw->obs.data[n].L[k]=raw->obs.data[n].P[k]=0.0;
raw->obs.data[n].D[k]=raw->obs.data[n].SNR[k]=0.0;
raw->obs.data[n].Lstd[k]=raw->obs.data[n].Pstd[k]=0.0;
raw->obs.data[n].D[k]=raw->obs.data[n].SNR[k]=0.0f;
raw->obs.data[n].Lstd[k]=raw->obs.data[n].Pstd[k]=0.0f;
raw->obs.data[n].LLI[k]=0;
raw->obs.data[n].code[k]=CODE_NONE;
}
n++;
}
raw->obs.data[j].L[idx]=L;
raw->obs.data[j].P[idx]=P;
raw->obs.data[j].Lstd[idx] = rcvstds ? cpstd * 0.004 : 0;
raw->obs.data[j].Pstd[idx] = rcvstds ? 0.01 * pow(2, prstd) : 0.0;
raw->obs.data[j].Lstd[idx] = rcvstds ? (float)(cpstd * 0.004) : 0.0f;
raw->obs.data[j].Pstd[idx] = rcvstds ? (float)(0.01 * pow(2, prstd)) : 0.0f;
raw->obs.data[j].D[idx]=(float)D;
raw->obs.data[j].SNR[idx]=cn0;
raw->obs.data[j].SNR[idx]=(float)cn0;
raw->obs.data[j].LLI[idx]=(uint8_t)LLI;
raw->obs.data[j].code[idx]=(uint8_t)code;
if (L!=0.0) raw->lockflag[sat-1][idx]=0; /* clear slip carry-forward flag if valid phase*/
Expand Down Expand Up @@ -693,9 +693,9 @@ static int decode_trkmeas(raw_t *raw)
raw->obs.data[n].P[0]=tau*CLIGHT;
raw->obs.data[n].L[0]=-adr;
raw->obs.data[n].D[0]=(float)dop;
raw->obs.data[n].SNR[0]=snr;
raw->obs.data[n].SNR[0]=(float)snr;
raw->obs.data[n].code[0]=sys==SYS_CMP?CODE_L2I:CODE_L1C;
raw->obs.data[n].Lstd[0] = rcvstds ? (8 - qi) * 0.004 : 0;
raw->obs.data[n].Lstd[0] = rcvstds ? (float)((8 - qi) * 0.004) : 0.0f;
raw->obs.data[n].LLI[0]=raw->lockt[sat-1][1]>0.0?1:0;
if (sys==SYS_SBS) { /* half-cycle valid */
raw->obs.data[n].LLI[0]|=lock2>142?0:2;
Expand All @@ -711,8 +711,8 @@ static int decode_trkmeas(raw_t *raw)
}
for (j=1;j<NFREQ+NEXOBS;j++) {
raw->obs.data[n].L[j]=raw->obs.data[n].P[j]=0.0;
raw->obs.data[n].D[j]=raw->obs.data[n].SNR[j]=0.0;
raw->obs.data[n].Lstd[j]=raw->obs.data[n].Pstd[j]=0.0;
raw->obs.data[n].D[j]=raw->obs.data[n].SNR[j]=0.0f;
raw->obs.data[n].Lstd[j]=raw->obs.data[n].Pstd[j]=0.0f;
raw->obs.data[n].LLI[j]=0;
raw->obs.data[n].code[j]=CODE_NONE;
}
Expand Down Expand Up @@ -820,14 +820,14 @@ static int decode_trkd5(raw_t *raw)
raw->obs.data[n].P[0]=tau*CLIGHT;
raw->obs.data[n].L[0]=-adr;
raw->obs.data[n].D[0]=(float)dop;
raw->obs.data[n].SNR[0]=snr;
raw->obs.data[n].SNR[0]=(float)snr;
raw->obs.data[n].code[0]=sys==SYS_CMP?CODE_L2I:CODE_L1C;
raw->obs.data[n].LLI[0]=raw->lockt[sat-1][1]>0.0?1:0;
raw->lockt[sat-1][1]=0.0;

for (j=1;j<NFREQ+NEXOBS;j++) {
raw->obs.data[n].L[j]=raw->obs.data[n].P[j]=0.0;
raw->obs.data[n].D[j]=raw->obs.data[n].SNR[j]=0.0;
raw->obs.data[n].D[j]=raw->obs.data[n].SNR[j]=0.0f;
raw->obs.data[n].LLI[j]=0;
raw->obs.data[n].code[j]=CODE_NONE;
}
Expand Down
6 changes: 3 additions & 3 deletions src/rcv/unicore.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,14 +816,14 @@ static int decode_obsvmb(raw_t* raw)
raw->obs.data[index].L[idx] = -adr;
raw->obs.data[index].P[idx] = psr;
raw->obs.data[index].D[idx] = (float)dop;
raw->obs.data[index].SNR[idx] = snr;
raw->obs.data[index].SNR[idx] = (float)snr;
raw->obs.data[index].LLI[idx] = (uint8_t)lli;
raw->obs.data[index].code[idx] = (uint8_t)code;
if (rcvstds) {
double pstd = U2(p + 20) * 0.01; // Meters
raw->obs.data[index].Pstd[idx] = pstd;
raw->obs.data[index].Pstd[idx] = (float)pstd;
double lstd = U2(p + 22) * 0.0001; // Cycles
raw->obs.data[index].Lstd[idx] = lstd;
raw->obs.data[index].Lstd[idx] = (float)lstd;
}
}
}
Expand Down
Loading