Add constant power option
This commit is contained in:
parent
d17bb9035c
commit
b88f16194a
12
gpssim.c
12
gpssim.c
@ -1707,6 +1707,7 @@ void usage(void)
|
|||||||
" -s <frequency> Sampling frequency [Hz] (default: 2600000)\n"
|
" -s <frequency> Sampling frequency [Hz] (default: 2600000)\n"
|
||||||
" -b <iq_bits> I/Q data format [1/8/16] (default: 16)\n"
|
" -b <iq_bits> I/Q data format [1/8/16] (default: 16)\n"
|
||||||
" -i Disable ionospheric delay for spacecraft scenario\n"
|
" -i Disable ionospheric delay for spacecraft scenario\n"
|
||||||
|
" -p Disable path loss and hold power level constant\n"
|
||||||
" -v Show details about simulated channels\n",
|
" -v Show details about simulated channels\n",
|
||||||
((double)USER_MOTION_SIZE) / 10.0, STATIC_MAX_DURATION);
|
((double)USER_MOTION_SIZE) / 10.0, STATIC_MAX_DURATION);
|
||||||
|
|
||||||
@ -1775,6 +1776,7 @@ int main(int argc, char *argv[])
|
|||||||
int timeoverwrite = FALSE; // Overwrite the TOC and TOE in the RINEX file
|
int timeoverwrite = FALSE; // Overwrite the TOC and TOE in the RINEX file
|
||||||
|
|
||||||
ionoutc_t ionoutc;
|
ionoutc_t ionoutc;
|
||||||
|
int path_loss_enable = TRUE;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Read options
|
// Read options
|
||||||
@ -1798,7 +1800,7 @@ int main(int argc, char *argv[])
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((result=getopt(argc,argv,"e:u:x:g:c:l:o:s:b:T:t:d:iv"))!=-1)
|
while ((result=getopt(argc,argv,"e:u:x:g:c:l:o:s:b:T:t:d:ipv"))!=-1)
|
||||||
{
|
{
|
||||||
switch (result)
|
switch (result)
|
||||||
{
|
{
|
||||||
@ -1890,6 +1892,9 @@ int main(int argc, char *argv[])
|
|||||||
case 'i':
|
case 'i':
|
||||||
ionoutc.enable = FALSE; // Disable ionospheric correction
|
ionoutc.enable = FALSE; // Disable ionospheric correction
|
||||||
break;
|
break;
|
||||||
|
case 'p':
|
||||||
|
path_loss_enable = FALSE; // Disable path loss
|
||||||
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
verb = TRUE;
|
verb = TRUE;
|
||||||
break;
|
break;
|
||||||
@ -2243,7 +2248,10 @@ int main(int argc, char *argv[])
|
|||||||
ant_gain = ant_pat[ibs];
|
ant_gain = ant_pat[ibs];
|
||||||
|
|
||||||
// Signal gain
|
// Signal gain
|
||||||
gain[i] = (int)(path_loss*ant_gain*128.0); // scaled by 2^7
|
if (path_loss_enable == TRUE)
|
||||||
|
gain[i] = (int)(path_loss * ant_gain * 128.0); // scaled by 2^7
|
||||||
|
else
|
||||||
|
gain[i] = 128; // hold the power level constant
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user