Package: gnsstoolbox
GnssToolbox - Python package for GNSS learningInstallationThis package requires Python 3Required packages :gpsdatetime -https://pypi.org/project/gpsdatetime/(J. Beilin - ENSG)remathnumpycopytimeosjsonfrom operator import attrgetterInstallation is accomplished from the command line.From pypiuser@desktop$pip3 install pygnsstoolboxFrom package source directoryuser@desktop$~/gnsstoolbox$ python3 setup.py installFor usage see gnsstoolbox cheatsheet and beamer slides shipped with the package.Import modules""" Ephemerides management """importgnsstoolbox.orbitsasorb""" GNSS data (rinex "o" files) """importgnsstoolbox.rinex_oasrx""" Processing tools (rotations, coordinate conversions...) """importgnsstoolbox.gnsstoolsastools""" Code processing """importgnsstoolbox.gnss_processasproc""" Constantes utiles """importgnsstoolbox.gnss_constasconst""" Corrections (troposphere, antennas...) """importgnsstoolbox.gnss_corrascorrgnss_constConstantDescriptionUnitccelerity299792458.0 m/sf1frequency L1 gps1.57542 GHzf2frequency L2 gps1.22760 GHzf5frequency L5 gps1.17645 GHzorbitsStructureOrbit class contains all orbits informations :NAV_dataG : GPS navigation messageNAV_dataE : Galileo navigation messageNAV_dataR : Glonass navigation messageG : GPS precise orbitsE : Galileo precise orbitsR : Glonass precise orbitsData loadingBroadcast ephemerides loading  (*.yyn ou *.yyg)Orb=orbits.orbit()Orb.loadRinexN('brdm1500.13p')Precise ephemerides loading (*.sp3)Orb=orbits.orbit()Orb.loadSp3(['igs17424.sp3','igl17424.sp3','grm17424.sp3'])orOrb.loadSp3('igs17424.sp3')Data accessGet broadcast ephemerides for a satellite at an instant mjdEph=Orb.getEphemeris(constellation,PRN,mjd)try:print("TOC : ",Eph.tgps.st_iso_epoch())except:print("Unable to find satellite")Get all precise ephemerides for a satellite(orb,nl)=Orb.getSp3('G',5)# Satellite GPS, PRN 5# 'G' : GPS, 'E' : Galileo, 'R' : GlonassX=orb[:,1]# X coordinates at all sp3 epochsY=orb[:,2]Z=orb[:,3]Satellite coordinates processingProcess of ECEF coordinates and clock error (dte) for a satellite given by its constellation ('G','E','R'), its PRN, an instant mjd and et possibly a degree for Lagrange processing (precise orbits).X,Y,Z,dte=Orb.calcSatCoord(const,PRN,mjd,degree)A debug class object is implemented during coordinate processing. It contains all intermediaries results.In order to get its attributes :print(Orb.debug.__dict__)Module Rinex_oData loadingLoading observation Rinex file (*.yyo)Rnx=rx.rinex_o()Rnx.loadRinexO('smne1500.13o')Data accessGet epoch object for a given MJD :t=gpst.gpsdatetime()t.rinex_t('13  5 30  1  0 30.0000000')Ep=Rnx.getEpochByMjd(t.mjd)Get header object for a given MJD :Hd=Rnx.getHeaderByMjd(t.mjd)Get attribute from any headerX0=Hd.XPrint all header or epoch informationsprint(Hd)print(Ep)Get any observable from an epoch :C1=Ep.getObs("C1","G",31)orS=Ep.getSat("G",31)C1=S.getObs("C1")or (only for C/A code)C1=Ep.getSat("G",31).C1Get all common data for 2 datasets at a given MJDEp_base,Ep_rover=rinex_base.getCommonEpochs(rinex_rover,56442)gnsstoolstoolGeoCartGRS80 : geographic to cartesian coordinates conversion. All angles should be given in radians.X,Y,Z=tools.toolGeoCartGRS80(lon,lat,h)toolCartGeoGRS80 : cartesian to geographic coordinates conversion. All angles are given in radians.lon,lat,h=tools.toolCartGeoGRS80(X,Y,Z)toolCartLocGRS80 : cartesian to topocentric coordinates conversion.x,y,z=tools.toolCartLocGRS80(X0,Y0,Z0,X,Y,Z)toolAzEle : azimut and elevation (radians) for one or several satellites Xs,Ys,Zs (scalar or vector) seen from a point with X,Y,Z  coordinates.Az,Ele=tools.toolAzEle(X,Y,Z,Xs,Ys,Zs)toolRotX, toolRotY, toolRotZ : alpha radians rotation around X, Y ou Z axis.X,Y,Z=tools.toolRotX(X,Y,Z,alpha)gnss_processTrilatGps : trilateration wtih 4 parameters (X,Y,Z,cdtr)X,Y,Z,cdtr,sigma0_2,V,Qxx=trilatGps(PosSat,Dobs,X0)TrilatGnss : trilateration à 4,5 ou 6 parameters (X,Y,Z,cdtr,[cGGTO,cGPGL])X,Y,Z,cdtr,cGGTO,cGPGL,sigma0_2,V,Qxx=trilatGnss(PosSat,Dobs,X0,sat_index)TrilatGnssPonderationElev : trilateration à 4,5 ou 6 parameters (X,Y,Z,cdtr,[cGGTO,cGPGL]) avec with weighting given from elevation of each satellite.X,Y,Z,cdtr,cGGTO,cGPGL,sigma0_2,V,Qxx=trilatGnssPonderationElev(PosSat,Dobs,X0,sat_index,ElevSat)LicenceCopyright (C) 2014-2023, Jacques Beilin - ENSG-GeomaticsDistributed under terms of the CECILL-C licence.