rename checkExpDesignator to replaceExpDesignator
'check' is somewhat of a misnomer, as the function doens't just check something, but it actively replaces something.
This commit is contained in:
parent
f1520f0cce
commit
4282f2b63e
48
gpssim.c
48
gpssim.c
@ -782,7 +782,7 @@ unsigned long computeChecksum(unsigned long source, int nib)
|
|||||||
* \param len Length of input string in bytes
|
* \param len Length of input string in bytes
|
||||||
* \returns Number of characters replaced
|
* \returns Number of characters replaced
|
||||||
*/
|
*/
|
||||||
int checkExpDesignator(char *str, int len)
|
int replaceExpDesignator(char *str, int len)
|
||||||
{
|
{
|
||||||
int i,n=0;
|
int i,n=0;
|
||||||
|
|
||||||
@ -883,17 +883,17 @@ int readRinexNav(ephem_t eph[], const char *fname)
|
|||||||
|
|
||||||
strncpy(tmp, str+22, 19);
|
strncpy(tmp, str+22, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19); // tmp[15]='E';
|
replaceExpDesignator(tmp, 19); // tmp[15]='E';
|
||||||
eph[sv].af0 = atof(tmp);
|
eph[sv].af0 = atof(tmp);
|
||||||
|
|
||||||
strncpy(tmp, str+41, 19);
|
strncpy(tmp, str+41, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].af1 = atof(tmp);
|
eph[sv].af1 = atof(tmp);
|
||||||
|
|
||||||
strncpy(tmp, str+60, 19);
|
strncpy(tmp, str+60, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].af2 = atof(tmp);
|
eph[sv].af2 = atof(tmp);
|
||||||
|
|
||||||
// BROADCAST ORBIT - 1
|
// BROADCAST ORBIT - 1
|
||||||
@ -902,22 +902,22 @@ int readRinexNav(ephem_t eph[], const char *fname)
|
|||||||
|
|
||||||
strncpy(tmp, str+3, 19);
|
strncpy(tmp, str+3, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].iode = (int)atof(tmp);
|
eph[sv].iode = (int)atof(tmp);
|
||||||
|
|
||||||
strncpy(tmp, str+22, 19);
|
strncpy(tmp, str+22, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].crs = atof(tmp);
|
eph[sv].crs = atof(tmp);
|
||||||
|
|
||||||
strncpy(tmp, str+41, 19);
|
strncpy(tmp, str+41, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].deltan = atof(tmp);
|
eph[sv].deltan = atof(tmp);
|
||||||
|
|
||||||
strncpy(tmp, str+60, 19);
|
strncpy(tmp, str+60, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].m0 = atof(tmp);
|
eph[sv].m0 = atof(tmp);
|
||||||
|
|
||||||
// BROADCAST ORBIT - 2
|
// BROADCAST ORBIT - 2
|
||||||
@ -926,22 +926,22 @@ int readRinexNav(ephem_t eph[], const char *fname)
|
|||||||
|
|
||||||
strncpy(tmp, str+3, 19);
|
strncpy(tmp, str+3, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].cuc = atof(tmp);
|
eph[sv].cuc = atof(tmp);
|
||||||
|
|
||||||
strncpy(tmp, str+22, 19);
|
strncpy(tmp, str+22, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].ecc = atof(tmp);
|
eph[sv].ecc = atof(tmp);
|
||||||
|
|
||||||
strncpy(tmp, str+41, 19);
|
strncpy(tmp, str+41, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].cus = atof(tmp);
|
eph[sv].cus = atof(tmp);
|
||||||
|
|
||||||
strncpy(tmp, str+60, 19);
|
strncpy(tmp, str+60, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].sqrta = atof(tmp);
|
eph[sv].sqrta = atof(tmp);
|
||||||
|
|
||||||
// BROADCAST ORBIT - 3
|
// BROADCAST ORBIT - 3
|
||||||
@ -950,22 +950,22 @@ int readRinexNav(ephem_t eph[], const char *fname)
|
|||||||
|
|
||||||
strncpy(tmp, str+3, 19);
|
strncpy(tmp, str+3, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].toe.sec = atof(tmp);
|
eph[sv].toe.sec = atof(tmp);
|
||||||
|
|
||||||
strncpy(tmp, str+22, 19);
|
strncpy(tmp, str+22, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].cic = atof(tmp);
|
eph[sv].cic = atof(tmp);
|
||||||
|
|
||||||
strncpy(tmp, str+41, 19);
|
strncpy(tmp, str+41, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].omg0 = atof(tmp);
|
eph[sv].omg0 = atof(tmp);
|
||||||
|
|
||||||
strncpy(tmp, str+60, 19);
|
strncpy(tmp, str+60, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].cis = atof(tmp);
|
eph[sv].cis = atof(tmp);
|
||||||
|
|
||||||
// BROADCAST ORBIT - 4
|
// BROADCAST ORBIT - 4
|
||||||
@ -974,22 +974,22 @@ int readRinexNav(ephem_t eph[], const char *fname)
|
|||||||
|
|
||||||
strncpy(tmp, str+3, 19);
|
strncpy(tmp, str+3, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].inc0 = atof(tmp);
|
eph[sv].inc0 = atof(tmp);
|
||||||
|
|
||||||
strncpy(tmp, str+22, 19);
|
strncpy(tmp, str+22, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].crc = atof(tmp);
|
eph[sv].crc = atof(tmp);
|
||||||
|
|
||||||
strncpy(tmp, str+41, 19);
|
strncpy(tmp, str+41, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].aop = atof(tmp);
|
eph[sv].aop = atof(tmp);
|
||||||
|
|
||||||
strncpy(tmp, str+60, 19);
|
strncpy(tmp, str+60, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].omgdot = atof(tmp);
|
eph[sv].omgdot = atof(tmp);
|
||||||
|
|
||||||
// BROADCAST ORBIT - 5
|
// BROADCAST ORBIT - 5
|
||||||
@ -998,12 +998,12 @@ int readRinexNav(ephem_t eph[], const char *fname)
|
|||||||
|
|
||||||
strncpy(tmp, str+3, 19);
|
strncpy(tmp, str+3, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].idot = atof(tmp);
|
eph[sv].idot = atof(tmp);
|
||||||
|
|
||||||
strncpy(tmp, str+41, 19);
|
strncpy(tmp, str+41, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].toe.week = (int)atof(tmp);
|
eph[sv].toe.week = (int)atof(tmp);
|
||||||
|
|
||||||
// BROADCAST ORBIT - 6
|
// BROADCAST ORBIT - 6
|
||||||
@ -1012,12 +1012,12 @@ int readRinexNav(ephem_t eph[], const char *fname)
|
|||||||
|
|
||||||
strncpy(tmp, str+41, 19);
|
strncpy(tmp, str+41, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].tgd = atof(tmp);
|
eph[sv].tgd = atof(tmp);
|
||||||
|
|
||||||
strncpy(tmp, str+60, 19);
|
strncpy(tmp, str+60, 19);
|
||||||
tmp[19] = 0;
|
tmp[19] = 0;
|
||||||
checkExpDesignator(tmp, 19);
|
replaceExpDesignator(tmp, 19);
|
||||||
eph[sv].iodc = (int)atof(tmp);
|
eph[sv].iodc = (int)atof(tmp);
|
||||||
|
|
||||||
// BROADCAST ORBIT - 7
|
// BROADCAST ORBIT - 7
|
||||||
|
Loading…
Reference in New Issue
Block a user