Skip to content

Suggestion of enhancements for SP3Parser

To be more smart, the followings changes are suggested to fit sp3 files provided by ILRS ACs(ASI,BKG,DGFI,ESA,GFZ,JCET,NSGF, and ilrsa, ilrsb, https://ilrs.gsfc.nasa.gov/data_and_products/products/index.html#s2, ftp://edc.dgfi.tum.de/pub/slr/products/orbits/):

(1) DATA_EPOCH: use the rest as seconds.

final double second = Double.parseDouble(line.substring(20, 31).trim());

==>

final double second = Double.parseDouble(line.substring(20).trim());

(2) HEADER_COMMENTS: both “%/*” and “/*”

HEADER_COMMENTS("^/\\*.*")

==>

HEADER_COMMENTS("^[%]/\\*.*")

(3) clock record in DATA_POSITION and DATA_VELOCITY:

// clock (microsec)
pi.latestClock = line.length() <= 46 ?
                                        DEFAULT_CLOCK_VALUE :
                                        Double.parseDouble(line.substring(46, 60).trim()) * 1e-6;

==>

// clock (microsec)
pi.latestClock = line.trim().length() <= 46 ?
                                             DEFAULT_CLOCK_VALUE :
                                             Double.parseDouble(line.substring(46, 60).trim()) * 1e-6;

There is already a topic in forum details.

Additional, there maybe no EOF. I've no idea how to handle it.

ilrsa.orb.lageos1.220101.v70.sp3.gz

ilrsb.orb.lageos1.220101.v70.sp3.gz

gfz.orb.lageos1.220101.v70.sp3.gz

jcet.orb.lageos1.220101.v70.sp3.gz