MATLAB implementation In this implementation we use object-oriented approach. It means that we create new data types - objects that have similar behaviour as Matlab built-in data types. For example, for all date and time operations we created class DateTime, that enables to store and convert different date and time formats. Command epo = DateTime(2005, 1 , 7, 14, 0, 0); creates object epo with properties (variables within the object) that store the input arguments: year, month, day, hour, minute, second. The command also calls methods (functions defined for class) that use the input arguments to compute GPS week, seconds within GPS week, modified Julian date and day of the week. If you then type command epo, Matlab automatically calls method display, which displays properties of epo: >> epo Year : 2005 Month : 1 Day : 7 Hour : 14 Minute : 0 Seconds : 0.00000 GPS week : 1304 Seconds of GPS week : 482400.00000 Day of week : 5 MJD : 53377.58333 The class DateTime has defined operators plus and minus; so for example finding number of seconds between epochs epo1 and epo2 is as easy as typing command epo1 - epo2. Complete functionality of all classes can be found in the published code. The first step in computation of satellites' coordinates is reading in ephemeris. For that purpose we designed class CoordEph. To read in precise ephemeris, first we have to create an object of class CoordEph: >> PEph = CoordEph; Then we call method that reads in data from specified file(s) and store them in PEph: >> PEph = ReadEphPrecise(PEph, 'filename'); It is possible to read in more files using this method by adding more arguments, for example: >> PEph = ReadEphPrecise(PEph, 'filename1', ' filename2'); where filename is name of the file containing precise ephemeris in sp3- format. There is a similar method for reading in broadcast ephemeris: >> BEph = CoordEph; >> [BEph, OrbPar] = ReadEphBroadcast(BEph, 'filename', Interval); This method reads in broadcast ephemeris from RINEX-format file filename, computes tabular orbit in Interval seconds interval and store them in BEph. It also stores all available orbit parameters in object OrbPar. In the next step we compute standard orbits using method CompStdOrb: >> StdPe = StdOrb; >> StdPe = CompStdOrb(StdPe, PEph, stTgd); This method fits polynomial function to all possible fit intervals in PEph and stores the coefficients in object StdPe. The order of polynomial, the length of fit and validity interval is specified in the definition (constructor) of class StdOrb. The standard orbit for broadcast ephemeris is computed in the same way. Finally, the coordinates of a satellite for a given epoch are computed as: >> coords = GetSatCoord(StdPe, Prn, epo); Where Prn is satellite number, epo is DateTime object that specifies for which epoch should the coordinates be computed. The method returns structure containing coordinates and velocity in Cartesian coordinate system and satellite clock correction.