├── +gt ├── +C │ ├── ARMODE.m │ ├── CODE.m │ ├── DEGF.m │ ├── DLOPT.m │ ├── EPHOPT.m │ ├── FREQ.m │ ├── FREQOPT.m │ ├── FREQTYPE.m │ ├── GEOID.m │ ├── HIGHTF.m │ ├── IONOOPT.m │ ├── LLI.m │ ├── NAVSYS.m │ ├── OBSTYPE.m │ ├── PMODE.m │ ├── POSOPT.m │ ├── SBSOPT.m │ ├── SOLF.m │ ├── SOLQ.m │ ├── SOLQNAME.m │ ├── STR.m │ ├── STRFMT.m │ ├── STR_MODE.m │ ├── SWITCH.m │ ├── SYS.m │ ├── SYSCOL.m │ ├── SYSNAME.m │ ├── TIDE.m │ ├── TIMEF.m │ ├── TIMES.m │ ├── TRACE.m │ ├── TROPOPT.m │ └── TSYS.m ├── +Gfun │ ├── pntpos.m │ └── rtkpos.m ├── C.m ├── Gcov.m ├── Gerr.m ├── Gnav.m ├── Gobs.m ├── Gopt.m ├── Gpos.m ├── Grtk.m ├── Gsat.m ├── Gsol.m ├── Gstat.m ├── Gtime.m ├── Gvel.m └── README.md ├── +rtklib ├── adjgpsweek.m ├── adjgpsweek.mexa64 ├── adjgpsweek.mexmaca64 ├── adjgpsweek.mexw64 ├── antmodel.m ├── antmodel.mexa64 ├── antmodel.mexmaca64 ├── antmodel.mexw64 ├── antmodel_s.m ├── antmodel_s.mexa64 ├── antmodel_s.mexmaca64 ├── antmodel_s.mexw64 ├── bdt2gpst.m ├── bdt2gpst.mexa64 ├── bdt2gpst.mexmaca64 ├── bdt2gpst.mexw64 ├── bdttow2epoch.m ├── bdttow2epoch.mexa64 ├── bdttow2epoch.mexmaca64 ├── bdttow2epoch.mexw64 ├── code2freq.m ├── code2freq.mexa64 ├── code2freq.mexmaca64 ├── code2freq.mexw64 ├── code2idx.m ├── code2idx.mexa64 ├── code2idx.mexmaca64 ├── code2idx.mexw64 ├── code2obs.m ├── code2obs.mexa64 ├── code2obs.mexmaca64 ├── code2obs.mexw64 ├── convgpx.m ├── convgpx.mexa64 ├── convgpx.mexmaca64 ├── convgpx.mexw64 ├── convkml.m ├── convkml.mexa64 ├── convkml.mexmaca64 ├── convkml.mexw64 ├── covecef.m ├── covecef.mexa64 ├── covecef.mexmaca64 ├── covecef.mexw64 ├── covecefsol.m ├── covecefsol.mexa64 ├── covecefsol.mexmaca64 ├── covecefsol.mexw64 ├── covenu.m ├── covenu.mexa64 ├── covenu.mexmaca64 ├── covenu.mexw64 ├── covenusol.m ├── covenusol.mexa64 ├── covenusol.mexmaca64 ├── covenusol.mexw64 ├── deg2dms.m ├── deg2dms.mexa64 ├── deg2dms.mexmaca64 ├── deg2dms.mexw64 ├── dms2deg.m ├── dms2deg.mexa64 ├── dms2deg.mexmaca64 ├── dms2deg.mexw64 ├── dops.m ├── dops.mexa64 ├── dops.mexmaca64 ├── dops.mexw64 ├── ecef2enu.m ├── ecef2enu.mexa64 ├── ecef2enu.mexmaca64 ├── ecef2enu.mexw64 ├── eci2ecef.m ├── eci2ecef.mexa64 ├── eci2ecef.mexmaca64 ├── eci2ecef.mexw64 ├── enu2ecef.m ├── enu2ecef.mexa64 ├── enu2ecef.mexmaca64 ├── enu2ecef.mexw64 ├── enu2llh.m ├── enu2llh.mexa64 ├── enu2llh.mexmaca64 ├── enu2llh.mexw64 ├── enu2xyz.m ├── enu2xyz.mexa64 ├── enu2xyz.mexmaca64 ├── enu2xyz.mexw64 ├── eph2clk.m ├── eph2clk.mexa64 ├── eph2clk.mexmaca64 ├── eph2clk.mexw64 ├── eph2pos.m ├── eph2pos.mexa64 ├── eph2pos.mexmaca64 ├── eph2pos.mexw64 ├── epoch2bdttow.m ├── epoch2bdttow.mexa64 ├── epoch2bdttow.mexmaca64 ├── epoch2bdttow.mexw64 ├── epoch2doy.m ├── epoch2doy.mexa64 ├── epoch2doy.mexmaca64 ├── epoch2doy.mexw64 ├── epoch2gsttow.m ├── epoch2gsttow.mexa64 ├── epoch2gsttow.mexmaca64 ├── epoch2gsttow.mexw64 ├── epoch2tow.m ├── epoch2tow.mexa64 ├── epoch2tow.mexmaca64 ├── epoch2tow.mexw64 ├── expath.m ├── expath.mexa64 ├── expath.mexmaca64 ├── expath.mexw64 ├── geodist.m ├── geodist.mexa64 ├── geodist.mexmaca64 ├── geodist.mexw64 ├── geoidh.m ├── geoidh.mexa64 ├── geoidh.mexmaca64 ├── geoidh.mexw64 ├── geph2clk.m ├── geph2clk.mexa64 ├── geph2clk.mexmaca64 ├── geph2clk.mexw64 ├── geph2pos.m ├── geph2pos.mexa64 ├── geph2pos.mexmaca64 ├── geph2pos.mexw64 ├── geterp.m ├── geterp.mexa64 ├── geterp.mexmaca64 ├── geterp.mexw64 ├── gpst2bdt.m ├── gpst2bdt.mexa64 ├── gpst2bdt.mexmaca64 ├── gpst2bdt.mexw64 ├── gpst2utc.m ├── gpst2utc.mexa64 ├── gpst2utc.mexmaca64 ├── gpst2utc.mexw64 ├── gsttow2epoch.m ├── gsttow2epoch.mexa64 ├── gsttow2epoch.mexmaca64 ├── gsttow2epoch.mexw64 ├── ionmapf.m ├── ionmapf.mexa64 ├── ionmapf.mexmaca64 ├── ionmapf.mexw64 ├── ionmodel.m ├── ionmodel.mexa64 ├── ionmodel.mexmaca64 ├── ionmodel.mexw64 ├── ionocorr.m ├── ionocorr.mexa64 ├── ionocorr.mexmaca64 ├── ionocorr.mexw64 ├── ionppp.m ├── ionppp.mexa64 ├── ionppp.mexmaca64 ├── ionppp.mexw64 ├── jgd2tokyo.m ├── jgd2tokyo.mexa64 ├── jgd2tokyo.mexmaca64 ├── jgd2tokyo.mexw64 ├── lambda.m ├── lambda.mexa64 ├── lambda.mexmaca64 ├── lambda.mexw64 ├── llh2enu.m ├── llh2enu.mexa64 ├── llh2enu.mexmaca64 ├── llh2enu.mexw64 ├── llh2xyz.m ├── llh2xyz.mexa64 ├── llh2xyz.mexmaca64 ├── llh2xyz.mexw64 ├── loadopts.m ├── loadopts.mexa64 ├── loadopts.mexmaca64 ├── loadopts.mexw64 ├── obs2code.m ├── obs2code.mexa64 ├── obs2code.mexmaca64 ├── obs2code.mexw64 ├── outrnxnav.m ├── outrnxnav.mexa64 ├── outrnxnav.mexmaca64 ├── outrnxnav.mexw64 ├── outrnxobs.m ├── outrnxobs.mexa64 ├── outrnxobs.mexmaca64 ├── outrnxobs.mexw64 ├── outsol.m ├── outsol.mexa64 ├── outsol.mexmaca64 ├── outsol.mexw64 ├── peph2pos.m ├── peph2pos.mexa64 ├── peph2pos.mexmaca64 ├── peph2pos.mexw64 ├── pntpos.m ├── pntpos.mexa64 ├── pntpos.mexmaca64 ├── pntpos.mexw64 ├── readblq.m ├── readblq.mexa64 ├── readblq.mexmaca64 ├── readblq.mexw64 ├── readdcb.m ├── readdcb.mexa64 ├── readdcb.mexmaca64 ├── readdcb.mexw64 ├── readerp.m ├── readerp.mexa64 ├── readerp.mexmaca64 ├── readerp.mexw64 ├── readpcv.m ├── readpcv.mexa64 ├── readpcv.mexmaca64 ├── readpcv.mexw64 ├── readpos.m ├── readpos.mexa64 ├── readpos.mexmaca64 ├── readpos.mexw64 ├── readrnxc.m ├── readrnxc.mexa64 ├── readrnxc.mexmaca64 ├── readrnxc.mexw64 ├── readrnxnav.m ├── readrnxnav.mexa64 ├── readrnxnav.mexmaca64 ├── readrnxnav.mexw64 ├── readrnxobs.m ├── readrnxobs.mexa64 ├── readrnxobs.mexmaca64 ├── readrnxobs.mexw64 ├── readsap.m ├── readsap.mexa64 ├── readsap.mexmaca64 ├── readsap.mexw64 ├── readsol.m ├── readsol.mexa64 ├── readsol.mexmaca64 ├── readsol.mexw64 ├── readsolstat.m ├── readsolstat.mexa64 ├── readsolstat.mexmaca64 ├── readsolstat.mexw64 ├── readsp3.m ├── readsp3.mexa64 ├── readsp3.mexmaca64 ├── readsp3.mexw64 ├── reppath.m ├── reppath.mexa64 ├── reppath.mexmaca64 ├── reppath.mexw64 ├── rtkinit.m ├── rtkinit.mexa64 ├── rtkinit.mexmaca64 ├── rtkinit.mexw64 ├── rtkpos.m ├── rtkpos.mexa64 ├── rtkpos.mexmaca64 ├── rtkpos.mexw64 ├── sat2freq.m ├── sat2freq.mexa64 ├── sat2freq.mexmaca64 ├── sat2freq.mexw64 ├── satantoff.m ├── satantoff.mexa64 ├── satantoff.mexmaca64 ├── satantoff.mexw64 ├── satazel.m ├── satazel.mexa64 ├── satazel.mexmaca64 ├── satazel.mexw64 ├── satid2no.m ├── satid2no.mexa64 ├── satid2no.mexmaca64 ├── satid2no.mexw64 ├── satno.m ├── satno.mexa64 ├── satno.mexmaca64 ├── satno.mexw64 ├── satno2id.m ├── satno2id.mexa64 ├── satno2id.mexmaca64 ├── satno2id.mexw64 ├── satpos.m ├── satpos.mexa64 ├── satpos.mexmaca64 ├── satpos.mexw64 ├── satposs.m ├── satposs.mexa64 ├── satposs.mexmaca64 ├── satposs.mexw64 ├── satsys.m ├── satsys.mexa64 ├── satsys.mexmaca64 ├── satsys.mexw64 ├── saveopts.m ├── saveopts.mexa64 ├── saveopts.mexmaca64 ├── saveopts.mexw64 ├── searchpcv.m ├── searchpcv.mexa64 ├── searchpcv.mexmaca64 ├── searchpcv.mexw64 ├── sunmoonpos.m ├── sunmoonpos.mexa64 ├── sunmoonpos.mexmaca64 ├── sunmoonpos.mexw64 ├── tidedisp.m ├── tidedisp.mexa64 ├── tidedisp.mexmaca64 ├── tidedisp.mexw64 ├── tokyo2jgd.m ├── tokyo2jgd.mexa64 ├── tokyo2jgd.mexmaca64 ├── tokyo2jgd.mexw64 ├── tow2doy.m ├── tow2doy.mexa64 ├── tow2doy.mexmaca64 ├── tow2doy.mexw64 ├── tow2epoch.m ├── tow2epoch.mexa64 ├── tow2epoch.mexmaca64 ├── tow2epoch.mexw64 ├── tropcorr.m ├── tropcorr.mexa64 ├── tropcorr.mexmaca64 ├── tropcorr.mexw64 ├── tropmapf.m ├── tropmapf.mexa64 ├── tropmapf.mexmaca64 ├── tropmapf.mexw64 ├── tropmodel.m ├── tropmodel.mexa64 ├── tropmodel.mexmaca64 ├── tropmodel.mexw64 ├── utc2gmst.m ├── utc2gmst.mexa64 ├── utc2gmst.mexmaca64 ├── utc2gmst.mexw64 ├── utc2gpst.m ├── utc2gpst.mexa64 ├── utc2gpst.mexmaca64 ├── utc2gpst.mexw64 ├── xyz2enu.m ├── xyz2enu.mexa64 ├── xyz2enu.mexmaca64 ├── xyz2enu.mexw64 ├── xyz2llh.m ├── xyz2llh.mexa64 ├── xyz2llh.mexmaca64 └── xyz2llh.mexw64 ├── .gitattributes ├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── compile.m ├── doc ├── Fig1-1.png ├── Fig1-2.png ├── Fig1-3.png ├── Fig1-4.png ├── Fig2-1.png ├── Fig2-2.png ├── Fig3-1.png ├── Fig3-2.png ├── manual.md └── manual.pdf ├── examples ├── Example1_visualization_RINEX_observation.m ├── Example2_PPK_analysis.m ├── Example3_Positioning_error_analysis.m ├── README.md ├── compute_double_difference.m ├── compute_fixrate.m ├── compute_float_ambiguity.m ├── compute_geoid.m ├── compute_mean_position.m ├── compute_residuals_doppler.m ├── compute_residuals_pseudorange.m ├── convert_coordinate.m ├── convert_solution_to_kml.m ├── convert_time.m ├── data │ ├── kinematic │ │ ├── base.nav │ │ ├── base.obs │ │ ├── base_position.txt │ │ ├── reference.csv │ │ ├── reference_1Hz.pos │ │ ├── rover.obs │ │ ├── rover_1Hz.obs │ │ ├── rover_1Hz_rtk.pos │ │ ├── rover_1Hz_spp.pos │ │ ├── rover_rtk.kml │ │ ├── rover_rtk.pos │ │ ├── rtk.conf │ │ └── spp.conf │ └── static │ │ ├── base.nav │ │ ├── base.obs │ │ ├── base_position.txt │ │ ├── rover.obs │ │ ├── rover_position.txt │ │ └── rover_rtk.pos ├── edit_rinex_observation1.m ├── edit_rinex_observation2.m ├── edit_rinex_observation3.m ├── edit_rinex_observation4.m ├── edit_solution.m ├── estimate_position_rtk.m ├── estimate_position_rtk_step_by_step.m ├── estimate_position_spp.m ├── estimate_position_spp1_step_by_step.m ├── estimate_position_spp2_step_by_step.m ├── estimate_velocity_doppler_step_by_step.m ├── estimate_velocity_tdcp_step_by_step.m ├── evaluate_position_error.m ├── evaluate_velocity_error.m ├── generate_configuration_file.m ├── generate_solution_file.m ├── plot_observation1.m ├── plot_observation2.m ├── plot_position.m ├── plot_satellite_constellation1.m ├── plot_satellite_constellation2.m └── plot_solution.m └── src ├── README.md └── mex ├── adjgpsweek.c ├── antmodel.c ├── antmodel_s.c ├── bdt2gpst.c ├── bdttow2epoch.c ├── code2freq.c ├── code2idx.c ├── code2obs.c ├── convgpx_.c ├── convkml_.c ├── covecef.c ├── covecefsol.c ├── covenu.c ├── covenusol.c ├── deg2dms.c ├── dms2deg.c ├── dops.c ├── ecef2enu.c ├── eci2ecef.c ├── enu2ecef.c ├── enu2llh.c ├── enu2xyz.c ├── eph2clk.c ├── eph2eph.c ├── eph2pos.c ├── epoch2bdttow.c ├── epoch2doy.c ├── epoch2gsttow.c ├── epoch2tow.c ├── erp2erp.c ├── expath.c ├── geodist.c ├── geoidh.c ├── geph2clk.c ├── geph2pos.c ├── geterp.c ├── gpst2bdt.c ├── gpst2utc.c ├── gsttow2epoch.c ├── ionmapf.c ├── ionmodel.c ├── ionocorr.c ├── ionppp.c ├── jgd2tokyo.c ├── lambda_.c ├── llh2enu.c ├── llh2xyz.c ├── loadopts.c ├── mex_utility.h ├── nav2nav.c ├── obs2code.c ├── obs2obs.c ├── opt2opt.c ├── outrnxnav.c ├── outrnxobs.c ├── outsol.c ├── pcv2pcv.c ├── peph2pos.c ├── pntpos_.c ├── readblq.c ├── readdcb.c ├── readerp.c ├── readpcv.c ├── readpos.c ├── readrnxc.c ├── readrnxnav.c ├── readrnxobs.c ├── readsap.c ├── readsol.c ├── readsolstat.c ├── readsp3.c ├── reppath.c ├── rtk2rtk.c ├── rtkinit.c ├── rtkpos_.c ├── sat2freq.c ├── satantoff.c ├── satazel.c ├── satid2no.c ├── satno.c ├── satno2id.c ├── satpos.c ├── satposs.c ├── satsys.c ├── saveopts.c ├── searchpcv.c ├── sol2sol.c ├── solstat2solstat.c ├── ssat2ssat.c ├── sunmoonpos.c ├── tidedisp.c ├── tokyo2jgd.c ├── tow2doy.c ├── tow2epoch.c ├── tropcorr.c ├── tropmapf.c ├── tropmodel.c ├── utc2gmst.c ├── utc2gpst.c ├── xyz2enu.c └── xyz2llh.c /+gt/+C/ARMODE.m: -------------------------------------------------------------------------------- 1 | classdef ARMODE < double 2 | enumeration 3 | ARMODE_OFF (0) % AR mode: off 4 | ARMODE_CONT (1) % AR mode: continuous 5 | ARMODE_INST (2) % AR mode: instantaneous 6 | ARMODE_FIXHOLD(3) % AR mode: fix and hold 7 | ARMODE_WLNL (4) % AR mode: wide lane/narrow lane 8 | ARMODE_TCAR (5) % AR mode: triple carrier ar 9 | end 10 | end -------------------------------------------------------------------------------- /+gt/+C/DEGF.m: -------------------------------------------------------------------------------- 1 | classdef DEGF < double 2 | enumeration 3 | DEGF_DEG(0) % degree 4 | DEGF_DMS(1) % degree-minute-second 5 | end 6 | end -------------------------------------------------------------------------------- /+gt/+C/DLOPT.m: -------------------------------------------------------------------------------- 1 | classdef DLOPT < double 2 | enumeration 3 | DLOPT_FORCE (1) % download option: force download existing 4 | DLOPT_KEEPCMP(2) % download option: keep compressed file 5 | DLOPT_HOLDERR(4) % download option: hold on error file 6 | DLOPT_HOLDLST(8) % download option: hold on listing file 7 | end 8 | end -------------------------------------------------------------------------------- /+gt/+C/EPHOPT.m: -------------------------------------------------------------------------------- 1 | classdef EPHOPT < double 2 | enumeration 3 | EPHOPT_BRDC (0) % ephemeris option: broadcast ephemeris 4 | EPHOPT_PREC (1) % ephemeris option: precise ephemeris 5 | EPHOPT_SBAS (2) % ephemeris option: broadcast + SBAS 6 | EPHOPT_SSRAPC(3) % ephemeris option: broadcast + SSR_APC 7 | EPHOPT_SSRCOM(4) % ephemeris option: broadcast + SSR_COM 8 | end 9 | end -------------------------------------------------------------------------------- /+gt/+C/FREQ.m: -------------------------------------------------------------------------------- 1 | classdef FREQ < double 2 | enumeration 3 | FREQ1 (1.57542E9) % L1/E1/B1C frequency (Hz) 4 | FREQ2 (1.22760E9) % L2)frequency (Hz) 5 | FREQ5 (1.17645E9) % L5/E5a/B2a frequency (Hz) 6 | FREQ6 (1.27875E9) % E6/L6 frequency (Hz) 7 | FREQ7 (1.20714E9) % E5b frequency (Hz) 8 | FREQ8 (1.191795E9) % E5a+b frequency (Hz) 9 | FREQ9 (2.492028E9) % S frequency (Hz) 10 | FREQ1_GLO(1.60200E9) % GLONASS G1 base frequency (Hz) 11 | DFRQ1_GLO(0.56250E6) % GLONASS G1 bias frequency (Hz/n) 12 | FREQ2_GLO(1.24600E9) % GLONASS G2 base frequency (Hz) 13 | DFRQ2_GLO(0.43750E6) % GLONASS G2 bias frequency (Hz/n) 14 | FREQ3_GLO(1.202025E9) % GLONASS G3 frequency (Hz) 15 | FREQ1a_GLO(1.600995E9)% GLONASS G1a frequency (Hz) 16 | FREQ2a_GLO(1.248060E9)% GLONASS G2a frequency (Hz) 17 | FREQ1_CMP(1.561098E9) % BDS B1I frequency (Hz) 18 | FREQ2_CMP(1.20714E9) % BDS B2I/B2b frequency (Hz) 19 | FREQ3_CMP(1.26852E9) % BDS B3 frequency (Hz) 20 | end 21 | end -------------------------------------------------------------------------------- /+gt/+C/FREQOPT.m: -------------------------------------------------------------------------------- 1 | classdef FREQOPT < double 2 | enumeration 3 | FREQOPT_L1 (1) % L1 4 | FREQOPT_L12 (2) % L1+2 5 | FREQOPT_L125 (3) % L1+2+5 6 | FREQOPT_L1256 (4) % L1+2+5+6 7 | FREQOPT_L12567(5) % L1+2+5+6+7 8 | end 9 | end -------------------------------------------------------------------------------- /+gt/+C/FREQTYPE.m: -------------------------------------------------------------------------------- 1 | classdef FREQTYPE < double 2 | enumeration 3 | FREQTYPE_L1 (1) % frequency type: L1/E1/B1 4 | FREQTYPE_L2 (2) % frequency type: L2/E5b/B2 5 | FREQTYPE_L3 (4) % frequency type: L5/E5a/L3 6 | FREQTYPE_L4 (8) % frequency type: L6/E6/B3 7 | FREQTYPE_L5 (16) % frequency type: E5ab 8 | FREQTYPE_ALL(255) % frequency type: all 9 | end 10 | end -------------------------------------------------------------------------------- /+gt/+C/GEOID.m: -------------------------------------------------------------------------------- 1 | classdef GEOID < double 2 | enumeration 3 | GEOID_EMBEDDED (0) % geoid model: embedded geoid 4 | GEOID_EGM96_M150 (1) % geoid model: EGM96 15x15" 5 | GEOID_EGM2008_M25(2) % geoid model: EGM2008 2.5x2.5" 6 | GEOID_EGM2008_M10(3) % geoid model: EGM2008 1.0x1.0" 7 | GEOID_GSI2000_M15(4) % geoid model: GSI geoid 2000 1.0x1.5" 8 | GEOID_RAF09 (5) % geoid model: IGN RAF09 for France 1.5"x2" 9 | end 10 | end -------------------------------------------------------------------------------- /+gt/+C/HIGHTF.m: -------------------------------------------------------------------------------- 1 | classdef HIGHTF < double 2 | enumeration 3 | HIGHTF_ELLI(0) % ellipsoidal 4 | HIGHTF_GEOD(1) % geodetic 5 | end 6 | end -------------------------------------------------------------------------------- /+gt/+C/IONOOPT.m: -------------------------------------------------------------------------------- 1 | classdef IONOOPT < double 2 | enumeration 3 | IONOOPT_OFF (0) % ionosphere option: correction off 4 | IONOOPT_BRDC(1) % ionosphere option: broadcast model 5 | IONOOPT_SBAS(2) % ionosphere option: SBAS model 6 | IONOOPT_IFLC(3) % ionosphere option: L1/L2 iono-free LC 7 | IONOOPT_EST (4) % ionosphere option: estimation 8 | IONOOPT_TEC (5) % ionosphere option: IONEX TEC model 9 | IONOOPT_QZS (6) % ionosphere option: QZSS broadcast model 10 | IONOOPT_STEC(8) % ionosphere option: SLANT TEC model 11 | end 12 | end -------------------------------------------------------------------------------- /+gt/+C/LLI.m: -------------------------------------------------------------------------------- 1 | classdef LLI < double 2 | enumeration 3 | LLI_SLIP (1) % LLI: cycle-slip 4 | LLI_HALFC (2) % LLI: half-cycle not resovled 5 | LLI_BOCTRK(4) % LLI: boc tracking of mboc signal 6 | LLI_HALFA (64) % LLI: half-cycle added 7 | LLI_HALFS (128) % LLI: half-cycle subtracted 8 | end 9 | end -------------------------------------------------------------------------------- /+gt/+C/NAVSYS.m: -------------------------------------------------------------------------------- 1 | classdef NAVSYS < double 2 | enumeration 3 | NAVSYS_G(1) 4 | NAVSYS_R(4) 5 | NAVSYS_E(8) 6 | NAVSYS_Q(16) 7 | NAVSYS_C(32) 8 | NAVSYS_GR(5) 9 | NAVSYS_GE(9) 10 | NAVSYS_GQ(17) 11 | NAVSYS_GC(33) 12 | NAVSYS_RE(12) 13 | NAVSYS_RQ(20) 14 | NAVSYS_RC(36) 15 | NAVSYS_EQ(17) 16 | NAVSYS_EC(40) 17 | NAVSYS_QC(48) 18 | NAVSYS_GRE(13) 19 | NAVSYS_GRQ(21) 20 | NAVSYS_GRC(37) 21 | NAVSYS_GEQ(25) 22 | NAVSYS_GEC(41) 23 | NAVSYS_GQC(49) 24 | NAVSYS_REQ(28) 25 | NAVSYS_REC(44) 26 | NAVSYS_RQC(52) 27 | NAVSYS_EQC(56) 28 | NAVSYS_GREQ(29) 29 | NAVSYS_GREC(45) 30 | NAVSYS_GRQC(53) 31 | NAVSYS_GEQC(57) 32 | NAVSYS_REQC(60) 33 | NAVSYS_GREQC(61) 34 | end 35 | end -------------------------------------------------------------------------------- /+gt/+C/OBSTYPE.m: -------------------------------------------------------------------------------- 1 | classdef OBSTYPE < double 2 | enumeration 3 | OBSTYPE_PR (1) % observation type: pseudorange 4 | OBSTYPE_CP (2) % observation type: carrier-phase 5 | OBSTYPE_DOP (4) % observation type: doppler-freq 6 | OBSTYPE_SNR (8) % observation type: SNR 7 | OBSTYPE_ALL(255) % observation type: all 8 | end 9 | end -------------------------------------------------------------------------------- /+gt/+C/PMODE.m: -------------------------------------------------------------------------------- 1 | classdef PMODE < double 2 | enumeration 3 | PMODE_SINGLE (0) % positioning mode: single 4 | PMODE_DGPS (1) % positioning mode: DGPS/DGNSS 5 | PMODE_KINEMA (2) % positioning mode: kinematic 6 | PMODE_STATIC (3) % positioning mode: static 7 | PMODE_MOVEB (4) % positioning mode: moving-base 8 | PMODE_FIXED (5) % positioning mode: fixed 9 | PMODE_PPP_KINEMA(6) % positioning mode: PPP-kinemaric 10 | PMODE_PPP_STATIC(7) % positioning mode: PPP-static 11 | PMODE_PPP_FIXED (8) % positioning mode: PPP-fixed 12 | end 13 | end -------------------------------------------------------------------------------- /+gt/+C/POSOPT.m: -------------------------------------------------------------------------------- 1 | classdef POSOPT < double 2 | enumeration 3 | POSOPT_LLH (0) % pos option: LLH 4 | POSOPT_XYZ (1) % pos option: XYZ 5 | POSOPT_SINGLE(2) % pos option: average of single pos 6 | POSOPT_FILE (3) % pos option: read from pos file 7 | POSOPT_RINEX (4) % pos option: rinex header pos 8 | POSOPT_RTCM (5) % pos option: rtcm station pos 9 | POSOPT_RAW (6) % pos option: raw station pos 10 | end 11 | end -------------------------------------------------------------------------------- /+gt/+C/SBSOPT.m: -------------------------------------------------------------------------------- 1 | classdef SBSOPT < double 2 | enumeration 3 | SBSOPT_LCORR(1) % SBAS option: long term correction 4 | SBSOPT_FCORR(2) % SBAS option: fast correction 5 | SBSOPT_ICORR(4) % SBAS option: ionosphere correction 6 | SBSOPT_RANGE(8) % SBAS option: ranging 7 | end 8 | end -------------------------------------------------------------------------------- /+gt/+C/SOLF.m: -------------------------------------------------------------------------------- 1 | classdef SOLF < double 2 | enumeration 3 | SOLF_LLH (0) % solution format: lat/lon/height 4 | SOLF_XYZ (1) % solution format: x/y/z-ecef 5 | SOLF_ENU (2) % solution format: e/n/u-baseline 6 | SOLF_NMEA(3) % solution format: NMEA-183 7 | SOLF_STAT(4) % solution format: solution status 8 | SOLF_GSIF(5) % solution format: GSI F1/F2 9 | end 10 | end -------------------------------------------------------------------------------- /+gt/+C/SOLQ.m: -------------------------------------------------------------------------------- 1 | classdef SOLQ < double 2 | enumeration 3 | SOLQ_NONE (0) % solution status: no solution 4 | SOLQ_FIX (1) % solution status: fix 5 | SOLQ_FLOAT (2) % solution status: float 6 | SOLQ_SBAS (3) % solution status: SBAS 7 | SOLQ_DGPS (4) % solution status: DGPS/DGNSS 8 | SOLQ_SINGLE(5) % solution status: single 9 | SOLQ_PPP (6) % solution status: PPP 10 | SOLQ_DR (7) % solution status: dead reconing 11 | end 12 | end -------------------------------------------------------------------------------- /+gt/+C/SOLQNAME.m: -------------------------------------------------------------------------------- 1 | classdef SOLQNAME < double 2 | enumeration 3 | NONE (0) % solution status: no solution 4 | FIX (1) % solution status: fix 5 | FLOAT (2) % solution status: float 6 | SBAS (3) % solution status: SBAS DGNSS 7 | DGNSS (4) % solution status: Code DGPS/DGNSS 8 | SPP (5) % solution status: single point positioning 9 | PPP (6) % solution status: PPP 10 | DR (7) % solution status: dead reconing 11 | end 12 | end -------------------------------------------------------------------------------- /+gt/+C/STR.m: -------------------------------------------------------------------------------- 1 | classdef STR < double 2 | enumeration 3 | STR_NONE (0) % stream type: none 4 | STR_SERIAL (1) % stream type: serial 5 | STR_FILE (2) % stream type: file 6 | STR_TCPSVR (3) % stream type: TCP server 7 | STR_TCPCLI (4) % stream type: TCP client 8 | STR_NTRIPSVR(5) % stream type: NTRIP server 9 | STR_NTRIPCLI(6) % stream type: NTRIP client 10 | STR_FTP (7) % stream type: ftp 11 | STR_HTTP (8) % stream type: http 12 | STR_NTRIPCAS(9) % stream type: NTRIP caster 13 | STR_UDPSVR (10) % stream type: UDP server 14 | STR_UDPCLI (11) % stream type: UDP server 15 | STR_MEMBUF (12) % stream type: memory buffer 16 | end 17 | end -------------------------------------------------------------------------------- /+gt/+C/STRFMT.m: -------------------------------------------------------------------------------- 1 | classdef STRFMT < double 2 | enumeration 3 | STRFMT_RTCM2(0) % stream format: RTCM 2 4 | STRFMT_RTCM3(1) % stream format: RTCM 3 5 | STRFMT_OEM4 (2) % stream format: NovAtel OEMV/4 6 | STRFMT_OEM3 (3) % stream format: NovAtel OEM3 7 | STRFMT_UBX (4) % stream format: u-blox LEA-*T 8 | STRFMT_SS2 (5) % stream format: NovAtel Superstar II 9 | STRFMT_CRES (6) % stream format: Hemisphere 10 | STRFMT_STQ (7) % stream format: SkyTraq S1315F 11 | STRFMT_JAVAD(8) % stream format: JAVAD GRIL/GREIS 12 | STRFMT_NVS (9) % stream format: NVS NVC08C 13 | STRFMT_BINEX(10) % stream format: BINEX 14 | STRFMT_RT17 (11) % stream format: Trimble RT17 15 | STRFMT_SEPT (12) % stream format: Septentrio 16 | STRFMT_RINEX(13) % stream format: RINEX 17 | STRFMT_SP3 (14) % stream format: SP3 18 | STRFMT_RNXCLK(15) % stream format: RINEX CLK 19 | STRFMT_SBAS (16) % stream format: SBAS messages 20 | STRFMT_NMEA (17) % stream format: NMEA 0183 21 | MAXRCVFMT (12) % max number of receiver format 22 | end 23 | end -------------------------------------------------------------------------------- /+gt/+C/STR_MODE.m: -------------------------------------------------------------------------------- 1 | classdef STR_MODE < double 2 | enumeration 3 | STR_MODE_R (1) % stream mode: read 4 | STR_MODE_W (2) % stream mode: write 5 | STR_MODE_RW(3) % stream mode: read/write 6 | end 7 | end -------------------------------------------------------------------------------- /+gt/+C/SWITCH.m: -------------------------------------------------------------------------------- 1 | classdef SWITCH < double 2 | enumeration 3 | OFF(0) % OFF 4 | ON (1) % ON 5 | end 6 | end -------------------------------------------------------------------------------- /+gt/+C/SYS.m: -------------------------------------------------------------------------------- 1 | classdef SYS < double 2 | enumeration 3 | SYS_NONE(0) % navigation system: none 4 | SYS_GPS (1) % navigation system: GPS 5 | SYS_SBS (2) % navigation system: SBAS 6 | SYS_GLO (4) % navigation system: GLONASS 7 | SYS_GAL (8) % navigation system: Galileo 8 | SYS_QZS (16) % navigation system: QZSS 9 | SYS_CMP (32) % navigation system: BeiDou 10 | SYS_IRN (64) % navigation system: IRNS 11 | SYS_LEO (128) % navigation system: LEO 12 | SYS_ALL (255) % navigation system: all 13 | end 14 | end -------------------------------------------------------------------------------- /+gt/+C/SYSCOL.m: -------------------------------------------------------------------------------- 1 | function C_SYS = SYSCOL(~) 2 | C_SYS(1,:) = [0, 128, 0]/255; 3 | C_SYS(2,:) = [0, 128, 128]/255; 4 | C_SYS(4,:) = [255, 170, 0]/255; 5 | C_SYS(8,:) = [255, 0, 255]/255; 6 | C_SYS(16,:) = [0, 0, 255]/255; 7 | C_SYS(32,:) = [255, 0, 0]/255; 8 | C_SYS(64,:) = [124, 75, 41]/255; 9 | C_SYS(128,:) = [192, 192, 192]/255; 10 | C_SYS(255,:) = [0, 0, 0]/255; -------------------------------------------------------------------------------- /+gt/+C/SYSNAME.m: -------------------------------------------------------------------------------- 1 | classdef SYSNAME < double 2 | enumeration 3 | GPS (1) % navigation system: GPS 4 | SBAS (2) % navigation system: SBAS 5 | GLONASS (4) % navigation system: GLONASS 6 | Galileo (8) % navigation system: Galileo 7 | QZSS (16) % navigation system: QZSS 8 | BeiDou (32) % navigation system: BeiDou 9 | IRNSS (64) % navigation system: IRNSS 10 | LEO (128) % navigation system: LEO 11 | ALL (255) % All navigation satellites 12 | end 13 | end -------------------------------------------------------------------------------- /+gt/+C/TIDE.m: -------------------------------------------------------------------------------- 1 | classdef TIDE < double 2 | enumeration 3 | TIDE_OFF(0) % OFF 4 | TIDE_ON (1) % ON 5 | TIDE_OTL(2) % OTL 6 | end 7 | end -------------------------------------------------------------------------------- /+gt/+C/TIMEF.m: -------------------------------------------------------------------------------- 1 | classdef TIMEF < double 2 | enumeration 3 | TIMEF_TOW(0) % TOW 4 | TIMEF_HMS(1) % hh:mm:ss 5 | end 6 | end -------------------------------------------------------------------------------- /+gt/+C/TIMES.m: -------------------------------------------------------------------------------- 1 | classdef TIMES < double 2 | enumeration 3 | TIMES_GPST(0) % time system: gps time 4 | TIMES_UTC (1) % time system: utc 5 | TIMES_JST (2) % time system: jst 6 | end 7 | end -------------------------------------------------------------------------------- /+gt/+C/TRACE.m: -------------------------------------------------------------------------------- 1 | classdef TRACE < double 2 | enumeration 3 | TRACE_OFF(0) 4 | TRACE_LV1(1) 5 | TRACE_LV2(2) 6 | TRACE_LV3(3) 7 | TRACE_LV4(4) 8 | TRACE_LV5(5) 9 | end 10 | end -------------------------------------------------------------------------------- /+gt/+C/TROPOPT.m: -------------------------------------------------------------------------------- 1 | classdef TROPOPT < double 2 | enumeration 3 | TROPOPT_OFF (0) % troposphere option: correction off 4 | TROPOPT_SAAS(1) % troposphere option: Saastamoinen model 5 | TROPOPT_SBAS(2) % troposphere option: SBAS model 6 | TROPOPT_EST (3) % troposphere option: ZTD estimation 7 | TROPOPT_ESTG(4) % troposphere option: ZTD+grad estimation 8 | TROPOPT_ZTD (5) % troposphere option: ZTD correction 9 | end 10 | end -------------------------------------------------------------------------------- /+gt/+C/TSYS.m: -------------------------------------------------------------------------------- 1 | classdef TSYS < double 2 | enumeration 3 | TSYS_GPS(0) % time system: GPS time 4 | TSYS_UTC(1) % time system: UTC 5 | TSYS_GLO(2) % time system: GLONASS time 6 | TSYS_GAL(3) % time system: Galileo time 7 | TSYS_QZS(4) % time system: QZSS time 8 | TSYS_CMP(5) % time system: BeiDou time 9 | TSYS_IRN(6) % time system: IRNSS time 10 | end 11 | end -------------------------------------------------------------------------------- /+gt/+Gfun/pntpos.m: -------------------------------------------------------------------------------- 1 | function [gsol, gstat] = pntpos(gobs, gnav, gopt) 2 | % pntpos: Call pntpos() in RTKLIB 3 | % ------------------------------------------------------------- 4 | % Compute receiver position, velocity, clock bias by single-point 5 | % positioning. 6 | % 7 | % Call rtklib.pntpos. Input is the gt objects. 8 | % 9 | % Usage: ------------------------------------------------------ 10 | % [gsol, gstat] = gt.Gfun.pntpos(gobs, gnav, gopt) 11 | % 12 | % Input: ------------------------------------------------------ 13 | % gobs : 1x1, gt.Gobs, GNSS observation object 14 | % gnav : 1x1, gt.Gnav, GNSS navigation data object 15 | % gopt : 1x1, gt.Gopt, RTKLIB process option object 16 | % 17 | % Output: ------------------------------------------------------ 18 | % gsol : 1x1, gt.Gsol, GNSS solution object 19 | % gstat: 1x1, gt.Gstat, GNSS solution status object 20 | % 21 | % Author: ------------------------------------------------------ 22 | % Taro Suzuki 23 | % 24 | arguments 25 | gobs gt.Gobs 26 | gnav gt.Gnav 27 | gopt gt.Gopt 28 | end 29 | [sol, stat] = rtklib.pntpos(gobs.struct, gnav.struct, gopt.struct); 30 | gsol = gt.Gsol(sol); 31 | gstat = gt.Gstat(stat); -------------------------------------------------------------------------------- /+gt/README.md: -------------------------------------------------------------------------------- 1 | # GT Class 2 | | Class name | Function | 3 | | ---- | ---- | 4 | | Gobs | GNSS observation: read/edit/write/visualization | 5 | | Gnav | GNSS navigation: read/edit/write/visualization | 6 | | Gtime | GPS time: time system conversion | 7 | | Gpos | Geodetic position: coordinate system conversion | 8 | | Gvel | Velocity: coordinate system conversion | 9 | | Gcov | Covariance: coordinate system conversion | 10 | | Gsat | Satellite-related data: edit/visualization | 11 | | Gsol | Position solution: read/edit/write/visualization | 12 | | Gstat | Position status: read/edit/write/visualization | 13 | | Grtk | RTK control class | 14 | | Gopt | Process option: read/edit/write | 15 | | Gfun | Wrapper for positioning function | 16 | | C | Define constants | 17 | -------------------------------------------------------------------------------- /+rtklib/adjgpsweek.m: -------------------------------------------------------------------------------- 1 | % ADJGPSWEEK Adjust GPS week number using cpu time 2 | % adjweek = ADJGPSWEEK(week) 3 | % 4 | % Inputs: 5 | % week : Mx1, non-adjusted GPS week number (0-1023) 6 | % 7 | % Outputs: 8 | % adjweek : Mx1, adjusted GPS week number 9 | % 10 | % Author: 11 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/adjgpsweek.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/adjgpsweek.mexa64 -------------------------------------------------------------------------------- /+rtklib/adjgpsweek.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/adjgpsweek.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/adjgpsweek.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/adjgpsweek.mexw64 -------------------------------------------------------------------------------- /+rtklib/antmodel.m: -------------------------------------------------------------------------------- 1 | % ANTMODEL Compute receiver antenna offset by antenna phase center parameters 2 | % dant = ANTMODEL(pcv, del, az, el, opt, freqidx) 3 | % 4 | % Inputs: 5 | % pcv : 1x1, PCV struct 6 | % del : 1x3, antenna delta {e,n,u} (m) 7 | % az : MxN, satellite azimuth (deg) 8 | % M: number of epochs 9 | % N: number of satellites 10 | % el : MxN, satellite elevation (deg) 11 | % opt : 1x1, option (0:only offset, 1:offset+pcv) 12 | % freqidx : 1x1, frequency index 13 | % 14 | % Outputs: 15 | % dant : MxN, range offsets for specified frequency (m) 16 | % 17 | % Notes: 18 | % freq idx 0 1 2 3 4 19 | % -------------------------------------- 20 | % GPS L1 L2 L5 - - 21 | % GLONASS G1 G2 G3 - - (G1=G1,G1a,G2=G2,G2a) 22 | % Galileo E1 E5b E5a E6 E5ab 23 | % QZSS L1 L2 L5 L6 - 24 | % SBAS L1 - L5 - - 25 | % BDS B1 B2 B2a B3 B2ab (B1=B1I,B1C,B2=B2I,B2b) 26 | % NavIC L5 S - - - 27 | % 28 | % Author: 29 | % Taro Suzuki 30 | -------------------------------------------------------------------------------- /+rtklib/antmodel.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/antmodel.mexa64 -------------------------------------------------------------------------------- /+rtklib/antmodel.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/antmodel.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/antmodel.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/antmodel.mexw64 -------------------------------------------------------------------------------- /+rtklib/antmodel_s.m: -------------------------------------------------------------------------------- 1 | % ANTMODEL_S Compute satellite antenna offset by antenna phase center parameters 2 | % dant = ANTMODEL_S(pcvs, sat, nadir, freqidx) 3 | % 4 | % Inputs: 5 | % pcvs : MAXSATx1, array of PCV struct 6 | % sat : 1xN, satellite number defined in RTKLIB 7 | % nadir : MxN, nadir angle for satellite (deg) 8 | % freqidx : 1x1, frequency index 9 | % 10 | % Outputs: 11 | % dant : MxN, range offsets for specified frequency (m) 12 | % 13 | % Notes: 14 | % freq idx 0 1 2 3 4 15 | % -------------------------------------- 16 | % GPS L1 L2 L5 - - 17 | % GLONASS G1 G2 G3 - - (G1=G1,G1a,G2=G2,G2a) 18 | % Galileo E1 E5b E5a E6 E5ab 19 | % QZSS L1 L2 L5 L6 - 20 | % SBAS L1 - L5 - - 21 | % BDS B1 B2 B2a B3 B2ab (B1=B1I,B1C,B2=B2I,B2b) 22 | % NavIC L5 S - - - 23 | % 24 | % Author: 25 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/antmodel_s.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/antmodel_s.mexa64 -------------------------------------------------------------------------------- /+rtklib/antmodel_s.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/antmodel_s.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/antmodel_s.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/antmodel_s.mexw64 -------------------------------------------------------------------------------- /+rtklib/bdt2gpst.m: -------------------------------------------------------------------------------- 1 | % BDT2GPST Convert BDT epoch to GPST epoch 2 | % epoch = BDT2GPST(bdtepoch) 3 | % 4 | % Inputs: 5 | % bdtepoch: Nx6, calendar day/time in BeiDou time (BDT) 6 | % {year, month, day, hour, minute, second} 7 | % 8 | % Outputs: 9 | % epoch : Nx6, calendar day/time in GPST 10 | % {year, month, day, hour, minute, second} 11 | % 12 | % Author: 13 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/bdt2gpst.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/bdt2gpst.mexa64 -------------------------------------------------------------------------------- /+rtklib/bdt2gpst.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/bdt2gpst.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/bdt2gpst.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/bdt2gpst.mexw64 -------------------------------------------------------------------------------- /+rtklib/bdttow2epoch.m: -------------------------------------------------------------------------------- 1 | % BDTTOW2EPOCH Convert BeiDou time of week to calendar day/time 2 | % epoch = BDTTOW2EPOCH(tow, week) 3 | % 4 | % Inputs: 5 | % tow : Nx1, BeiDou time of week (sec) 6 | % week : Nx1, BeiDou week 7 | % 8 | % Outputs: 9 | % epoch : Nx1, calendar day/time 10 | % {year, month, day, hour, minute, second} 11 | % 12 | % Author: 13 | % Taro Suzuki 14 | -------------------------------------------------------------------------------- /+rtklib/bdttow2epoch.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/bdttow2epoch.mexa64 -------------------------------------------------------------------------------- /+rtklib/bdttow2epoch.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/bdttow2epoch.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/bdttow2epoch.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/bdttow2epoch.mexw64 -------------------------------------------------------------------------------- /+rtklib/code2freq.m: -------------------------------------------------------------------------------- 1 | % CODE2FREQ Convert system and obs code to carrier frequency 2 | % freq = CODE2FREQ(sys, code) 3 | % freq = CODE2FREQ(sys, code, fcn) 4 | % 5 | % Inputs: 6 | % sys : 1xN, satellite system (SYS_???) 7 | % code : 1xN, obs code (CODE_???) 8 | % fcb : 1xN, frequency channel number for GLONASS 9 | % 10 | % Outputs: 11 | % freq : 1xN, carrier frequency (Hz) (0.0: error) 12 | % 13 | % Author: 14 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/code2freq.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/code2freq.mexa64 -------------------------------------------------------------------------------- /+rtklib/code2freq.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/code2freq.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/code2freq.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/code2freq.mexw64 -------------------------------------------------------------------------------- /+rtklib/code2idx.m: -------------------------------------------------------------------------------- 1 | % CODE2IDX Convert system and obs code to frequency index 2 | % idx = CODE2IDX(sys, code) 3 | % 4 | % Inputs: 5 | % sys : 1xN, satellite system (SYS_???) 6 | % code : 1xN, obs code (CODE_???) 7 | % 8 | % Outputs: 9 | % idx : frequency index (-1: error) 10 | % 11 | % Notes: 12 | % freq idx 0 1 2 3 4 13 | % -------------------------------------- 14 | % GPS L1 L2 L5 - - 15 | % GLONASS G1 G2 G3 - - (G1=G1,G1a,G2=G2,G2a) 16 | % Galileo E1 E5b E5a E6 E5ab 17 | % QZSS L1 L2 L5 L6 - 18 | % SBAS L1 - L5 - - 19 | % BDS B1 B2 B2a B3 B2ab (B1=B1I,B1C,B2=B2I,B2b) 20 | % NavIC L5 S - - - 21 | % Author: 22 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/code2idx.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/code2idx.mexa64 -------------------------------------------------------------------------------- /+rtklib/code2idx.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/code2idx.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/code2idx.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/code2idx.mexw64 -------------------------------------------------------------------------------- /+rtklib/code2obs.m: -------------------------------------------------------------------------------- 1 | % CODE2OBS Convert obs code to obs code string 2 | % obs = CODE2OBS(code) 3 | % 4 | % Inputs: 5 | % code : 1xN, obs code (CODE_???) 6 | % 7 | % Outputs: 8 | % obs : 1xN, obs code string cell array {'1C', '1P', '1P',...} 9 | % 10 | % Notes: 11 | % obs codes are based on RINEX 3.04 12 | % 13 | % Author: 14 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/code2obs.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/code2obs.mexa64 -------------------------------------------------------------------------------- /+rtklib/code2obs.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/code2obs.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/code2obs.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/code2obs.mexw64 -------------------------------------------------------------------------------- /+rtklib/convgpx.m: -------------------------------------------------------------------------------- 1 | % CONVGPX Convert from solution files to GPX files 2 | % CONVGPX(file, qflag, outtrk, outpnt, outalt) 3 | % 4 | % Inputs: 5 | % file : 1x1, RTKLIB solution file (???.pos) 6 | % (wild-card (*) is expanded) 7 | % [qflag] : 1x1, Quality flag (0:all), Dafult: 0 8 | % [outtrk]: 1x1, Output track (0:off,1:on), Dafult: 1 9 | % [outpnt]: 1x1, Output waypoint (0:off,1:on), Dafult: 1 10 | % [outalt]: 1x1, Output altitude, Dafult: 0 11 | % (0:off,1:elipsoidal,2:geodetic) 12 | % 13 | % Author: 14 | % Taro Suzuki 15 | -------------------------------------------------------------------------------- /+rtklib/convgpx.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/convgpx.mexa64 -------------------------------------------------------------------------------- /+rtklib/convgpx.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/convgpx.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/convgpx.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/convgpx.mexw64 -------------------------------------------------------------------------------- /+rtklib/convkml.m: -------------------------------------------------------------------------------- 1 | % CONVKML Convert from solution files to Google Earth KML files 2 | % CONVKML(file, qflag, tcolor, pcolor, outalt) 3 | % 4 | % Inputs: 5 | % file : 1x1, RTKLIB solution file (???.pos) 6 | % (wild-card (*) is expanded) 7 | % [qflag] : 1x1, Quality flag (0:all), Dafult: 0 8 | % [tcolor]: 1x1, Track color, Dafult: 1 9 | % (0:none,1:white,2:green,3:orange,4:red,5:yellow) 10 | % [pcolor]: 1x1, Point color, Dafult: 5 11 | % (0:none,1:white,2:green,3:orange,4:red,5:by qflag) 12 | % [outalt]: 1x1, Output altitude, Dafult: 0 13 | % (0:off,1:elipsoidal,2:geodetic) 14 | % 15 | % Author: 16 | % Taro Suzuki 17 | -------------------------------------------------------------------------------- /+rtklib/convkml.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/convkml.mexa64 -------------------------------------------------------------------------------- /+rtklib/convkml.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/convkml.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/convkml.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/convkml.mexw64 -------------------------------------------------------------------------------- /+rtklib/covecef.m: -------------------------------------------------------------------------------- 1 | % COVECEF Transform local ENU covariance to xyz-ECEF coordinate 2 | % Qecef = COVECEF(Qenu, orgllh) 3 | % 4 | % Inputs: 5 | % Qenu : 3x3xM, covariance in local ENU coordinate (m or m/s) 6 | % orgllh : 1x3, origin of geodetic position (deg, deg, m) 7 | % 8 | % Outputs: 9 | % Qecef : 3x3xM, covariance in xyz-ECEF coordinate (m or m/s) 10 | % 11 | % Author: 12 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/covecef.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/covecef.mexa64 -------------------------------------------------------------------------------- /+rtklib/covecef.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/covecef.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/covecef.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/covecef.mexw64 -------------------------------------------------------------------------------- /+rtklib/covecefsol.m: -------------------------------------------------------------------------------- 1 | % COVECEFSOL Transform local ENU covariance to xyz-ECEF coordinate 2 | % Qecef = COVECEFSOL(Qenu, orgllh) 3 | % 4 | % Inputs: 5 | % Qenu : Mx6, covariance in local ENU coordinate (m or m/s) 6 | % RTKLIB solution format: {ee, nn, uu, en, nu, ue} 7 | % orgllh : 1x3, origin of geodetic position (deg, deg, m) 8 | % 9 | % Outputs: 10 | % Qecef : Mx6, Covariance in xyz-ECEF coordinate (m or m/s) 11 | % RTKLIB solution format: {xx, yy, zz, xy, yz, zx} 12 | % 13 | % Author: 14 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/covecefsol.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/covecefsol.mexa64 -------------------------------------------------------------------------------- /+rtklib/covecefsol.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/covecefsol.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/covecefsol.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/covecefsol.mexw64 -------------------------------------------------------------------------------- /+rtklib/covenu.m: -------------------------------------------------------------------------------- 1 | % COVENU Transform ECEF covariance to local ENU coordinate 2 | % Qenu = COVENU(Qecef, orgllh) 3 | % 4 | % Inputs: 5 | % Qecef : 3x3xM, covariance in xyz-ECEF coordinate (m or m/s) 6 | % orgllh : 1x3, orgin of geodetic position (deg, deg, m) 7 | % 8 | % Outputs: 9 | % Qenu : 3x3xM, covariance in ENU coordinate (m or m/s) 10 | % 11 | % Author: 12 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/covenu.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/covenu.mexa64 -------------------------------------------------------------------------------- /+rtklib/covenu.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/covenu.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/covenu.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/covenu.mexw64 -------------------------------------------------------------------------------- /+rtklib/covenusol.m: -------------------------------------------------------------------------------- 1 | % COVENUSOL Transform xyz-ECEF covariance to local ENU coordinate 2 | % Qenu = COVENUSOL(Qecef, orgllh) 3 | % 4 | % Inputs: 5 | % Qecef : Mx6, Covariance in xyz-ECEF coordinate (m or m/s) 6 | % RTKLIB solution format: {xx, yy, zz, xy, yz, zx} 7 | % orgllh : 1x3, origin of geodetic position (deg, deg, m) 8 | % 9 | % Outputs: 10 | % Qenu : Mx6, covariance in local ENU coordinate (m or m/s) 11 | % RTKLIB solution format: {ee, nn, uu, en, nu, ue} 12 | % 13 | % Author: 14 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/covenusol.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/covenusol.mexa64 -------------------------------------------------------------------------------- /+rtklib/covenusol.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/covenusol.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/covenusol.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/covenusol.mexw64 -------------------------------------------------------------------------------- /+rtklib/deg2dms.m: -------------------------------------------------------------------------------- 1 | % DEG2DMS Convert degree to degree-minute-second 2 | % dms = DEG2DMS(deg) 3 | % dms = DEG2DMS(deg, ndec) 4 | % 5 | % Inputs: 6 | % deg : Mx1, degree (deg) 7 | % ndec : 1x1, number of decimals of second {default: 9} 8 | % 9 | % Outputs: 10 | % dms : Mx3, degree-minute-second (deg, min, sec) 11 | % 12 | % Author: 13 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/deg2dms.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/deg2dms.mexa64 -------------------------------------------------------------------------------- /+rtklib/deg2dms.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/deg2dms.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/deg2dms.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/deg2dms.mexw64 -------------------------------------------------------------------------------- /+rtklib/dms2deg.m: -------------------------------------------------------------------------------- 1 | % DMS2DEG Convert degree-minute-second to degree 2 | % deg = DMS2DEG(dms) 3 | % 4 | % Inputs: 5 | % dms : Mx3, degree-minute-second (deg, min, sec) 6 | % 7 | % Outputs: 8 | % deg : Mx1, degree (deg) 9 | % 10 | % Author: 11 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/dms2deg.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/dms2deg.mexa64 -------------------------------------------------------------------------------- /+rtklib/dms2deg.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/dms2deg.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/dms2deg.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/dms2deg.mexw64 -------------------------------------------------------------------------------- /+rtklib/dops.m: -------------------------------------------------------------------------------- 1 | % DOPS Compute DOP (dilution of precision) from azimuth and elevation 2 | % dop = DOPS(az, el, elmin) 3 | % 4 | % Inputs: 5 | % az : MxN, satellite azimuth (deg) 6 | % M: number of epochs 7 | % N: number of satellites {N>=4} 8 | % el : MxN, satellite elevation (deg) 9 | % [elmin] : 1x1, elevation cut-off angle (deg) (default: 0 deg) 10 | % 11 | % Outputs: 12 | % dop : Mx4, DOPs {GDOP, PDOP, HDOP, VDOP} 13 | % 14 | % Author: 15 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/dops.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/dops.mexa64 -------------------------------------------------------------------------------- /+rtklib/dops.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/dops.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/dops.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/dops.mexw64 -------------------------------------------------------------------------------- /+rtklib/ecef2enu.m: -------------------------------------------------------------------------------- 1 | % ECEF2ENU Transform ECEF "vector" to local tangential coordinate 2 | % [venu, E] = ECEF2ENU(vecef, orgllh) 3 | % 4 | % Inputs: 5 | % vecef : Mx3, vector in ECEF coordinate (m or m/s) 6 | % orgllh: 1x3, origin of geodetic position (deg, deg, m) 7 | % 8 | % Outputs: 9 | % venu : Mx3, vector in ENU coordinate (m or m/s) 10 | % E : 3x3, ECEF to ENU transformation matrix 11 | % 12 | % Notes: Use xyz2enu to transform ECEF position to local ENU position 13 | % 14 | % Author: 15 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/ecef2enu.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/ecef2enu.mexa64 -------------------------------------------------------------------------------- /+rtklib/ecef2enu.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/ecef2enu.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/ecef2enu.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/ecef2enu.mexw64 -------------------------------------------------------------------------------- /+rtklib/eci2ecef.m: -------------------------------------------------------------------------------- 1 | % ECI2ECEF Compute ECI to ECEF transformation matrix 2 | % [U, gmst] = ECI2ECEF(utcepoch, erpv) 3 | % 4 | % Inputs: 5 | % utcepoch : Mx6, calendar day/time in UTC 6 | % {year, month, day, hour, minute, second} 7 | % erpv : 1x4, erp values {xp, yp, ut1_utc, lod} (rad, rad, s, s/d) 8 | % 9 | % Outputs: 10 | % U : 3x3xM, ECI to ECEF transformation matrix 11 | % gmst : Mx1, Greenwich Mean Sidereal Time (rad) 12 | % 13 | % Author: 14 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/eci2ecef.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/eci2ecef.mexa64 -------------------------------------------------------------------------------- /+rtklib/eci2ecef.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/eci2ecef.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/eci2ecef.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/eci2ecef.mexw64 -------------------------------------------------------------------------------- /+rtklib/enu2ecef.m: -------------------------------------------------------------------------------- 1 | % ENU2ECEF Transform ENU "vector" to ECEF coordinate 2 | % [vecef, E] = ENU2ECEF(venu, orgllh) 3 | % 4 | % Inputs: 5 | % venu : Mx3, vector in ENU coordinate (m or m/s) 6 | % orgllh : 1x3, origin of geodetic position (deg, deg, m) 7 | % 8 | % Outputs: 9 | % vecef : Mx3, vector in ECEF coordinate (m or m/s) 10 | % E : 3x3, ENU to ECEF transformation matrix 11 | % 12 | % Notes: Use enu2xyz to transform local ENU position to ECEF position 13 | % 14 | % Author: 15 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/enu2ecef.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/enu2ecef.mexa64 -------------------------------------------------------------------------------- /+rtklib/enu2ecef.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/enu2ecef.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/enu2ecef.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/enu2ecef.mexw64 -------------------------------------------------------------------------------- /+rtklib/enu2llh.m: -------------------------------------------------------------------------------- 1 | % ENU2LLH Transform local ENU position to geodetic position 2 | % [llh, E] = ENU2LLH(enu, orgllh) 3 | % 4 | % Inputs: 5 | % enu : Mx3, local ENU position (m) 6 | % orgllh : 1x3, origin of geodetic position (deg, deg, m) 7 | % 8 | % Outputs: 9 | % llh : Mx3, geodetic position (deg, deg, m) 10 | % E : 3x3, ENU to ECEF transformation matrix 11 | % 12 | % Author: 13 | % Taro Suzuki 14 | -------------------------------------------------------------------------------- /+rtklib/enu2llh.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/enu2llh.mexa64 -------------------------------------------------------------------------------- /+rtklib/enu2llh.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/enu2llh.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/enu2llh.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/enu2llh.mexw64 -------------------------------------------------------------------------------- /+rtklib/enu2xyz.m: -------------------------------------------------------------------------------- 1 | % ENU2XYZ Transform local ENU position to ECEF position 2 | % [xyz, E] = ENU2XYZ(enu, orgllh) 3 | % 4 | % Inputs: 5 | % enu : Mx3, local ENU position (m) 6 | % orgllh : 1x3, origin of geodetic position (deg, deg, m) 7 | % 8 | % Outputs: 9 | % xyz : Mx3, geodetic position in ECEF coordinate (m) 10 | % E : 3x3, ENU to ECEF transformation matrix 11 | % 12 | % Notes: Use enu2ecef to rotate a vector between two coordinate systems 13 | % 14 | % Author: 15 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/enu2xyz.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/enu2xyz.mexa64 -------------------------------------------------------------------------------- /+rtklib/enu2xyz.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/enu2xyz.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/enu2xyz.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/enu2xyz.mexw64 -------------------------------------------------------------------------------- /+rtklib/eph2clk.m: -------------------------------------------------------------------------------- 1 | % EPH2CLK Compute satellite clock bias with broadcast ephemeris (GPS, GAL, QZS, BDS, IRN) 2 | % dts = EPH2CLK(epoch, eph) 3 | % 4 | % Inputs: 5 | % epoch : Mx6, calendar day/time 6 | % {year, month, day, hour, minute, second} 7 | % eph : 1x1, ephemeris struct 8 | % 9 | % Outputs: 10 | % dts : Mx1, satellite clock bias (s) 11 | % 12 | % Notes: 13 | % satellite clock does not include relativity correction and tdg 14 | % 15 | % Author: 16 | % Taro Suzuki 17 | -------------------------------------------------------------------------------- /+rtklib/eph2clk.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/eph2clk.mexa64 -------------------------------------------------------------------------------- /+rtklib/eph2clk.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/eph2clk.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/eph2clk.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/eph2clk.mexw64 -------------------------------------------------------------------------------- /+rtklib/eph2pos.m: -------------------------------------------------------------------------------- 1 | % EPH2POS Compute satellite position and clock bias with broadcast ephemeris (GPS, GAL, QZS, BDS, IRN) 2 | % [rs, dts, var] = EPH2POS(epoch, eph) 3 | % 4 | % Inputs: 5 | % epoch : Mx6, calendar day/time 6 | % {year, month, day, hour, minute, second} 7 | % eph : 1x1, ephemeris struct 8 | % 9 | % Outputs: 10 | % rs : Mx3, satellite position in ECEF {x,y,z} (m) 11 | % dts : Mx1, satellite clock bias (s) 12 | % var : Mx1, satellite position and clock variance (m^2) 13 | % 14 | % Notes: 15 | % satellite clock includes relativity correction without code bias 16 | % 17 | % Author: 18 | % Taro Suzuki 19 | -------------------------------------------------------------------------------- /+rtklib/eph2pos.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/eph2pos.mexa64 -------------------------------------------------------------------------------- /+rtklib/eph2pos.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/eph2pos.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/eph2pos.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/eph2pos.mexw64 -------------------------------------------------------------------------------- /+rtklib/epoch2bdttow.m: -------------------------------------------------------------------------------- 1 | % EPOCH2BDTTOW Convert calendar day/time to BeiDou time of week 2 | % [tow, week] = EPOCH2BDTTOW(epoch) 3 | % 4 | % Inputs: 5 | % epoch : Mx6, calendar day/time 6 | % {year, month, day, hour, minute, second} 7 | % 8 | % Outputs: 9 | % tow : Mx1, BeiDou time of week (sec) 10 | % week : Mx1, BeiDou week 11 | % 12 | % Author: 13 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/epoch2bdttow.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/epoch2bdttow.mexa64 -------------------------------------------------------------------------------- /+rtklib/epoch2bdttow.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/epoch2bdttow.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/epoch2bdttow.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/epoch2bdttow.mexw64 -------------------------------------------------------------------------------- /+rtklib/epoch2doy.m: -------------------------------------------------------------------------------- 1 | % EPOCH2DOY Convert calendar day/time to day of year 2 | % doy = EPOCH2DOY(epoch) 3 | % doy = EPOCH2DOY(epoch, utcflag) 4 | % 5 | % Inputs: 6 | % epoch : Mx6, calendar day/time 7 | % {year, month, day, hour, minute, second} 8 | % utcflag : 1x1, UTC flag (0: GPST, 1:UTC time) {default = GPST} 9 | % 10 | % Outputs: 11 | % doy : Mx1, day of year (days) 12 | % 13 | % Author: 14 | % Taro Suzuki 15 | -------------------------------------------------------------------------------- /+rtklib/epoch2doy.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/epoch2doy.mexa64 -------------------------------------------------------------------------------- /+rtklib/epoch2doy.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/epoch2doy.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/epoch2doy.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/epoch2doy.mexw64 -------------------------------------------------------------------------------- /+rtklib/epoch2gsttow.m: -------------------------------------------------------------------------------- 1 | % EPOCH2GSTTOW Convert calendar day/time to Galileo time of week 2 | % [tow, week] = EPOCH2GSTTOW(epoch) 3 | % 4 | % Inputs: 5 | % epoch : Mx6, calendar day/time 6 | % {year, month, day, hour, minute, second} 7 | % 8 | % Outputs: 9 | % tow : Mx1, Galileo time of week (sec) 10 | % week : Mx1, Galileo week 11 | % 12 | % Author: 13 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/epoch2gsttow.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/epoch2gsttow.mexa64 -------------------------------------------------------------------------------- /+rtklib/epoch2gsttow.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/epoch2gsttow.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/epoch2gsttow.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/epoch2gsttow.mexw64 -------------------------------------------------------------------------------- /+rtklib/epoch2tow.m: -------------------------------------------------------------------------------- 1 | % EPOCH2TOW Convert calendar day/time to GPS time of week 2 | % [tow, week] = EPOCH2TOW(epoch) 3 | % [tow, week] = EPOCH2TOW(epoch, utcflag) 4 | % 5 | % Inputs: 6 | % epoch : Mx6, calendar day/time 7 | % {year, month, day, hour, minute, second} 8 | % utcflag : 1x1, UTC flag (0: GPST, 1:UTC time) {default = GPST} 9 | % 10 | % Outputs: 11 | % tow : Mx1, GPS time of week (sec) 12 | % week : Mx1, GPS week 13 | % 14 | % Author: 15 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/epoch2tow.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/epoch2tow.mexa64 -------------------------------------------------------------------------------- /+rtklib/epoch2tow.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/epoch2tow.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/epoch2tow.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/epoch2tow.mexw64 -------------------------------------------------------------------------------- /+rtklib/expath.m: -------------------------------------------------------------------------------- 1 | % EXPATH Expand file path with wild-card (*) in file 2 | % paths = EXPATH(path) 3 | % 4 | % Inputs: 5 | % path : 1x1, file path to expand 6 | % 7 | % Outputs: 8 | % paths : Nx1, expanded file paths (cell array) 9 | % 10 | % Notes: 11 | % The order of expanded files is alphabetical order 12 | % 13 | % Author: 14 | % Taro Suzuki 15 | -------------------------------------------------------------------------------- /+rtklib/expath.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/expath.mexa64 -------------------------------------------------------------------------------- /+rtklib/expath.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/expath.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/expath.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/expath.mexw64 -------------------------------------------------------------------------------- /+rtklib/geodist.m: -------------------------------------------------------------------------------- 1 | % GEODIST Compute geometric distance and receiver-to-satellite unit vector 2 | % [d, ex, ey, ez] = GEODIST(rsx, rsx, rsz, rr) 3 | % 4 | % Inputs: 5 | % rsx : MxN, satellite position X in ECEF (m) 6 | % M: number of epochs 7 | % N: number of satellites 8 | % rsy : MxN, satellite position Y in ECEF (m) 9 | % rsz : MxN, satellite position Z in ECEF (m) 10 | % rr : Mx3 or 1x3, receiver position in ECEF (m) 11 | % 12 | % Outputs: 13 | % d : MxN, geometric distance (m) (-1: error/no satellite position) 14 | % ex : MxN, line-of-sight vector X in ECEF coordinate 15 | % ey : MxN, line-of-sight vector Y in ECEF coordinate 16 | % ez : MxN, line-of-sight vector Z in ECEF coordinate 17 | % 18 | % Notes: 19 | % Distance includes Sagnac effect correction 20 | % 21 | % Author: 22 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/geodist.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/geodist.mexa64 -------------------------------------------------------------------------------- /+rtklib/geodist.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/geodist.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/geodist.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/geodist.mexw64 -------------------------------------------------------------------------------- /+rtklib/geoidh.m: -------------------------------------------------------------------------------- 1 | % GEOIDH Get geoid height from geoid model 2 | % geoh = GEOIDH(lat, lon) 3 | % geoh = GEOIDH(lat, lon, model, file) 4 | % 5 | % Inputs: 6 | % lat : Mx1, Latitude(degree) 7 | % lon : Mx1, Longitude(degree) 8 | % model : 1x1, geoid model type 9 | % 0: EMBEDDED (default) 1: EGM96_M150, 10 | % 2: EGM2008_M25, 3: EGM2008_M10, 4: GSI2000_M15 11 | % [file] : 1x1, geoid model file path 12 | % 13 | % Outputs: 14 | % geoh : Mx1, geoid height (m) (0.0:error) 15 | % 16 | % Note: 17 | % RTKLIB embedded geoid model (EGM96, 1x1deg) is used in default 18 | % the following geoid models can be used 19 | % EGM96_M150: WW15MGH.DAC: EGM96 15x15" binary grid height 20 | % EGM2008_M25: Und_min2.5x2.5_egm2008_isw=82_WGS84_TideFree_SE: EGM2008 2.5x2.5" 21 | % EGM2008_M10: Und_min1x1_egm2008_isw=82_WGS84_TideFree_SE : EGM2008 1.0x1.0" 22 | % GSI2000_M15: gsigeome_ver4 : GSI geoid 2000 1.0x1.5" (japanese area) 23 | % 24 | % Author: 25 | % Taro Suzuki 26 | -------------------------------------------------------------------------------- /+rtklib/geoidh.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/geoidh.mexa64 -------------------------------------------------------------------------------- /+rtklib/geoidh.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/geoidh.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/geoidh.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/geoidh.mexw64 -------------------------------------------------------------------------------- /+rtklib/geph2clk.m: -------------------------------------------------------------------------------- 1 | % GEPH2CLK Compute satellite clock bias with GLONASS ephemeris 2 | % dts = GEPH2CLK(epoch, eph) 3 | % 4 | % Inputs: 5 | % epoch : Mx6, calendar day/time 6 | % {year, month, day, hour, minute, second} 7 | % geph : 1x1, GLONASS ephemeris struct 8 | % 9 | % Outputs: 10 | % dts : Mx1, satellite clock bias (s) 11 | % 12 | % Author: 13 | % Taro Suzuki 14 | -------------------------------------------------------------------------------- /+rtklib/geph2clk.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/geph2clk.mexa64 -------------------------------------------------------------------------------- /+rtklib/geph2clk.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/geph2clk.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/geph2clk.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/geph2clk.mexw64 -------------------------------------------------------------------------------- /+rtklib/geph2pos.m: -------------------------------------------------------------------------------- 1 | % GEPH2POS Compute satellite position and clock bias with GLONASS ephemeris 2 | % [rs, dts, var] = GEPH2POS(epoch, geph) 3 | % 4 | % Inputs: 5 | % epoch : Mx6, calendar day/time 6 | % {year, month, day, hour, minute, second} 7 | % geph : 1x1, GLONASS ephemeris struct 8 | % 9 | % Outputs: 10 | % rs : Mx3, satellite position in ECEF {x,y,z} (m) 11 | % dts : Mx1, satellite clock bias (s) 12 | % var : Mx1, satellite position and clock variance (m^2) 13 | % 14 | % Author: 15 | % Taro Suzuki 16 | -------------------------------------------------------------------------------- /+rtklib/geph2pos.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/geph2pos.mexa64 -------------------------------------------------------------------------------- /+rtklib/geph2pos.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/geph2pos.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/geph2pos.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/geph2pos.mexw64 -------------------------------------------------------------------------------- /+rtklib/geterp.m: -------------------------------------------------------------------------------- 1 | % GETERP Get earth rotation parameter values 2 | % erpv = GETERP(erp, epoch) 3 | % 4 | % Inputs: 5 | % erp : 1x1, earth rotation parameter struct 6 | % epoch : Mx6, calendar day/time in GPST 7 | % {year, month, day, hour, minute, second} 8 | % 9 | % Outputs: 10 | % erpv : Mx4, erp values {xp, yp, ut1_utc, lod} (rad, rad, s, s/d) 11 | % 12 | % Author: 13 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/geterp.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/geterp.mexa64 -------------------------------------------------------------------------------- /+rtklib/geterp.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/geterp.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/geterp.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/geterp.mexw64 -------------------------------------------------------------------------------- /+rtklib/gpst2bdt.m: -------------------------------------------------------------------------------- 1 | % GPST2BDT Convert GPST epoch to BDT epoch 2 | % bdtepoch = GPST2BDT(epoch) 3 | % 4 | % Inputs: 5 | % epoch : Mx6, calendar day/time in GPST 6 | % {year, month, day, hour, minute, second} 7 | % 8 | % Outputs: 9 | % bdtepoch: Mx6, calendar day/time in BeiDou time (BDT) 10 | % {year, month, day, hour, minute, second} 11 | % 12 | % Author: 13 | % Taro Suzuki 14 | -------------------------------------------------------------------------------- /+rtklib/gpst2bdt.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/gpst2bdt.mexa64 -------------------------------------------------------------------------------- /+rtklib/gpst2bdt.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/gpst2bdt.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/gpst2bdt.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/gpst2bdt.mexw64 -------------------------------------------------------------------------------- /+rtklib/gpst2utc.m: -------------------------------------------------------------------------------- 1 | % GPST2UTC Convert GPST epoch to UTC epoch 2 | % utcepoch = GPST2UTC(epoch) 3 | % 4 | % Inputs: 5 | % epoch : Mx6, calendar day/time in GPST 6 | % {year, month, day, hour, minute, second} 7 | % 8 | % Outputs: 9 | % utcepoch: Mx6, calendar day/time in UTC 10 | % {year, month, day, hour, minute, second} 11 | % 12 | % Author: 13 | % Taro Suzuki 14 | -------------------------------------------------------------------------------- /+rtklib/gpst2utc.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/gpst2utc.mexa64 -------------------------------------------------------------------------------- /+rtklib/gpst2utc.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/gpst2utc.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/gpst2utc.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/gpst2utc.mexw64 -------------------------------------------------------------------------------- /+rtklib/gsttow2epoch.m: -------------------------------------------------------------------------------- 1 | % GSTTOW2EPOCH Convert Galileo time of week to calendar day/time 2 | % epoch = GSTTOW2EPOCH(tow, week) 3 | % 4 | % Inputs: 5 | % tow : Nx1, Galileo time of week (sec) 6 | % week : Nx1, Galileo week 7 | % 8 | % Outputs: 9 | % epoch : Nx1, calendar day/time 10 | % {year, month, day, hour, minute, second} 11 | % 12 | % Author: 13 | % Taro Suzuki 14 | -------------------------------------------------------------------------------- /+rtklib/gsttow2epoch.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/gsttow2epoch.mexa64 -------------------------------------------------------------------------------- /+rtklib/gsttow2epoch.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/gsttow2epoch.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/gsttow2epoch.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/gsttow2epoch.mexw64 -------------------------------------------------------------------------------- /+rtklib/ionmapf.m: -------------------------------------------------------------------------------- 1 | % IONMAPF Compute ionospheric delay mapping function by single layer model 2 | % ionmap = IONMAPF(llh, az, el) 3 | % 4 | % Inputs: 5 | % llh : Mx3 or 1x3, receiver geodetic position (deg, deg, m) 6 | % az : MxN, satellite azimuth (deg) 7 | % M: number of epochs 8 | % N: number of satellites 9 | % el : MxN, satellite elevation (deg) 10 | % 11 | % Outputs: 12 | % ionmap : MxN, ionospheric mapping function 13 | % 14 | % Author: 15 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/ionmapf.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/ionmapf.mexa64 -------------------------------------------------------------------------------- /+rtklib/ionmapf.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/ionmapf.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/ionmapf.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/ionmapf.mexw64 -------------------------------------------------------------------------------- /+rtklib/ionmodel.m: -------------------------------------------------------------------------------- 1 | % IONMODEL Compute ionospheric delay by broadcast ionosphere model (klobuchar model) 2 | % [delay, var] = IONMODEL(epochs, ion, llh, az, el, freq) 3 | % 4 | % Inputs: 5 | % epoch : Mx6, calendar day/time in GPST 6 | % {year, month, day, hour, minute, second} 7 | % ion : 1x8, ionosphere model parameters {a0,a1,a2,a3,b0,b1,b2,b3} 8 | % llh : Mx3 or 1x3, receiver geodetic position (deg, deg, m) 9 | % az : MxN, satellite azimuth (deg) 10 | % M: number of epochs 11 | % N: number of satellites 12 | % el : MxN, satellite elevation (deg) 13 | % freq : 1xN, carrier frequency (Hz) 14 | % 15 | % Outputs: 16 | % delay : MxN, ionospheric delay (m) 17 | % var : MxN, variance of ionospheric delay (m^2) 18 | % 19 | % Notes: 20 | % Frequency compensation is applied 21 | % 22 | % Author: 23 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/ionmodel.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/ionmodel.mexa64 -------------------------------------------------------------------------------- /+rtklib/ionmodel.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/ionmodel.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/ionmodel.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/ionmodel.mexw64 -------------------------------------------------------------------------------- /+rtklib/ionocorr.m: -------------------------------------------------------------------------------- 1 | % IONOCORR Compute ionospheric correction 2 | % [delay, var] = IONOCORR(epoch, nav, llh, az, el, ionoopt, freq) 3 | % 4 | % Inputs: 5 | % epoch : Mx6, calendar day/time in GPST 6 | % {year, month, day, hour, minute, second} 7 | % nav : 1x1, navigation data struct 8 | % llh : Mx3 or 1x3, receiver geodetic position (deg, deg, m) 9 | % az : MxN, satellite azimuth (deg) 10 | % M: number of epochs 11 | % N: number of satellites 12 | % el : MxN, satellite elevation (deg) 13 | % ionoopt : 1x1, ionospheric correction option (IONOOPT_???) 14 | % freq : 1xN, carrier frequency (Hz) 15 | % 16 | % Outputs: 17 | % delay : MxN, ionospheric delay (m) 18 | % var : MxN, variance of ionospheric delay (m^2) 19 | % 20 | % Notes: 21 | % Frequency compensation is applied 22 | % 23 | % Author: 24 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/ionocorr.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/ionocorr.mexa64 -------------------------------------------------------------------------------- /+rtklib/ionocorr.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/ionocorr.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/ionocorr.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/ionocorr.mexw64 -------------------------------------------------------------------------------- /+rtklib/ionppp.m: -------------------------------------------------------------------------------- 1 | % IONPPP Compute ionospheric pierce point (ipp) position and slant factor 2 | % [fs, latp, lonp, hp] = IONPPP(llh, az, el, re, hion) 3 | % 4 | % Inputs: 5 | % llh : Mx3 or 1x3, receiver geodetic position (deg, deg, m) 6 | % az : MxN, satellite azimuth (deg) 7 | % M: number of epochs 8 | % N: number of satellites 9 | % el : MxN, satellite elevation (deg) 10 | % re : 1x1, earth radius (km) 11 | % hion : 1x1, altitude of ionosphere (km) 12 | % 13 | % Outputs: 14 | % fs : MxN, slant factor 15 | % latp : MxN, latitude of pierce point position (deg) 16 | % lonp : MxN, longitude of pierce point position (deg) 17 | % hp : MxN, ellipsoid height of pierce point position (m) 18 | % 19 | % Author: 20 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/ionppp.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/ionppp.mexa64 -------------------------------------------------------------------------------- /+rtklib/ionppp.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/ionppp.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/ionppp.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/ionppp.mexw64 -------------------------------------------------------------------------------- /+rtklib/jgd2tokyo.m: -------------------------------------------------------------------------------- 1 | % JGD2TOKYO Transform position in JGD2000 datum to Tokyo datum 2 | % llh_tokyo = JGD2TOKYO(llh_jgd, file) 3 | % 4 | % Inputs: 5 | % llh_jgd : Mx3, geodetic position in JGD2000 datum (deg, deg, m) 6 | % file : 1x1, parameters file (TKY2JGD.par) 7 | % 8 | % Outputs: 9 | % llh_tokyo : Mx3, geodetic position in Tokyo datum (deg, deg, m) 10 | % 11 | % Author: 12 | % Taro Suzuki 13 | -------------------------------------------------------------------------------- /+rtklib/jgd2tokyo.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/jgd2tokyo.mexa64 -------------------------------------------------------------------------------- /+rtklib/jgd2tokyo.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/jgd2tokyo.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/jgd2tokyo.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/jgd2tokyo.mexw64 -------------------------------------------------------------------------------- /+rtklib/lambda.m: -------------------------------------------------------------------------------- 1 | % LAMBDA Integer least-square estimation 2 | % [F, s] = LAMBDA(nfix, a, Q) 3 | % 4 | % Inputs: 5 | % nfix : 1x1, number of fixed solutions, typically 2 6 | % a : 1xN, float parameters 7 | % Q : NxNx1, covariance matrix of float parameters 8 | % Outputs: 9 | % F : (nfix)xN, fixed solutions 10 | % s : (nfix)x1, sum of squared residuals of fixed solutions 11 | % 12 | % Author: 13 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/lambda.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/lambda.mexa64 -------------------------------------------------------------------------------- /+rtklib/lambda.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/lambda.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/lambda.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/lambda.mexw64 -------------------------------------------------------------------------------- /+rtklib/llh2enu.m: -------------------------------------------------------------------------------- 1 | % LLH2ENU Transform geodetic position to local ENU position 2 | % [enu, E] = LLH2ENU(llh, orgllh) 3 | % 4 | % Inputs: 5 | % llh : Mx3, geodetic position (deg, deg, m) 6 | % orgllh: 1x3, origin of geodetic position (deg, deg, m) 7 | % 8 | % Outputs: 9 | % enu : Mx3, local ENU position (m) 10 | % E : 3x3, ECEF to ENU transformation matrix 11 | % 12 | % Author: 13 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/llh2enu.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/llh2enu.mexa64 -------------------------------------------------------------------------------- /+rtklib/llh2enu.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/llh2enu.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/llh2enu.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/llh2enu.mexw64 -------------------------------------------------------------------------------- /+rtklib/llh2xyz.m: -------------------------------------------------------------------------------- 1 | % LLH2XYZ Transform geodetic position to ECEF position 2 | % xyz = LLH2XYZ(llh) 3 | % 4 | % Inputs: 5 | % llh : Mx3, geodetic position (deg, deg, m) 6 | % 7 | % Outputs: 8 | % xyz : Mx3, position in ECEF coordinate (m) 9 | % 10 | % Author: 11 | % Taro Suzuki 12 | -------------------------------------------------------------------------------- /+rtklib/llh2xyz.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/llh2xyz.mexa64 -------------------------------------------------------------------------------- /+rtklib/llh2xyz.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/llh2xyz.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/llh2xyz.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/llh2xyz.mexw64 -------------------------------------------------------------------------------- /+rtklib/loadopts.m: -------------------------------------------------------------------------------- 1 | % LOADOPTS Load option struct 2 | % opt = LOADOPTS([file]) 3 | % 4 | % Inputs: 5 | % [file] : 1x1, RTKLIB option file (???.conf) 6 | % 7 | % Outputs: 8 | % opt : 1x1, option struct 9 | % 10 | % Notes: 11 | % If no options file is input, the function returns the default options 12 | % 13 | % Author: 14 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/loadopts.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/loadopts.mexa64 -------------------------------------------------------------------------------- /+rtklib/loadopts.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/loadopts.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/loadopts.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/loadopts.mexw64 -------------------------------------------------------------------------------- /+rtklib/obs2code.m: -------------------------------------------------------------------------------- 1 | % OBS2CODE Convert obs code string to obs code 2 | % code = OBS2CODE(obs) 3 | % 4 | % Inputs: 5 | % obs : 1xN, obs code string cell array {'1C', '1P', '1P',...) 6 | % 7 | % Outputs: 8 | % code : 1xN, obs code (CODE_???) 9 | % 10 | % Notes: 11 | % obs codes are based on RINEX 3.04 12 | % 13 | % Author: 14 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/obs2code.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/obs2code.mexa64 -------------------------------------------------------------------------------- /+rtklib/obs2code.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/obs2code.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/obs2code.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/obs2code.mexw64 -------------------------------------------------------------------------------- /+rtklib/outrnxnav.m: -------------------------------------------------------------------------------- 1 | % OUTRNXNAV Output RINEX navigation file 2 | % OUTRNXNAV(file, nav) 3 | % OUTRNXNAV(file, nav, rnxver) 4 | % 5 | % Inputs: 6 | % file : 1x1, file name {???.nav} 7 | % nav : 1x1, navigation data struct 8 | % rnxver: 1x1, RINEX version (x100) default: 303 9 | % 10 | % Author: 11 | % Taro Suzuki 12 | -------------------------------------------------------------------------------- /+rtklib/outrnxnav.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/outrnxnav.mexa64 -------------------------------------------------------------------------------- /+rtklib/outrnxnav.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/outrnxnav.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/outrnxnav.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/outrnxnav.mexw64 -------------------------------------------------------------------------------- /+rtklib/outrnxobs.m: -------------------------------------------------------------------------------- 1 | % OUTRNXOBS Output RINEX observation file 2 | % OUTRNXOBS(file, obs) 3 | % OUTRNXOBS(file, obs, pos) 4 | % OUTRNXOBS(file, obs, pos, fcn, rnxver) 5 | % OUTRNXOBS(file, obs, pos, fcn, rnxver) 6 | % 7 | % Inputs: 8 | % file : 1x1, file name {???.obs} 9 | % obs : 1x1, observation struct 10 | % pos : 1x3, approximate position in ECEF 11 | % fcn : 1x32, GLONASS FCN 12 | % rnxver : 1x1, RINEX version (x100) default: 303 13 | % 14 | % Author: 15 | % Taro Suzuki 16 | -------------------------------------------------------------------------------- /+rtklib/outrnxobs.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/outrnxobs.mexa64 -------------------------------------------------------------------------------- /+rtklib/outrnxobs.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/outrnxobs.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/outrnxobs.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/outrnxobs.mexw64 -------------------------------------------------------------------------------- /+rtklib/outsol.m: -------------------------------------------------------------------------------- 1 | % OUTSOL Output RTKLIB solution file 2 | % OUTSOL(file, solbuf) 3 | % 4 | % Inputs: 5 | % file : 1x1, file path {???.pos} 6 | % solbuf : 1x1, solution buffer struct 7 | % 8 | % Author: 9 | % Taro Suzuki 10 | -------------------------------------------------------------------------------- /+rtklib/outsol.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/outsol.mexa64 -------------------------------------------------------------------------------- /+rtklib/outsol.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/outsol.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/outsol.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/outsol.mexw64 -------------------------------------------------------------------------------- /+rtklib/peph2pos.m: -------------------------------------------------------------------------------- 1 | % PEPH2POS Compute satellite position/clock with precise ephemeris/clock 2 | % [x, y, z, vx, vy, vz, dts, ddts, var] = PEPH2POS(epoch, sat, nav, opt) 3 | % 4 | % Inputs: 5 | % epoch : Mx6, calendar day/time in GPST 6 | % {year, month, day, hour, minute, second} 7 | % sat : 1xN, satellite number defined in RTKLIB 8 | % nav : 1x1, navigation data struct 9 | % opt : 1x1, sat position option 10 | % (0: center of mass, 1: antenna phase center) 11 | % 12 | % Outputs: 13 | % x : MxN, satellite position X in ECEF coordinate (m) 14 | % y : MxN, satellite position Y in ECEF coordinate (m) 15 | % z : MxN, satellite position Z in ECEF coordinate (m) 16 | % vx : MxN, satellite velocity X in ECEF coordinate (m/s) 17 | % vy : MxN, satellite velocity Y in ECEF coordinate (m/s) 18 | % vz : MxN, satellite velocity Z in ECEF coordinate (m/s) 19 | % dts : MxN, satellite clock bias (m) 20 | % ddts : MxN, satellite clock drift (m/s) 21 | % var : MxN, satellite position and clock error variance (m^2) 22 | % 23 | % Notes: 24 | % clock includes relativistic correction but does not contain code bias 25 | % if precise clocks are not set, clocks in sp3 are used instead 26 | % 27 | % Author: 28 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/peph2pos.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/peph2pos.mexa64 -------------------------------------------------------------------------------- /+rtklib/peph2pos.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/peph2pos.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/peph2pos.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/peph2pos.mexw64 -------------------------------------------------------------------------------- /+rtklib/pntpos.m: -------------------------------------------------------------------------------- 1 | % PNTPOS Compute receiver position, velocity, clock bias by single-point positioning 2 | % [sol, ssat] = PNTPOS(obs, nav, opt) 3 | % 4 | % Inputs: 5 | % obs : 1x1, observation data struct 6 | % nav : 1x1, navigation data struct 7 | % [opt] : 1x1, option struct 8 | % 9 | % Outputs: 10 | % sol : 1x1, solution struct 11 | % ssat : 1x1, satellite status struct 12 | % 13 | % Notes: 14 | % 15 | % Author: 16 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/pntpos.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/pntpos.mexa64 -------------------------------------------------------------------------------- /+rtklib/pntpos.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/pntpos.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/pntpos.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/pntpos.mexw64 -------------------------------------------------------------------------------- /+rtklib/readblq.m: -------------------------------------------------------------------------------- 1 | % READBLQ Read BLQ ocean tide loading parameters 2 | % odisp = READBLQ(file, station) 3 | % 4 | % Inputs: 5 | % file : 1x1, BLQ file path 6 | % station : 1x1, station name 7 | % 8 | % Outputs: 9 | % odisp : 6x11, ocean tide loading parameters 10 | % 11 | % Author: 12 | % Taro Suzuki 13 | -------------------------------------------------------------------------------- /+rtklib/readblq.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readblq.mexa64 -------------------------------------------------------------------------------- /+rtklib/readblq.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readblq.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/readblq.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readblq.mexw64 -------------------------------------------------------------------------------- /+rtklib/readdcb.m: -------------------------------------------------------------------------------- 1 | % READDCB Read differential code bias (DCB) parameters 2 | % nav = READDCB(file) 3 | % nav = READDCB(file, nav) 4 | % 5 | % Inputs: 6 | % file : 1x1, DCB file path 7 | % nav : 1x1, navigation data struct 8 | % 9 | % Outputs: 10 | % nav : 1x1, navigation data struct 11 | % 12 | % Notes: 13 | % nav.cbias contains satellite DCB 14 | % Receiver DCB not yet supported 15 | % 16 | % Author: 17 | % Taro Suzuki 18 | -------------------------------------------------------------------------------- /+rtklib/readdcb.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readdcb.mexa64 -------------------------------------------------------------------------------- /+rtklib/readdcb.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readdcb.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/readdcb.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readdcb.mexw64 -------------------------------------------------------------------------------- /+rtklib/readerp.m: -------------------------------------------------------------------------------- 1 | % READERP Read earth rotation parameters 2 | % erp = READERP(file) 3 | % 4 | % Inputs: 5 | % file : 1x1, IGS ERP file (IGS ERP ver.2) 6 | % 7 | % Outputs: 8 | % erp : 1x1, earth rotation parameter struct 9 | % 10 | % Author: 11 | % Taro Suzuki 12 | -------------------------------------------------------------------------------- /+rtklib/readerp.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readerp.mexa64 -------------------------------------------------------------------------------- /+rtklib/readerp.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readerp.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/readerp.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readerp.mexw64 -------------------------------------------------------------------------------- /+rtklib/readpcv.m: -------------------------------------------------------------------------------- 1 | % READPCV Read antenna parameters 2 | % pcvs = READPCV(file) 3 | % 4 | % Inputs: 5 | % file : 1x1, antenna parameter file (antex) 6 | % 7 | % Outputs: 8 | % pcvs : 1x1, pcvs data struct 9 | % 10 | % Notes: 11 | % file with the extension .atx or .ATX is recognized as antex 12 | % file except for antex is recognized ngs antenna parameters 13 | % only support non-azimuth-dependent parameters 14 | % 15 | % Author: 16 | % Taro Suzuki 17 | -------------------------------------------------------------------------------- /+rtklib/readpcv.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readpcv.mexa64 -------------------------------------------------------------------------------- /+rtklib/readpcv.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readpcv.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/readpcv.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readpcv.mexw64 -------------------------------------------------------------------------------- /+rtklib/readpos.m: -------------------------------------------------------------------------------- 1 | % READPOS Read positions from station position file 2 | % pos = READPOS(file, station) 3 | % 4 | % Inputs: 5 | % file : 1x1, station position file containing 6 | % lat(deg) lon(deg) height(m) name in a line 7 | % station : 1x1, station name 8 | % 9 | % Outputs: 10 | % pos : 1x3, station position {lat,lon,h} (deg, deg, m) 11 | % all 0 if search error 12 | % 13 | % Notes: 14 | % Use the "readsol" function to read a solution file (???.pos). 15 | % 16 | % Author: 17 | % Taro Suzuki 18 | -------------------------------------------------------------------------------- /+rtklib/readpos.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readpos.mexa64 -------------------------------------------------------------------------------- /+rtklib/readpos.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readpos.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/readpos.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readpos.mexw64 -------------------------------------------------------------------------------- /+rtklib/readrnxc.m: -------------------------------------------------------------------------------- 1 | % READRNXC Read RINEX clock files 2 | % nav = READRNXC(file) 3 | % nav = READRNXC(file, nav) 4 | % 5 | % Inputs: 6 | % file : 1x1, file name 7 | % nav : 1x1, navigation data struct 8 | % 9 | % Outputs: 10 | % nav : 1x1, navigation data struct 11 | % 12 | % Author: 13 | % Taro Suzuki 14 | -------------------------------------------------------------------------------- /+rtklib/readrnxc.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readrnxc.mexa64 -------------------------------------------------------------------------------- /+rtklib/readrnxc.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readrnxc.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/readrnxc.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readrnxc.mexw64 -------------------------------------------------------------------------------- /+rtklib/readrnxnav.m: -------------------------------------------------------------------------------- 1 | % READRNXNAV Read RINEX navigation file 2 | % nav = READRNXNAV(file) 3 | % nav = READRNXNAV(file, nav) 4 | % 5 | % Inputs: 6 | % file : 1x1, file name {???.nav} 7 | % nav : 1x1, navigation data struct 8 | % 9 | % Outputs: 10 | % nav : 1x1, navigation data struct 11 | % 12 | % Author: 13 | % Taro Suzuki 14 | -------------------------------------------------------------------------------- /+rtklib/readrnxnav.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readrnxnav.mexa64 -------------------------------------------------------------------------------- /+rtklib/readrnxnav.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readrnxnav.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/readrnxnav.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readrnxnav.mexw64 -------------------------------------------------------------------------------- /+rtklib/readrnxobs.m: -------------------------------------------------------------------------------- 1 | % READRNXOBS Read RINEX observation file 2 | % obs = READRNXOBS(file) 3 | % 4 | % Inputs: 5 | % file : 1x1, file name {???.obs} 6 | % 7 | % Outputs: 8 | % obs : 1x1, observation data struct 9 | % 10 | % Author: 11 | % Taro Suzuki 12 | -------------------------------------------------------------------------------- /+rtklib/readrnxobs.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readrnxobs.mexa64 -------------------------------------------------------------------------------- /+rtklib/readrnxobs.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readrnxobs.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/readrnxobs.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readrnxobs.mexw64 -------------------------------------------------------------------------------- /+rtklib/readsap.m: -------------------------------------------------------------------------------- 1 | % READSAP Read satellite antenna parameters 2 | % nav = READSAP(file, epoch) 3 | % nav = READSAP(file, epoch, nav) 4 | % 5 | % Inputs: 6 | % file : 1x1, antenna parameter file (ANTEX format) 7 | % epoch : 1x6, time {year, month, day, hour, minute, second} 8 | % nav : 1x1, navigation data struct 9 | % 10 | % Outputs: 11 | % nav : 1x1, navigation data struct 12 | % 13 | % Author: 14 | % Taro Suzuki 15 | -------------------------------------------------------------------------------- /+rtklib/readsap.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readsap.mexa64 -------------------------------------------------------------------------------- /+rtklib/readsap.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readsap.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/readsap.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readsap.mexw64 -------------------------------------------------------------------------------- /+rtklib/readsol.m: -------------------------------------------------------------------------------- 1 | % READSOL Read RTKLIB solution file 2 | % sol = READSOL(file) 3 | % 4 | % Inputs: 5 | % file : 1x1, RTKLIB solution file (???.pos) 6 | % 7 | % Outputs: 8 | % sol : 1x1, solution struct array 9 | % 10 | % Author: 11 | % Taro Suzuki 12 | -------------------------------------------------------------------------------- /+rtklib/readsol.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readsol.mexa64 -------------------------------------------------------------------------------- /+rtklib/readsol.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readsol.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/readsol.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readsol.mexw64 -------------------------------------------------------------------------------- /+rtklib/readsolstat.m: -------------------------------------------------------------------------------- 1 | % READSOLSTAT Read RTKLIB solution status file 2 | % stat = READSOLSTAT(file) 3 | % 4 | % Inputs: 5 | % file : 1x1, RTKLIB solution status file (???.pos.stat) 6 | % 7 | % Outputs: 8 | % stat : 1x1, solution status struct array 9 | % 10 | % Author: 11 | % Taro Suzuki 12 | -------------------------------------------------------------------------------- /+rtklib/readsolstat.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readsolstat.mexa64 -------------------------------------------------------------------------------- /+rtklib/readsolstat.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readsolstat.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/readsolstat.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readsolstat.mexw64 -------------------------------------------------------------------------------- /+rtklib/readsp3.m: -------------------------------------------------------------------------------- 1 | % READSP3 Read SP3 file 2 | % nav = READSP3(file) 3 | % nav = READSP3(file, nav) 4 | % 5 | % Inputs: 6 | % file : 1x1, sp3-c precise ephemeris file (wind-card * is expanded) 7 | % nav : 1x1, navigation data struct 8 | % 9 | % Outputs: 10 | % nav : 1x1, navigation data struct 11 | % 12 | % Author: 13 | % Taro Suzuki 14 | -------------------------------------------------------------------------------- /+rtklib/readsp3.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readsp3.mexa64 -------------------------------------------------------------------------------- /+rtklib/readsp3.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readsp3.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/readsp3.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/readsp3.mexw64 -------------------------------------------------------------------------------- /+rtklib/reppath.m: -------------------------------------------------------------------------------- 1 | % REPPATH Replace keywords in file path 2 | % rpath = REPPATH(path, [epoch]) 3 | % 4 | % Inputs: 5 | % path : 1x1, file path (see below) 6 | % [epoch] : 1x6, time (optional) 7 | % 8 | % Outputs: 9 | % rpath : 1x1, replaced file path 10 | % 11 | % Note: the following keywords in path are replaced by date and time 12 | % %Y -> yyyy : year (4 digits) (1900-2099) 13 | % %y -> yy : year (2 digits) (00-99) 14 | % %m -> mm : month (01-12) 15 | % %d -> dd : day of month (01-31) 16 | % %h -> hh : hours (00-23) 17 | % %M -> mm : minutes (00-59) 18 | % %S -> ss : seconds (00-59) 19 | % %n -> ddd : day of year (001-366) 20 | % %W -> wwww : gps week (0001-9999) 21 | % %D -> d : day of gps week (0-6) 22 | % %H -> h : hour code (a=0,b=1,c=2,...,x=23) 23 | % %ha-> hh : 3 hours (00,03,06,...,21) 24 | % %hb-> hh : 6 hours (00,06,12,18) 25 | % %hc-> hh : 12 hours (00,12) 26 | % %t -> mm : 15 minutes (00,15,30,45) 27 | % 28 | % If no epoch is input, the path is replaced by the current GPS time 29 | % 30 | % Author: 31 | % Taro Suzuki 32 | -------------------------------------------------------------------------------- /+rtklib/reppath.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/reppath.mexa64 -------------------------------------------------------------------------------- /+rtklib/reppath.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/reppath.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/reppath.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/reppath.mexw64 -------------------------------------------------------------------------------- /+rtklib/rtkinit.m: -------------------------------------------------------------------------------- 1 | % RTKINIT Initialize RTK control struct 2 | % rtk = RTKINIT(opt) 3 | % 4 | % Inputs: 5 | % opt : 1x1, option struct 6 | % 7 | % Outputs: 8 | % rtk : 1x1, rtk control struct 9 | % 10 | % Author: 11 | % Taro Suzuki 12 | -------------------------------------------------------------------------------- /+rtklib/rtkinit.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/rtkinit.mexa64 -------------------------------------------------------------------------------- /+rtklib/rtkinit.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/rtkinit.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/rtkinit.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/rtkinit.mexw64 -------------------------------------------------------------------------------- /+rtklib/rtkpos.m: -------------------------------------------------------------------------------- 1 | % RTKPOS Compute rover position by precise positioning 2 | % rtk = RTKPOS(rtk, obs, nav, opt) 3 | % rtk = RTKPOS(rtk, obs, nav, opt, obsb) 4 | % 5 | % Inputs: 6 | % rtk : 1x1, rtk control struct 7 | % obs : 1x1, observation data struct 8 | % nav : 1x1, navigation data struct 9 | % opt : 1x1, option struct 10 | % [obsb]: 1x1, observation data struct for base station 11 | % 12 | % Outputs: 13 | % rtk : 1x1, rtk control struct 14 | % 15 | % Author: 16 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/rtkpos.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/rtkpos.mexa64 -------------------------------------------------------------------------------- /+rtklib/rtkpos.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/rtkpos.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/rtkpos.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/rtkpos.mexw64 -------------------------------------------------------------------------------- /+rtklib/sat2freq.m: -------------------------------------------------------------------------------- 1 | % SAT2FREQ Convert satellite and obs code to frequency 2 | % freq = SAT2FREQ(sat, code, nav) 3 | % 4 | % Inputs: 5 | % sat : 1xN, satellite number defined in RTKLIB 6 | % code : 1xN, obs code (CODE_???) 7 | % nav : 1x1, navigation data struct 8 | % 9 | % Outputs: 10 | % freq : 1xN, carrier frequency (Hz) (0.0: error) 11 | % 12 | % Author: 13 | % Taro Suzuki 14 | -------------------------------------------------------------------------------- /+rtklib/sat2freq.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/sat2freq.mexa64 -------------------------------------------------------------------------------- /+rtklib/sat2freq.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/sat2freq.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/sat2freq.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/sat2freq.mexw64 -------------------------------------------------------------------------------- /+rtklib/satantoff.m: -------------------------------------------------------------------------------- 1 | % SATANTOFF Compute satellite antenna phase center offset in ECEF coordinate 2 | % [dx, dy, dz] = SATANTOFF(epoch, rsx, rsy, rsz, sat, nav) 3 | % 4 | % Inputs: 5 | % epoch : Mx6, calendar day/time in GPST 6 | % {year, month, day, hour, minute, second} 7 | % rsx : MxN, satellite position X in ECEF (m) 8 | % M: number of epochs 9 | % N: number of satellites 10 | % rsy : MxN, satellite position Y in ECEF (m) 11 | % rsz : MxN, satellite position Z in ECEF (m) 12 | % sat : 1xN, satellite number defined in RTKLIB 13 | % nav : 1x1, navigation data struct 14 | % 15 | % Outputs: 16 | % dx : MxN, satellite antenna phase center offset X in ECEF (m) 17 | % dy : MxN, satellite antenna phase center offset Y in ECEF (m) 18 | % dz : MxN, satellite antenna phase center offset Z in ECEF (m) 19 | % 20 | % Author: 21 | % Taro Suzuki 22 | -------------------------------------------------------------------------------- /+rtklib/satantoff.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satantoff.mexa64 -------------------------------------------------------------------------------- /+rtklib/satantoff.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satantoff.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/satantoff.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satantoff.mexw64 -------------------------------------------------------------------------------- /+rtklib/satazel.m: -------------------------------------------------------------------------------- 1 | % SATAZEL Compute satellite azimuth/elevation angle 2 | % [az, el] = SATAZEL(llh, ex, ey, ez) 3 | % 4 | % Inputs: 5 | % llh : Mx3 or 1x3, receiver geodetic position (deg, deg, m) 6 | % ex : MxN, receiver-to-satellite unit vector X in ECEF coordinate 7 | % ey : MxN, receiver-to-satellite unit vector Y in ECEF coordinate 8 | % ez : MxN, receiver-to-satellite unit vector Z in ECEF coordinate 9 | % 10 | % Outputs: 11 | % az : MxN, satellite azimuth angle (deg) 12 | % el : MxN, satellite elevation angle (deg) 13 | % 14 | % Author: 15 | % Taro Suzuki 16 | -------------------------------------------------------------------------------- /+rtklib/satazel.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satazel.mexa64 -------------------------------------------------------------------------------- /+rtklib/satazel.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satazel.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/satazel.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satazel.mexw64 -------------------------------------------------------------------------------- /+rtklib/satid2no.m: -------------------------------------------------------------------------------- 1 | % SATID2NO Convert satellite id to satellite number 2 | % sat = SATID2NO(id) 3 | % 4 | % Inputs: 5 | % id : 1xN, satellite id cell array (Gnn,Rnn,Enn,Jnn,Cnn,Inn or nnn) 6 | % 7 | % Outputs: 8 | % sat : 1xN, satellite number (0:error) defined in RTKLIB 9 | % 10 | % Author: 11 | % Taro Suzuki 12 | -------------------------------------------------------------------------------- /+rtklib/satid2no.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satid2no.mexa64 -------------------------------------------------------------------------------- /+rtklib/satid2no.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satid2no.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/satid2no.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satid2no.mexw64 -------------------------------------------------------------------------------- /+rtklib/satno.m: -------------------------------------------------------------------------------- 1 | % SATNO Convert satellite system+prn/slot number to satellite number 2 | % sat = SATNO(sys, prn) 3 | % 4 | % Inputs: 5 | % sys : 1xN, satellite system (SYS_GPS, SYS_GLO, ...) 6 | % prn : 1xN, satellite prn/slot number 7 | % 8 | % Outputs: 9 | % sat : 1xN, satellite number (0:error) defined in RTKLIB 10 | % 11 | % Author: 12 | % Taro Suzuki 13 | -------------------------------------------------------------------------------- /+rtklib/satno.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satno.mexa64 -------------------------------------------------------------------------------- /+rtklib/satno.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satno.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/satno.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satno.mexw64 -------------------------------------------------------------------------------- /+rtklib/satno2id.m: -------------------------------------------------------------------------------- 1 | % SATNO2ID Convert satellite number to satellite id 2 | % id = SATNO2ID(sat) 3 | % 4 | % Inputs: 5 | % sat : 1xN, satellite number defined in RTKLIB 6 | % 7 | % Outputs: 8 | % id : 1xN, satellite id cell array (Gnn,Rnn,Enn,Jnn,Cnn,Inn or nnn) 9 | % 10 | % Author: 11 | % Taro Suzuki 12 | -------------------------------------------------------------------------------- /+rtklib/satno2id.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satno2id.mexa64 -------------------------------------------------------------------------------- /+rtklib/satno2id.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satno2id.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/satno2id.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satno2id.mexw64 -------------------------------------------------------------------------------- /+rtklib/satpos.m: -------------------------------------------------------------------------------- 1 | % SATPOS Compute satellite position, velocity and clock 2 | % [x, y, z, vx, vy, vz, dts, ddts, var, svh] = SATPOS(epoch, sat, nav, opt) 3 | % 4 | % Inputs: 5 | % epoch : Mx6, calendar day/time 6 | % {year, month, day, hour, minute, second} 7 | % sat : 1xN, satellite number defined in RTKLIB 8 | % nav : 1x1, navigation data struct 9 | % opt : 1x1, ephemeris option (EPHOPT_???) 10 | % 11 | % Outputs: 12 | % x : MxN, satellite position X in ECEF (m) 13 | % M: number of epochs 14 | % N: number of satellites 15 | % y : MxN, satellite position Y in ECEF (m) 16 | % z : MxN, satellite position Z in ECEF (m) 17 | % vx : MxN, satellite velocity X in ECEF (m/s) 18 | % vy : MxN, satellite velocity Y in ECEF (m/s) 19 | % vz : MxN, satellite velocity Z in ECEF (m/s) 20 | % dts : MxN, satellite clock bias (m) 21 | % ddts : MxN, satellite clock drift (m/s) 22 | % var : MxN, sat position and clock error variance (m^2) 23 | % svh : MxN, sat health flag (-1:correction not available) 24 | % 25 | % Notes: 26 | % satellite position is referenced to antenna phase center 27 | % satellite clock does not include code bias correction (tgd or bgd) 28 | % Use "satposs" to compute satellite position at signal transmission 29 | % 30 | % Author: 31 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/satpos.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satpos.mexa64 -------------------------------------------------------------------------------- /+rtklib/satpos.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satpos.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/satpos.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satpos.mexw64 -------------------------------------------------------------------------------- /+rtklib/satposs.m: -------------------------------------------------------------------------------- 1 | % SATPOSS Compute satellite position, velocity and clock 2 | % [x, y, z, vx, vy, vz, dts, ddts, var, svh] = SATPOSS(obs, nav, opt) 3 | % 4 | % Inputs: 5 | % obs : 1x1, observation data struct 6 | % nav : 1x1, navigation data struct 7 | % opt : 1x1, ephemeris option (EPHOPT_???) 8 | % 9 | % Outputs: 10 | % x : MxN, satellite position X in ECEF (m) 11 | % M: number of epochs {obs.n} 12 | % N: number of satellites {obs.nsat} 13 | % y : MxN, satellite position Y in ECEF (m) 14 | % z : MxN, satellite position Z in ECEF (m) 15 | % vx : MxN, satellite velocity X in ECEF (m/s) 16 | % vy : MxN, satellite velocity Y in ECEF (m/s) 17 | % vz : MxN, satellite velocity Z in ECEF (m/s) 18 | % dts : MxN, satellite clock bias (m) 19 | % ddts : MxN, satellite clock drift (m/s) 20 | % var : MxN, sat position and clock error variance (m^2) 21 | % svh : MxN, sat health flag (-1:correction not available) 22 | % 23 | % Notes: 24 | % satellite position and clock are values at signal transmission time 25 | % pseudorange and broadcast ephemeris are needed to get signal transmission time 26 | % satellite position is referenced to antenna phase center 27 | % satellite clock does not include code bias correction (tgd or bgd) 28 | % 29 | % Author: 30 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/satposs.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satposs.mexa64 -------------------------------------------------------------------------------- /+rtklib/satposs.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satposs.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/satposs.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satposs.mexw64 -------------------------------------------------------------------------------- /+rtklib/satsys.m: -------------------------------------------------------------------------------- 1 | % SATSYS Convert satellite number to satellite system 2 | % sys = SATSYS(sat) 3 | % 4 | % Inputs: 5 | % sat : 1xN, satellite number defined in RTKLIB 6 | % 7 | % Outputs: 8 | % sys : 1xN, satellite system (SYS_GPS, SYS_GLO, ...) 9 | % prn : 1xN, satellite prn/slot number 10 | % 11 | % Author: 12 | % Taro Suzuki 13 | -------------------------------------------------------------------------------- /+rtklib/satsys.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satsys.mexa64 -------------------------------------------------------------------------------- /+rtklib/satsys.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satsys.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/satsys.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/satsys.mexw64 -------------------------------------------------------------------------------- /+rtklib/saveopts.m: -------------------------------------------------------------------------------- 1 | % SAVEOPTS Save option struct 2 | % SAVEOPTS(file, opt) 3 | % SAVEOPTS(file, opt, comment) 4 | % 5 | % Inputs: 6 | % file : 1x1, RTKLIB option file (???.conf) 7 | % opt : 1x1, option struct 8 | % [comment] : 1x1, Comments for option file header 9 | % 10 | % Author: 11 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/saveopts.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/saveopts.mexa64 -------------------------------------------------------------------------------- /+rtklib/saveopts.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/saveopts.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/saveopts.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/saveopts.mexw64 -------------------------------------------------------------------------------- /+rtklib/searchpcv.m: -------------------------------------------------------------------------------- 1 | % SEARCHPCV Search antenna parameter 2 | % pcv = SEARCHPCV(sat, type, epoch, pcvs) 3 | % 4 | % Inputs: 5 | % sat : 1x1, satellite number defined in RTKLIB (0: receiver antenna) 6 | % type : 1x1, antenna type for receiver antenna 7 | % epoch : 1x6, calendar day/time in GPST 8 | % {year, month, day, hour, minute, second} 9 | % pcvs : 1x1, pcvs struct 10 | % 11 | % Outputs: 12 | % pcv : 1x1, pcv struct 13 | % 14 | % Author: 15 | % Taro Suzuki 16 | -------------------------------------------------------------------------------- /+rtklib/searchpcv.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/searchpcv.mexa64 -------------------------------------------------------------------------------- /+rtklib/searchpcv.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/searchpcv.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/searchpcv.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/searchpcv.mexw64 -------------------------------------------------------------------------------- /+rtklib/sunmoonpos.m: -------------------------------------------------------------------------------- 1 | % SUNMOONPOS Get sun and moon position in ECEF 2 | % [rsun, rmoon, gmst] = SUNMOONPOS(utcepoch, erpv) 3 | % 4 | % Inputs: 5 | % utcepoch : Mx6, calendar day/time in UTC 6 | % {year, month, day, hour, minute, second} 7 | % erpv : 1x4, earth rotation parameter value 8 | % {xp,yp,ut1_utc,lod} (rad, rad, s, s/d) 9 | % 10 | % Outputs: 11 | % rsun : Mx3, sun position in ECEF (m) 12 | % rmoon : Mx3, moon position in ECEF (m) 13 | % gmst : Mx1, Greenwich Mean Sidereal Time (rad) 14 | % 15 | % Author: 16 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/sunmoonpos.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/sunmoonpos.mexa64 -------------------------------------------------------------------------------- /+rtklib/sunmoonpos.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/sunmoonpos.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/sunmoonpos.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/sunmoonpos.mexw64 -------------------------------------------------------------------------------- /+rtklib/tidedisp.m: -------------------------------------------------------------------------------- 1 | % TIDEDISP Compute displacements by earth tides 2 | % dr = TIDEDISP(epoch, rr, opt) 3 | % dr = TIDEDISP(epoch, rr, opt, erp) 4 | % dr = TIDEDISP(epoch, rr, opt, erp, odisp) 5 | % 6 | % Inputs: 7 | % epoch : Mx6, calendar day/time in GPST 8 | % {year, month, day, hour, minute, second} 9 | % rr : Mx3, site position in ECEF coordinate (m) 10 | % opt : 1x1, options (or of the followings) 11 | % 1: solid earth tide 12 | % 2: ocean tide loading 13 | % 4: pole tide 14 | % 8: elimate permanent deformation 15 | % erp : 1x1, earth rotation parameter struct 16 | % odisp : 6x11, ocean tide loading parameters (for opt = 2) 17 | % 18 | % Outputs: 19 | % dr : Mx3, displacement by earth tides in ECEF (m) 20 | % 21 | % Author: 22 | % Taro Suzuki 23 | -------------------------------------------------------------------------------- /+rtklib/tidedisp.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/tidedisp.mexa64 -------------------------------------------------------------------------------- /+rtklib/tidedisp.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/tidedisp.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/tidedisp.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/tidedisp.mexw64 -------------------------------------------------------------------------------- /+rtklib/tokyo2jgd.m: -------------------------------------------------------------------------------- 1 | % TOKYO2JGD Transform position in Tokyo datum to JGD2000 datum 2 | % llh_jgd = TOKYO2JGD(llh_tokyo, file) 3 | % 4 | % Inputs: 5 | % llh_tokyo : Mx3, geodetic position in Tokyo datum (deg, deg, m) 6 | % file : 1x1, parameters file (TKY2JGD.par) 7 | % 8 | % Outputs: 9 | % llh_jgd : Mx3, geodetic position in JGD2000 datum (deg, deg, m) 10 | % 11 | % Author: 12 | % Taro Suzuki 13 | -------------------------------------------------------------------------------- /+rtklib/tokyo2jgd.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/tokyo2jgd.mexa64 -------------------------------------------------------------------------------- /+rtklib/tokyo2jgd.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/tokyo2jgd.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/tokyo2jgd.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/tokyo2jgd.mexw64 -------------------------------------------------------------------------------- /+rtklib/tow2doy.m: -------------------------------------------------------------------------------- 1 | % TOW2DOY Convert GPS time of week to to day of year 2 | % doy = TOW2DOY(tow, week) 3 | % 4 | % Inputs: 5 | % tow : Mx1, GPS time of week (sec) 6 | % week : Mx1, GPS week 7 | % 8 | % Outputs: 9 | % doy : Mx1, day of year (days) 10 | % 11 | % Author: 12 | % Taro Suzuki 13 | -------------------------------------------------------------------------------- /+rtklib/tow2doy.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/tow2doy.mexa64 -------------------------------------------------------------------------------- /+rtklib/tow2doy.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/tow2doy.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/tow2doy.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/tow2doy.mexw64 -------------------------------------------------------------------------------- /+rtklib/tow2epoch.m: -------------------------------------------------------------------------------- 1 | % TOW2EPOCH Convert GPS time of week to calendar day/time 2 | % epoch = TOW2EPOCH(tow, week) 3 | % epoch = TOW2EPOCH(tow, week, utcflag) 4 | % 5 | % Inputs: 6 | % tow : Mx1, GPS time of week (sec) 7 | % week : Mx1, GPS week 8 | % utcflag : 1x1, UTC flag (0: GPST, 1:UTC time) {default = GPST} 9 | % 10 | % Outputs: 11 | % epoch : Mx1, calendar day/time 12 | % {year, month, day, hour, minute, second} 13 | % 14 | % Author: 15 | % Taro Suzuki 16 | -------------------------------------------------------------------------------- /+rtklib/tow2epoch.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/tow2epoch.mexa64 -------------------------------------------------------------------------------- /+rtklib/tow2epoch.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/tow2epoch.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/tow2epoch.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/tow2epoch.mexw64 -------------------------------------------------------------------------------- /+rtklib/tropcorr.m: -------------------------------------------------------------------------------- 1 | % TROPCORR Compute tropospheric correction 2 | % [delay, var] = TROPCORR(epochs, nav, llh, az, el, tropopt) 3 | % 4 | % Inputs: 5 | % epoch : Mx6, calendar day/time in GPST 6 | % {year, month, day, hour, minute, second} 7 | % nav : 1x1, navigation data struct 8 | % llh : Mx3 or 1x3, receiver geodetic position (deg, deg, m) 9 | % az : MxN, satellite azimuth (deg) 10 | % M: number of epochs 11 | % N: number of satellites 12 | % el : MxN, satellite elevation (deg) 13 | % tropopt : 1x1, tropospheric correction option (TROPOPT_???) 14 | % 15 | % Outputs: 16 | % delay : MxN, tropospheric delay (m) 17 | % var : MxN, variance of tropospheric delay (m^2) 18 | % 19 | % Author: 20 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/tropcorr.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/tropcorr.mexa64 -------------------------------------------------------------------------------- /+rtklib/tropcorr.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/tropcorr.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/tropcorr.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/tropcorr.mexw64 -------------------------------------------------------------------------------- /+rtklib/tropmapf.m: -------------------------------------------------------------------------------- 1 | % TROPMAPF Compute tropospheric mapping function by NMF 2 | % [mapd, mapw] = TROPMAPF(epochs, llh, az, el) 3 | % 4 | % Inputs: 5 | % epoch : Mx6, calendar day/time in GPST 6 | % {year, month, day, hour, minute, second} 7 | % llh : Mx3 or 1x3, receiver geodetic position (deg, deg, m) 8 | % az : MxN, satellite azimuth (deg) 9 | % M: number of epochs 10 | % N: number of satellites 11 | % el : MxN, satellite elevation (deg) 12 | % 13 | % Outputs: 14 | % mapd : MxN, dry mapping function (m) 15 | % mapw : MxN, wet mapping function (m) 16 | % 17 | % Notes: 18 | % -DIERS_MODEL use GMF instead of NMF 19 | % 20 | % Author: 21 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/tropmapf.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/tropmapf.mexa64 -------------------------------------------------------------------------------- /+rtklib/tropmapf.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/tropmapf.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/tropmapf.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/tropmapf.mexw64 -------------------------------------------------------------------------------- /+rtklib/tropmodel.m: -------------------------------------------------------------------------------- 1 | % TROPMODEL Compute tropospheric delay by standard atmosphere and saastamoinen model 2 | % [delay, var] = TROPMODEL(epochs, llh, az, el) 3 | % 4 | % Inputs: 5 | % epoch : Mx6, calendar day/time in GPST 6 | % {year, month, day, hour, minute, second} 7 | % llh : Mx3 or 1x3, receiver geodetic position (deg, deg, m) 8 | % az : MxN, satellite azimuth (deg) 9 | % M: number of epochs 10 | % N: number of satellites 11 | % el : MxN, satellite elevation (deg) 12 | % 13 | % Outputs: 14 | % delay : MxN, tropospheric delay (m) 15 | % var : MxN, variance of tropospheric delay (m^2) 16 | % 17 | % Author: 18 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/tropmodel.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/tropmodel.mexa64 -------------------------------------------------------------------------------- /+rtklib/tropmodel.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/tropmodel.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/tropmodel.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/tropmodel.mexw64 -------------------------------------------------------------------------------- /+rtklib/utc2gmst.m: -------------------------------------------------------------------------------- 1 | % UTC2GMST Convert utc to GMST (Greenwich Mean Sidereal Time) 2 | % gmst = UTC2GPST(utcepoch, ut1_utc) 3 | % 4 | % Inputs: 5 | % utcepoch : Mx6, calendar day/time in UTC 6 | % {year, month, day, hour, minute, second} 7 | % ut1_utc : 1x1, UT1-UTC (s) 8 | % 9 | % Outputs: 10 | % gmst : Mx1, GMST (rad) 11 | % 12 | % Author: 13 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/utc2gmst.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/utc2gmst.mexa64 -------------------------------------------------------------------------------- /+rtklib/utc2gmst.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/utc2gmst.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/utc2gmst.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/utc2gmst.mexw64 -------------------------------------------------------------------------------- /+rtklib/utc2gpst.m: -------------------------------------------------------------------------------- 1 | % UTC2GPST Convert UTC epoch to GPST epoch 2 | % epoch = UTC2GPST(utcepoch) 3 | % 4 | % Inputs: 5 | % utcepoch: Mx6, calendar day/time in UTC 6 | % {year, month, day, hour, minute, second} 7 | % 8 | % Outputs: 9 | % epoch : Mx6, calendar day/time in GPST 10 | % {year, month, day, hour, minute, second} 11 | % 12 | % Author: 13 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/utc2gpst.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/utc2gpst.mexa64 -------------------------------------------------------------------------------- /+rtklib/utc2gpst.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/utc2gpst.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/utc2gpst.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/utc2gpst.mexw64 -------------------------------------------------------------------------------- /+rtklib/xyz2enu.m: -------------------------------------------------------------------------------- 1 | % XYZ2ENU Transform ECEF position to local ENU position 2 | % [enu, E] = XYZ2ENU(xyz, orgllh) 3 | % 4 | % Inputs: 5 | % xyz : Mx3, geodetic position in ECEF coordinate (m) 6 | % orgllh: 1x3, orgin of geodetic position (deg, deg, m) 7 | % 8 | % Outputs: 9 | % enu : Mx3, local ENU position (m) 10 | % E : 3x3, ECEF to ENU transformation matrix 11 | % 12 | % Notes: The function is different from the original xyz2enu in RTKLIB that 13 | % only computes the coordinate transformation matrix 14 | % Use ecef2enu to rotate a vector between two coordinate systems 15 | % 16 | % Author: 17 | % Taro Suzuki -------------------------------------------------------------------------------- /+rtklib/xyz2enu.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/xyz2enu.mexa64 -------------------------------------------------------------------------------- /+rtklib/xyz2enu.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/xyz2enu.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/xyz2enu.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/xyz2enu.mexw64 -------------------------------------------------------------------------------- /+rtklib/xyz2llh.m: -------------------------------------------------------------------------------- 1 | % XYZ2LLH Transform ECEF position to geodetic position 2 | % llh = xyz2llh(xyz) 3 | % 4 | % Inputs: 5 | % xyz : Mx3, position in ECEF coordinate (m) 6 | % 7 | % Outputs: 8 | % llh : Mx3, geodetic position (deg, deg, m) 9 | % 10 | % Author: 11 | % Taro Suzuki 12 | -------------------------------------------------------------------------------- /+rtklib/xyz2llh.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/xyz2llh.mexa64 -------------------------------------------------------------------------------- /+rtklib/xyz2llh.mexmaca64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/xyz2llh.mexmaca64 -------------------------------------------------------------------------------- /+rtklib/xyz2llh.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/+rtklib/xyz2llh.mexw64 -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # VSCODE 2 | .vscode/ 3 | 4 | # Development 5 | .dev/ 6 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "src/RTKLIB"] 2 | path = src/RTKLIB 3 | url = https://github.com/JAXA-SNU/MALIB.git 4 | branch = main 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Taro Suzuki 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /doc/Fig1-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/doc/Fig1-1.png -------------------------------------------------------------------------------- /doc/Fig1-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/doc/Fig1-2.png -------------------------------------------------------------------------------- /doc/Fig1-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/doc/Fig1-3.png -------------------------------------------------------------------------------- /doc/Fig1-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/doc/Fig1-4.png -------------------------------------------------------------------------------- /doc/Fig2-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/doc/Fig2-1.png -------------------------------------------------------------------------------- /doc/Fig2-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/doc/Fig2-2.png -------------------------------------------------------------------------------- /doc/Fig3-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/doc/Fig3-1.png -------------------------------------------------------------------------------- /doc/Fig3-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/doc/Fig3-2.png -------------------------------------------------------------------------------- /doc/manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taroz/MatRTKLIB/69bcbd3faebc39815adb03e4b329033a4a7deb4a/doc/manual.pdf -------------------------------------------------------------------------------- /examples/Example1_visualization_RINEX_observation.m: -------------------------------------------------------------------------------- 1 | %% Example1_visualization_RINEX_observation.m 2 | % Visualization of RINEX observation 3 | % Example 1 in GPS solutions paper 4 | % Author: Taro Suzuki 5 | 6 | clear; close all; clc; 7 | addpath ../ 8 | datapath = "./data/kinematic/"; 9 | 10 | %% Vizualization of RINEX observation 11 | gobs = gt.Gobs(datapath+"rover.obs"); % Read RINEX observation 12 | gobs.plot % Plot observation 13 | gobs.plotNSat % Plot number of observation 14 | gnav = gt.Gnav(datapath+"base.nav"); % Read RINEX navigation 15 | gobs.plotSky(gnav); % Plot satellite 16 | -------------------------------------------------------------------------------- /examples/Example2_PPK_analysis.m: -------------------------------------------------------------------------------- 1 | %% Example2_PPK_analysis.m 2 | % Post-processing kinematic example 3 | % Example 2 in GPS solutions paper 4 | % Author: Taro Suzuki 5 | clear; close all; clc; 6 | addpath ../ 7 | datapath = "./data/kinematic/"; 8 | 9 | %% Postpprocessing Kinematic 10 | gobsr = gt.Gobs(datapath+"rover_1Hz.obs"); % Rover RINEX observation 11 | gobsb = gt.Gobs(datapath+"base.obs"); % Base RINEX observation 12 | gnav = gt.Gnav(datapath+"base.nav"); % RINEX navigation 13 | gopt = gt.Gopt(datapath+"rtk.conf"); % Process options 14 | grtk = gt.Grtk(gopt); % RTK object 15 | [grtk, gsol] = ... % Call rtkpos function 16 | gt.Gfun.rtkpos(grtk, gobsr, gnav, gopt, gobsb); 17 | gsol.plot(); % Plot solution 18 | gsol.outSol(datapath+"rover.pos"); % Save solution 19 | -------------------------------------------------------------------------------- /examples/Example3_Positioning_error_analysis.m: -------------------------------------------------------------------------------- 1 | %% Example3_Positioning_error_analysis.m 2 | % Positioning error analysis 3 | % Example 3 in GPS solutions paper 4 | % Author: Taro Suzuki 5 | 6 | clear; close all; clc; 7 | addpath ../ 8 | datapath = "./data/kinematic/"; 9 | 10 | %% Positioining error analysis 11 | gsol = gt.Gsol(datapath+"rover.pos"); % Read position solution 12 | gsol = gsol.fixedInterval(); % Constant time interval 13 | ref = readmatrix(datapath+"reference.csv"); % Read reference position 14 | gpos = gt.Gpos(ref(1:5:end,3:5), "llh"); % Create Gpos object 15 | gerr = gsol-gpos; % Create Gerr object 16 | gerr.plotCDF3D % Plot CDF of 3D error -------------------------------------------------------------------------------- /examples/compute_fixrate.m: -------------------------------------------------------------------------------- 1 | %% compute_fixrate.m 2 | % Compute ambiguity fixed rate from RTK-GNSS solution 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | basepath = "./data/kinematic/"; 8 | 9 | %% Read RTKLIB solution file 10 | gsol = gt.Gsol(basepath+"rover_rtk.pos"); 11 | 12 | %% Check solution time interval 13 | % Solution contains many missing epochs 14 | gsol.time.plotDiff(); 15 | 16 | fprintf("Time interval of solution is not constant (including missing): nepoch=%d\n",gsol.n); 17 | % Status rate/count 18 | disp(gt.C.SOLQNAME(1:7)); 19 | disp(gsol.statRate); 20 | disp(gsol.statCount); 21 | 22 | % This is incorrect fixed rate 23 | gsol.showStatRate; 24 | gsol.showFixRate; 25 | 26 | %% Create solution for fixed time interval (insert NaN) 27 | gsol_fixed = gsol.fixedInterval(); 28 | gsol_fixed.time.plotDiff(); ylim([0 1]); 29 | 30 | fprintf("\n\nTime interval of solution is constant: nepoch=%d\n",gsol_fixed.n); 31 | % Status rate/count 32 | disp(gt.C.SOLQNAME(1:7)); 33 | disp(gsol_fixed.statRate); 34 | disp(gsol_fixed.statCount); 35 | 36 | % This is correct fixed rate 37 | gsol_fixed.showStatRate; 38 | gsol_fixed.showFixRate; -------------------------------------------------------------------------------- /examples/compute_geoid.m: -------------------------------------------------------------------------------- 1 | %% compute_geoid.m 2 | % Compute Geoid and orthometric hight 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | 8 | %% Latitude, Longitude, Ellipsoidal height 9 | llh = [35 139 100]; 10 | pos = gt.Gpos(llh,"llh"); 11 | 12 | %% Geoid heigh 13 | gh = pos.geoid(); % RTKLIB internal Geoid model (EGM96 1°x1°) 14 | 15 | disp("Geoid Height (m):"); 16 | disp(gh); 17 | 18 | %% Orthometric height 19 | oh = pos.orthometric(); 20 | 21 | disp("Orthometric Height (m):"); 22 | disp(oh); 23 | disp(pos.h-gh); 24 | -------------------------------------------------------------------------------- /examples/compute_mean_position.m: -------------------------------------------------------------------------------- 1 | %% compute_mean_position.m 2 | % Compute mean position from solution file 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | datapath = "./data/static/"; 8 | 9 | %% Read RTKLIB solution file (static data) 10 | gsol = gt.Gsol(datapath+"rover_rtk.pos"); 11 | 12 | %% Compute mean position of fixed solution 13 | gpos = gsol.mean(gt.C.SOLQ_FIX); 14 | 15 | %% Write mean position to file 16 | gpos.outPos(datapath+"rover_position.txt","llh"); 17 | 18 | %% Plot 19 | % set mean position to origin 20 | gsol.setOrg(gpos.llh, "llh"); 21 | 22 | % plot fixed position (mean position is center) 23 | gsol.plot(gt.C.SOLQ_FIX); 24 | 25 | % display mean position 26 | disp(gpos.meanLLH) -------------------------------------------------------------------------------- /examples/convert_coordinate.m: -------------------------------------------------------------------------------- 1 | %% convert_coordinate.m 2 | % Convert LLH, ECEF and ENU position to each other 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | 8 | %% Latitude, Longitude, Ellipsoidal height 9 | llh = [35 139 100; 10 | 35.0001 139.0001 200]; 11 | 12 | pos1 = gt.Gpos(llh,"llh"); 13 | 14 | disp("ECEF:") 15 | disp(pos1.xyz) 16 | 17 | %% ECEF 18 | pos2 = gt.Gpos(pos1.xyz,"xyz"); 19 | 20 | disp("LLH:") 21 | disp(pos2.llh) 22 | 23 | %% ENU 24 | orgllh = [35 139 100]; 25 | pos3 = gt.Gpos(llh,"llh",orgllh,"llh"); 26 | 27 | disp("ENU:") 28 | disp(pos3.enu) 29 | 30 | %% Set coordinate origin 31 | pos2.setOrg(orgllh,"llh"); 32 | 33 | disp("ENU:") 34 | disp(pos2.enu) 35 | 36 | %% ENU to LLH 37 | enu = [0 0 0; 38 | 1 1 1]; 39 | 40 | pos4 = gt.Gpos(enu,"enu",orgllh,"llh"); 41 | 42 | disp("LLH:") 43 | disp(pos4.llh) 44 | -------------------------------------------------------------------------------- /examples/convert_solution_to_kml.m: -------------------------------------------------------------------------------- 1 | %% convert_solution_to_kml.m 2 | % Convert positioning solution to Google Earth KML file 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | datapath = "./data/kinematic/"; 8 | 9 | %% Read RTKLIB solution file 10 | gsol = gt.Gsol(datapath+"rover_rtk.pos"); 11 | 12 | %% Convert solution to KML file 13 | open = 1; % Open Google Earth (0:off,1:on) 14 | lw = 1; % Line width (0: No line) 15 | lc = "w"; % Line Color (e.g. "r" or [1 0 0]) 16 | ps = 0.5; % Point size (0: No point) 17 | pc = 0; % Point Color (0: Solution status) 18 | 19 | % Save KML file 20 | gsol.outKML(datapath+"rover_rtk.kml", open, lw, lc, ps, pc); -------------------------------------------------------------------------------- /examples/convert_time.m: -------------------------------------------------------------------------------- 1 | %% convert_time.m 2 | % Convert GPS time, calender time and UTC time to each other 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | 8 | %% Calendar time vector 9 | epochs = [2024 6 17 1 2 3;... 10 | 2024 6 17 1 2 4]; 11 | 12 | t1 = gt.Gtime(epochs); 13 | 14 | disp("GPS time of week (s):"); 15 | disp(t1.tow); 16 | disp("GPS week:"); 17 | disp(t1.week); 18 | 19 | %% GPS time of week 20 | t2 = gt.Gtime(t1.tow, t1.week); 21 | 22 | disp("Calendar time vector:"); 23 | disp(t2.ep); 24 | 25 | %% MATLAB date time 26 | t3 = gt.Gtime(datetime("now","TimeZone","UTC")); % UTC 27 | 28 | disp("Current time in UTC:"); 29 | disp(t3.t); 30 | 31 | %% UTC to GPST 32 | utcflag = true; 33 | t4 = gt.Gtime(t3.ep, utcflag); 34 | 35 | disp("Leap time:"); 36 | disp(t3.t-t4.t); 37 | 38 | %% Day of year, Day of week, Seconds of day 39 | disp("Current time:"); 40 | disp(t4.t); 41 | 42 | disp("Day of year:"); 43 | disp(t4.doy); 44 | 45 | disp("Day of week:"); 46 | disp(t4.dow); 47 | 48 | disp("Seconds of day:"); 49 | disp(t4.sod); 50 | 51 | -------------------------------------------------------------------------------- /examples/data/kinematic/base_position.txt: -------------------------------------------------------------------------------- 1 | 35.134709483 136.977574275 104.7280 -------------------------------------------------------------------------------- /examples/data/static/base_position.txt: -------------------------------------------------------------------------------- 1 | 35.134707705 136.977577939 104.853 -------------------------------------------------------------------------------- /examples/data/static/rover_position.txt: -------------------------------------------------------------------------------- 1 | 35.13469901 136.97757549 104.8626 2 | -------------------------------------------------------------------------------- /examples/edit_rinex_observation1.m: -------------------------------------------------------------------------------- 1 | %% edit_rinex_observation1.m 2 | % Read and write RINEX observation 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | datapath = "./data/kinematic/"; 8 | 9 | %% Read RINEX observation file 10 | gobs = gt.Gobs(datapath+"rover.obs"); 11 | 12 | %% Change observation interval 13 | % 0.2s (5Hz) to 1.0s (1Hz) 14 | fprintf('observation interval: %f\n', gobs.dt); 15 | gobs_1Hz = gobs.fixedInterval(1.0); 16 | fprintf('observation interval: %f\n', gobs_1Hz.dt); 17 | 18 | %% Write RINEX observation 19 | gobs_1Hz.outObs(datapath+"rover_1Hz.obs"); 20 | -------------------------------------------------------------------------------- /examples/edit_rinex_observation2.m: -------------------------------------------------------------------------------- 1 | %% edit_rinex_observation2.m 2 | % Trim RINEX observation using time span 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | datapath = "./data/kinematic/"; 8 | 9 | %% Read RINEX observation file 10 | gobs = gt.Gobs(datapath+"rover_1Hz.obs"); 11 | 12 | %% Trim observation 13 | fprintf('Original data\n'); 14 | fprintf('Number of epochs: %d\n', gobs.n); 15 | fprintf('Start: %s\n', gobs.time.t(1)); % start time 16 | fprintf('End : %s\n', gobs.time.t(end)); % end time 17 | 18 | % Generate gt.Gtime 19 | ts = gt.Gtime([2023 7 11 6 5 0]); % start time 20 | te = gt.Gtime(datetime('2023/07/11 6:10:00')); % end time 21 | 22 | % Trim observation using time span 23 | gobs_trim = gobs.selectTimeSpan(ts,te); 24 | 25 | fprintf('Triming data\n'); 26 | fprintf('Number of epochs: %d\n', gobs_trim.n); 27 | fprintf('Start: %s\n', gobs_trim.time.t(1)); % start time 28 | fprintf('End : %s\n', gobs_trim.time.t(end)); % end time -------------------------------------------------------------------------------- /examples/edit_rinex_observation3.m: -------------------------------------------------------------------------------- 1 | %% edit_rinex_observation3.m 2 | % Modify RINEX observation interval 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | datapath = "./data/kinematic/"; 8 | 9 | %% Read RINEX observation file 10 | gobs = gt.Gobs(datapath+"rover_1Hz.obs"); 11 | 12 | %% Fixed observation interval 13 | % Observations missing a few seconds due to satellite signal blockage 14 | gobs.time.plotDiff(); 15 | fprintf('Original: Number of epochs: %d\n', gobs.n); 16 | 17 | % NaN is inserted into the observation when missing 18 | gobs_fix = gobs.fixedInterval(gobs.dt); % interval is 1.0 s 19 | gobs_fix.time.plotDiff(); 20 | fprintf('Fixed: Number of epochs: %d\n', gobs_fix.n); -------------------------------------------------------------------------------- /examples/edit_rinex_observation4.m: -------------------------------------------------------------------------------- 1 | %% edit_rinex_observation4.m 2 | % Exclude satellites from RINEX observation 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | datapath = "./data/kinematic/"; 8 | 9 | %% Read RINEX observation file 10 | gobs = gt.Gobs(datapath+"rover_1Hz.obs"); 11 | 12 | %% Exclude satellite system 13 | % Plot number of satellites 14 | gobs.plotNSat(); 15 | 16 | % Exclude satellite 17 | gobs_exsys = gobs.selectSat(gobs.sys==gt.C.SYS_GPS); % Only GPS 18 | 19 | % Plot number of satellites 20 | gobs_exsys.plotNSat(); 21 | 22 | %% Exclude G05 and G06 23 | fprintf('Original: nsat:%d\n', gobs_exsys.nsat); 24 | disp(gobs_exsys.satstr); 25 | 26 | % Sattelite indexes not excluded 27 | satidx = ~ismember(gobs_exsys.satstr, {'G05','G06'}); 28 | 29 | % Exclude satellite 30 | gobs_exsat = gobs_exsys.selectSat(satidx); 31 | 32 | fprintf('Excluded: nsat:%d\n', gobs_exsat.nsat); 33 | disp(gobs_exsat.satstr); -------------------------------------------------------------------------------- /examples/edit_solution.m: -------------------------------------------------------------------------------- 1 | %% edit_solution.m 2 | % Read position solution file and trim solution 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | datapath = './data/kinematic/'; 8 | 9 | %% Read RTKLIB solution file 10 | gsol = gt.Gsol([datapath 'rover_rtk.pos']); 11 | 12 | %% Select only ambiguity fixed solutions 13 | gsolfix = gsol.select(gsol.stat==gt.C.SOLQ_FIX); 14 | gsolfix.plot 15 | 16 | %% Select from index 17 | gsolsel1 = gsol.select(1:10) 18 | gsolsel1.plot 19 | 20 | %% Select from time span 21 | ts = gt.Gtime([2023 07 11 06 04 30]); 22 | te = gt.Gtime([2023 07 11 06 06 40]); 23 | gsolsel2 = gsol.selectTimeSpan(ts, te) 24 | gsolsel2.plot 25 | -------------------------------------------------------------------------------- /examples/estimate_position_rtk.m: -------------------------------------------------------------------------------- 1 | %% estimate_position_rtk.m 2 | % RTK-GNSS positioning using RTKLIB 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | datapath = "./data/kinematic/"; 8 | 9 | %% Read RINEX observation and navigation file 10 | gnav = gt.Gnav(datapath+"base.nav"); 11 | gobsr = gt.Gobs(datapath+"rover_1Hz.obs"); 12 | gobsb = gt.Gobs(datapath+"base.obs"); 13 | 14 | %% Make base and rover time the same 15 | gobsb = gobsb.sameTime(gobsr); 16 | 17 | %% Load RTKLIB config file 18 | gopt = gt.Gopt(datapath+"rtk.conf"); 19 | % gopt.out.trace = gt.C.TRACE_LV3; % Trace option is not saved in the config file 20 | disp(gopt.pos1); 21 | 22 | %% RTK Positioning 23 | grtk = gt.Grtk(gopt); % RTK control object 24 | 25 | disp('run rtkpos...') 26 | [grtk, gsol, gstat] = gt.Gfun.rtkpos(grtk, gobsr, gnav, gopt, gobsb); 27 | 28 | %% Plot solution 29 | gsol.plot(); 30 | 31 | %% Output solution 32 | gsol.outSol(datapath+"rover_1Hz_rtk.pos",gopt); 33 | 34 | 35 | -------------------------------------------------------------------------------- /examples/estimate_position_spp.m: -------------------------------------------------------------------------------- 1 | %% estimate_position_spp.m 2 | % Single point positioning using RTKLIB 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | datapath = "./data/kinematic/"; 8 | 9 | %% Read RINEX observation and navigation file 10 | nav = gt.Gnav(datapath+"base.nav"); 11 | obs = gt.Gobs(datapath+"rover_1Hz.obs"); 12 | 13 | %% Plot RINEX observation data 14 | obs.plot("L1"); 15 | obs.plotNSat("L1"); 16 | 17 | %% Load RTKLIB config file 18 | opt = gt.Gopt(datapath+"spp.conf"); 19 | % gopt.out.trace = gt.C.TRACE_LV3; % Trace option is not saved in the config file 20 | disp(opt.pos1); 21 | 22 | %% Single point positioning 23 | [sol, stat] = gt.Gfun.pntpos(obs, nav, opt); 24 | 25 | %% Plot solution 26 | sol.plot(); 27 | 28 | %% Save to RTKLIB position file 29 | sol.outSol(datapath+"rover_1Hz_spp.pos", opt); -------------------------------------------------------------------------------- /examples/evaluate_position_error.m: -------------------------------------------------------------------------------- 1 | %% evaluate_position_error.m 2 | % Evaluate positioning accuracy and plot error 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | datapath = "./data/kinematic/"; 8 | 9 | %% Read RTKLIB solution file 10 | sol = gt.Gsol(datapath+"rover_rtk.pos"); 11 | sol.plot 12 | 13 | %% Read reference position 14 | solref = gt.Gsol(datapath+"reference_1Hz.pos"); 15 | 16 | %% Set position origin 17 | % Start position is origin 18 | sol.setOrg(solref.pos.llh(1,:),"llh"); 19 | solref.setOrg(solref.pos.llh(1,:),"llh"); 20 | 21 | %% Match solution size 22 | sol = sol.fixedInterval(1.0); % 5Hz to 1Hz 23 | 24 | %% Compute error 25 | err = sol-solref; 26 | 27 | %% Display error statistics 28 | r3d = err.rms3D % rms of 3D distance error 29 | [m3d, sd3d] = err.mean3D % mean of 3D distance error 30 | 31 | %% Plot 32 | err.plot % 2D + hight error 33 | err.plot3D % 3D distance error 34 | err.plotCDF3D % Cumulative Distribution Function of 3D distance error -------------------------------------------------------------------------------- /examples/evaluate_velocity_error.m: -------------------------------------------------------------------------------- 1 | %% evaluate_velocity_error.m 2 | % Evaluate velocity accuracy and plot error 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | datapath = "./data/kinematic/"; 8 | 9 | %% Read RINEX observation and navigation file 10 | gnav = gt.Gnav(datapath+"base.nav"); 11 | gobs = gt.Gobs(datapath+"base.obs"); 12 | 13 | %% Load RTKLIB config file 14 | gopt = gt.Gopt(datapath+"spp.conf"); 15 | 16 | %% Single point positioning 17 | [gsol, gstat] = gt.Gfun.pntpos(gobs, gnav, gopt); 18 | 19 | %% Velocity error 20 | orgxyz = gsol.pos.xyz(1,:); % First position is origin 21 | gsol.setOrg(orgxyz,"xyz") 22 | vxyzref = zeros(gobs.n,3); 23 | err = gsol.vel-gt.Gvel(vxyzref,"xyz",orgxyz,"xyz"); 24 | 25 | %% Display error statistics 26 | err.rms2D 27 | err.rms3D 28 | 29 | %% Plot velocity error 30 | err.setOrg(gobs.pos.llh,"llh"); 31 | err.plot 32 | err.plotENU -------------------------------------------------------------------------------- /examples/generate_configuration_file.m: -------------------------------------------------------------------------------- 1 | %% generate_configuration_file.m 2 | % Generate RTKLIB configuration file 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | datapath = "./data/kinematic/"; 8 | 9 | %% % RTKLIB constants 10 | C = gt.C; 11 | 12 | %% Generate RTKLIB configuration 13 | opt = gt.Gopt(); % RTKLIB default option 14 | opt.pos1.navsys = C.NAVSYS_GREQC; % Satellite system used for positioning 15 | opt.pos1.elmask = 30; % Elevation mask (deg) 16 | opt.pos1.snrmask_r = C.ON; % SNR mask ON 17 | opt.pos1.snrmask_L1 = 35*ones(1,9); % L1 SNR mask (dB-Hz) 18 | 19 | %% Wrtite configration to file 20 | opt.saveOpt(datapath+"spp.conf"); % Save configration to file 21 | 22 | %% Show options 23 | opt.show -------------------------------------------------------------------------------- /examples/generate_solution_file.m: -------------------------------------------------------------------------------- 1 | %% generate_solution_file.m 2 | % Generate RTKLIB solution file 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | datapath = './data/kinematic/'; 8 | 9 | %% Read position from CSV file 10 | data = readtable(datapath+"reference.csv","VariableNamingRule","preserve"); 11 | 12 | %% Generate gt.Gsol 13 | time = gt.Gtime(data.("GPS TOW (s)"), data.("GPS Week")); 14 | pos = gt.Gpos(data{:,3:5},"llh"); 15 | sol = gt.Gsol(time,pos); 16 | 17 | %% 5Hz to 1Hz 18 | sol = sol.fixedInterval(1.0); 19 | 20 | %% Plot solution 21 | sol.plot 22 | 23 | %% Output solution file 24 | sol.outSol(datapath+"reference_1Hz.pos"); -------------------------------------------------------------------------------- /examples/plot_observation1.m: -------------------------------------------------------------------------------- 1 | %% plot_observation1.m 2 | % Show observation status and number of satellite 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | datapath = "./data/static/"; 8 | 9 | %% Read RINEX observation file 10 | gobs = gt.Gobs(datapath+"rover.obs"); 11 | 12 | %% Plot observation 13 | gobs.plot("L1"); 14 | gobs.plot("L2"); 15 | 16 | %% Plot number of satellites 17 | gobs.plotNSat(); % L1, Threshold: 0dB-Hz 18 | 19 | snr_th = 35; % dB-Hz 20 | gobs.plotNSat("L1",snr_th); % L1, Threshold: 35dB-Hz -------------------------------------------------------------------------------- /examples/plot_observation2.m: -------------------------------------------------------------------------------- 1 | %% plot_observation2.m 2 | % Show raw GNSS measurements 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | datapath = "./data/static/"; 8 | 9 | %% Read RINEX observation file 10 | gobs = gt.Gobs(datapath+"rover.obs"); 11 | 12 | %% Plot raw observation 13 | 14 | % Pseudorange 15 | figure; 16 | plot(gobs.time.t, gobs.L1.P); grid on; 17 | legend(gobs.satstr,"Location","eastoutside"); 18 | title("Pseudorange"); 19 | ylabel("Pseudorange (m)"); 20 | 21 | % Carrier phase 22 | figure; 23 | plot(gobs.time.t, gobs.L1.L); grid on; 24 | legend(gobs.satstr,"Location","eastoutside"); 25 | title("Carrier phase"); 26 | ylabel("Carrier phase (cycle)"); 27 | 28 | % Doppler 29 | figure; 30 | plot(gobs.time.t, gobs.L1.D); grid on; 31 | legend(gobs.satstr,"Location","eastoutside"); 32 | title("Doppler"); 33 | ylabel("Doppler (Hz)"); 34 | 35 | % SNR 36 | figure; 37 | plot(gobs.time.t, gobs.L1.S); grid on; 38 | legend(gobs.satstr,"Location","eastoutside"); 39 | title("SNR"); 40 | ylabel("SNR (dB-Hz)"); -------------------------------------------------------------------------------- /examples/plot_position.m: -------------------------------------------------------------------------------- 1 | %% plot_position.m 2 | % Show position on map 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | 8 | %% Generate position 9 | enu = zeros(11,3); enu(:,1) = 0:100:1000; 10 | orgxyz = [-3959340.203 3352854.274 3697471.413]; % position origin in ECEF 11 | 12 | pos = gt.Gpos(enu,"enu"); 13 | pos.setOrg(orgxyz,"xyz"); 14 | 15 | %% Plot position 16 | pos.plot 17 | pos.plotMap 18 | pos.plotSatMap 19 | 20 | -------------------------------------------------------------------------------- /examples/plot_satellite_constellation1.m: -------------------------------------------------------------------------------- 1 | %% plot_satellite_constellation1.m 2 | % Show satellite constellation 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | datapath = "./data/static/"; 8 | 9 | %% Read RINEX navigation and observation files 10 | gnav = gt.Gnav(datapath+"base.nav"); 11 | gobs = gt.Gobs(datapath+"rover.obs"); 12 | 13 | %% Plot satellite constellation 14 | % RINEX header position is used for receiver position in default 15 | gobs.plotSky(gnav); 16 | 17 | %% Plot satellite constellation using gt.Gsat 18 | gsat = gt.Gsat(gobs,gnav); 19 | 20 | % Set receiver position 21 | gsat.setRcvPos(gobs.pos); 22 | 23 | % Skyplot for only GPS at first epoch 24 | gsat.plotSky(1, gsat.sys==gt.C.SYS_GPS); -------------------------------------------------------------------------------- /examples/plot_satellite_constellation2.m: -------------------------------------------------------------------------------- 1 | %% plot_satellite_constellation2.m 2 | % Show satellite elevation and azimuth angles 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | basepath = "./data/static/"; 8 | 9 | %% Read RINEX navigation and observation files 10 | gnav = gt.Gnav(basepath+"base.nav"); 11 | gobs = gt.Gobs(basepath+"rover.obs"); 12 | 13 | %% Compute satellite position 14 | gsat = gt.Gsat(gobs,gnav); 15 | 16 | % Set receiver position 17 | gsat.setRcvPos(gobs.pos); 18 | 19 | %% Plot satellite elevation and azimuth 20 | % GPS satellite index 21 | idxgps = gsat.sys==gt.C.SYS_GPS; 22 | 23 | % Plot GPS elevation/azimuth 24 | tiledlayout(2,1) 25 | 26 | % Elevation 27 | ax1 = nexttile; 28 | plot(gsat.time.t,gsat.el(:,idxgps),"LineWidth",2); 29 | ylabel("Elevation angle (deg)") 30 | grid on; 31 | 32 | % Azimuth 33 | ax2 = nexttile; 34 | plot(gsat.time.t,gsat.az(:,idxgps),"LineWidth",2); 35 | ylabel("Azimuth angle (deg)") 36 | grid on 37 | 38 | % Show satellite name 39 | lg = legend(gsat.satstr(idxgps)); 40 | lg.Layout.Tile = "East"; 41 | linkaxes([ax1 ax2],"x"); 42 | -------------------------------------------------------------------------------- /examples/plot_solution.m: -------------------------------------------------------------------------------- 1 | %% plot_solution.m 2 | % Show RTK position solutions 3 | % Author: Taro Suzuki 4 | 5 | clear; close all; clc; 6 | addpath ../ 7 | datapath = "./data/kinematic/"; 8 | 9 | %% Read RTKLIB solution file 10 | gsol = gt.Gsol(datapath+"rover_rtk.pos"); 11 | 12 | %% Plot solution file 13 | gsol.plot 14 | 15 | %% Plot only Fixed Position 16 | gsol.plot(gt.C.SOLQ_FIX); 17 | 18 | %% Plot all solutions 19 | gsol.plotAll 20 | 21 | %% Plot soltion to map 22 | gsol.plotMap 23 | 24 | %% Plot soltion to satellite map 25 | gsol.plotSatMap -------------------------------------------------------------------------------- /src/mex/adjgpsweek.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file adjgpsweek.c 3 | * @brief Adjust gps week number using cpu time 4 | * @author Taro Suzuki 5 | * @note Wrapper for "adjgpsweek" in rtkcmn.c 6 | * @note Support vector inputs 7 | */ 8 | 9 | #include "mex_utility.h" 10 | 11 | #define NIN 1 12 | 13 | /* mex interface */ 14 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 15 | const mxArray *argin[]) { 16 | int i, m, n, iadjweek; 17 | double *week, *adjweek; 18 | 19 | /* check arguments */ 20 | mxCheckNumberOfArguments(nargin, NIN); 21 | mxCheckDouble(argin[0]); /* week */ 22 | 23 | /* input */ 24 | week = (double *)mxGetPr(argin[0]); 25 | m = (int)mxGetM(argin[0]); 26 | n = (int)mxGetN(argin[0]); 27 | 28 | /* outputs */ 29 | argout[0] = mxCreateDoubleMatrix(m, n, mxREAL); 30 | adjweek = mxGetPr(argout[0]); 31 | 32 | /* call RTKLIB function */ 33 | for (i = 0; i < m * n; i++) { 34 | iadjweek = adjgpsweek((int)week[i]); 35 | adjweek[i] = (double)iadjweek; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/mex/code2idx.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file mex_code2idx.c 3 | * @brief Convert system and obs code to frequency index 4 | * @author Taro Suzuki 5 | * @note Wrapper for "code2idx" in rtkcmn.c 6 | * @note Support vector inputs 7 | */ 8 | 9 | #include "mex_utility.h" 10 | 11 | #define NIN 2 12 | 13 | /* mex interface */ 14 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 15 | const mxArray *argin[]) { 16 | int i, m, n; 17 | double *sys, *code, *idx; 18 | 19 | /* check arguments */ 20 | mxCheckNumberOfArguments(nargin, NIN); 21 | mxCheckSameSize(argin[0], argin[1]); /* sys,code */ 22 | 23 | /* inputs */ 24 | sys = (double *)mxGetPr(argin[0]); 25 | m = (int)mxGetM(argin[0]); 26 | n = (int)mxGetN(argin[0]); 27 | code = (double *)mxGetPr(argin[1]); 28 | 29 | /* output */ 30 | argout[0] = mxCreateDoubleMatrix(m, n, mxREAL); 31 | idx = mxGetPr(argout[0]); 32 | 33 | /* call RTKLIB function */ 34 | for (i = 0; i < m * n; i++) { 35 | idx[i] = (double)code2idx((int)sys[i], (uint8_t)code[i]); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/mex/code2obs.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file code2obs.c 3 | * @brief Convert obs code to obs code string 4 | * @author Taro Suzuki 5 | * @note Wrapper for "code2obs" in rtkcmn.c 6 | * @note Support vector inputs 7 | */ 8 | 9 | #include "mex_utility.h" 10 | 11 | #define NIN 1 12 | 13 | /* mex interface */ 14 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 15 | const mxArray *argin[]) { 16 | int i, m, n; 17 | double *code; 18 | char *obs; 19 | 20 | /* check arguments */ 21 | mxCheckNumberOfArguments(nargin, NIN); 22 | mxCheckDouble(argin[0]); /* code */ 23 | 24 | /* input */ 25 | code = (double *)mxGetPr(argin[0]); 26 | m = (int)mxGetM(argin[0]); 27 | n = (int)mxGetN(argin[0]); 28 | 29 | /* output */ 30 | argout[0] = mxCreateCellMatrix(m, n); 31 | 32 | /* call RTKLIB function */ 33 | for (i = 0; i < m * n; i++) { 34 | obs = code2obs((uint8_t)code[i]); 35 | mxSetCell(argout[0], i, mxCreateString(obs)); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/mex/deg2dms.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file deg2dms.c 3 | * @brief Convert degree to degree-minute-second 4 | * @author Taro Suzuki 5 | * @note Wrapper for "deg2dms" in rtkcmn.c 6 | * @note Support vector inputs 7 | */ 8 | 9 | #include "mex_utility.h" 10 | 11 | #define NIN 1 12 | 13 | /* mex interface */ 14 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 15 | const mxArray *argin[]) { 16 | int i, m, ndec = 9; 17 | double *deg, dms[3], *dmsout; 18 | 19 | /* check arguments */ 20 | mxCheckNumberOfArguments(nargin, NIN); 21 | mxCheckSizeOfColumns(argin[0], 1); /* deg */ 22 | if (nargin == 2) { 23 | mxCheckScalar(argin[1]); /* ndec */ 24 | } 25 | 26 | /* inputs */ 27 | deg = (double *)mxGetPr(argin[0]); 28 | m = (int)mxGetM(argin[0]); 29 | if (nargin == 2) ndec = (int)mxGetScalar(argin[1]); 30 | 31 | /* output */ 32 | argout[0] = mxCreateDoubleMatrix(m, 3, mxREAL); 33 | dmsout = mxGetPr(argout[0]); 34 | 35 | /* call RTKLIB function */ 36 | for (i = 0; i < m; i++) { 37 | deg2dms(deg[i], dms, ndec); 38 | dmsout[i + m * 0] = dms[0]; 39 | dmsout[i + m * 1] = dms[1]; 40 | dmsout[i + m * 2] = dms[2]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/mex/dms2deg.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file dms2deg.c 3 | * @brief Convert degree-minute-second to degree 4 | * @author Taro Suzuki 5 | * @note Wrapper for "dms2deg" in rtkcmn.c 6 | * @note Support vector inputs 7 | */ 8 | 9 | #include "mex_utility.h" 10 | 11 | #define NIN 1 12 | 13 | /* mex interface */ 14 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 15 | const mxArray *argin[]) { 16 | int i, m; 17 | double *dmsin, dms[3], *deg; 18 | 19 | /* check arguments */ 20 | mxCheckNumberOfArguments(nargin, NIN); 21 | mxCheckSizeOfColumns(argin[0], 3); /* dms */ 22 | 23 | /* inputs */ 24 | dmsin = (double *)mxGetPr(argin[0]); 25 | m = (int)mxGetM(argin[0]); 26 | 27 | /* output */ 28 | argout[0] = mxCreateDoubleMatrix(m, 1, mxREAL); 29 | deg = mxGetPr(argout[0]); 30 | 31 | /* call RTKLIB function */ 32 | for (i = 0; i < m; i++) { 33 | dms[0] = dmsin[i + m * 0]; 34 | dms[1] = dmsin[i + m * 1]; 35 | dms[2] = dmsin[i + m * 2]; 36 | deg[i] = dms2deg(dms); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/mex/eph2clk.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file eph2clk.c 3 | * @brief Compute satellite clock bias with broadcast ephemeris (gps, galileo, qzss) 4 | * @author Taro Suzuki 5 | * @note Wrapper for "eph2clk" in ephemeris.c 6 | * @note Support vector inputs 7 | */ 8 | 9 | #include "mex_utility.h" 10 | 11 | #define NIN 2 12 | 13 | /* mex interface */ 14 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 15 | const mxArray *argin[]) { 16 | eph_t eph = {0}; 17 | gtime_t time; 18 | int i, m; 19 | double ep[6], *eps, *dtss; 20 | 21 | /* check arguments */ 22 | mxCheckNumberOfArguments(nargin, NIN); 23 | mxCheckSizeOfColumns(argin[0], 6); /* epochs*/ 24 | 25 | /* inputs */ 26 | eps = (double *)mxGetPr(argin[0]); 27 | m = (int)mxGetM(argin[0]); 28 | mxeph2eph(argin[1], 1, &eph); 29 | 30 | /* outputs */ 31 | argout[0] = mxCreateDoubleMatrix(m, 1, mxREAL); 32 | dtss = mxGetPr(argout[0]); 33 | 34 | /* call RTKLIB function */ 35 | for (i = 0; i < m; i++) { 36 | ep[0] = eps[i + m * 0]; 37 | ep[1] = eps[i + m * 1]; 38 | ep[2] = eps[i + m * 2]; 39 | ep[3] = eps[i + m * 3]; 40 | ep[4] = eps[i + m * 4]; 41 | ep[5] = eps[i + m * 5]; 42 | time = epoch2time(ep); 43 | 44 | dtss[i] = eph2clk(time, &eph); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/mex/expath.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file expath.c 3 | * @brief Expand file path with wild-card (*) in file 4 | * @author Taro Suzuki 5 | * @note Wrapper for "expath" in rtkcmn.c 6 | */ 7 | 8 | #include "mex_utility.h" 9 | 10 | #define NIN 1 11 | 12 | /* mex interface */ 13 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 14 | const mxArray *argin[]) { 15 | int i, n, nmax = 10; 16 | char path[512]; 17 | char **paths = (char **)malloc(nmax*sizeof(char *)); 18 | for (i = 0; i < nmax; i++) { 19 | paths[i] = (char *)malloc(512 * sizeof(char)); 20 | } 21 | 22 | /* check arguments */ 23 | mxCheckNumberOfArguments(nargin, NIN); 24 | mxCheckChar(argin[0]); /* file path */ 25 | 26 | /* input */ 27 | mxGetString(argin[0], path, 512); 28 | //mexPrintf("%s\n",path); 29 | 30 | /* call RTKLIB function */ 31 | n = expath(path, paths, nmax); 32 | 33 | /* outputs */ 34 | argout[0] = mxCreateCellMatrix(1, n); 35 | 36 | for (i = 0; i < n; i++) { 37 | mxSetCell(argout[0], i, mxCreateString(paths[i])); 38 | } 39 | 40 | free(paths); 41 | } -------------------------------------------------------------------------------- /src/mex/geph2clk.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file geph2clk.c 3 | * @brief Compute satellite clock bias with glonass ephemeris 4 | * @author Taro Suzuki 5 | * @note Wrapper for "geph2clk" in ephemeris.c 6 | * @note Support vector inputs 7 | */ 8 | 9 | #include "mex_utility.h" 10 | 11 | #define NIN 2 12 | 13 | /* mex interface */ 14 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 15 | const mxArray *argin[]) { 16 | geph_t geph = {0}; 17 | gtime_t time; 18 | int i, m; 19 | double ep[6], *eps, *dtss; 20 | 21 | /* check arguments */ 22 | mxCheckNumberOfArguments(nargin, NIN); 23 | mxCheckSizeOfColumns(argin[0], 6); /* epochs*/ 24 | 25 | /* inputs */ 26 | eps = (double *)mxGetPr(argin[0]); 27 | m = (int)mxGetM(argin[0]); 28 | mxgeph2geph(argin[1], 1, &geph); 29 | 30 | /* outputs */ 31 | argout[0] = mxCreateDoubleMatrix(m, 1, mxREAL); 32 | dtss = mxGetPr(argout[0]); 33 | 34 | /* call RTKLIB function */ 35 | for (i = 0; i < m; i++) { 36 | ep[0] = eps[i + m * 0]; 37 | ep[1] = eps[i + m * 1]; 38 | ep[2] = eps[i + m * 2]; 39 | ep[3] = eps[i + m * 3]; 40 | ep[4] = eps[i + m * 4]; 41 | ep[5] = eps[i + m * 5]; 42 | time = epoch2time(ep); 43 | 44 | dtss[i] = geph2clk(time, &geph); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/mex/lambda_.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lambda_.c 3 | * @brief integer least-square estimation. reduction is performed by lambda 4 | * @author Taro Suzuki 5 | * @note Wrapper for "lambda" in lambda.c 6 | * @note Support vector inputs 7 | */ 8 | 9 | #include "mex_utility.h" 10 | 11 | #define NIN 3 12 | 13 | /* mex interface */ 14 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 15 | const mxArray *argin[]) { 16 | int m, n; 17 | double *a, *Q, *F, *Ft, *s; 18 | 19 | /* check arguments */ 20 | mxCheckNumberOfArguments(nargin, NIN); 21 | mxCheckScalar(argin[0]); /* m */ 22 | mxCheckSameColumns(argin[1], argin[2]); /* a , Q */ 23 | mxCheckSquareMatrix(argin[2]); /* Q */ 24 | 25 | /* inputs */ 26 | m = (int)mxGetScalar(argin[0]); 27 | a = (double *)mxGetPr(argin[1]); 28 | n = (int)mxGetN(argin[1]); 29 | Q = (double *)mxGetPr(argin[2]); 30 | 31 | /* output */ 32 | argout[0] = mxCreateDoubleMatrix(m, n, mxREAL); 33 | argout[1] = mxCreateDoubleMatrix(m, 1, mxREAL); 34 | 35 | F = mxGetPr(argout[0]); 36 | s = mxGetPr(argout[1]); 37 | 38 | Ft = (double *)malloc(m * n * sizeof(double)); 39 | 40 | /* call RTKLIB function */ 41 | lambda(n, m, a, Q, Ft, s); 42 | 43 | transpose(Ft, n, m, 1, F); 44 | 45 | free(Ft); 46 | } 47 | -------------------------------------------------------------------------------- /src/mex/llh2xyz.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file llh2xyz.c 3 | * @brief Transform (lat,lon,ellipsoidal height) to ECEF coordinate 4 | * @author Taro Suzuki 5 | * @note Wrapper for "pos2ecef" in rtkcmn.c 6 | * @note Change the function name from the original function 7 | * @note Change input unit from radian to degree 8 | * @note Support vector inputs 9 | */ 10 | 11 | #include "mex_utility.h" 12 | 13 | #define NIN 1 14 | 15 | /* mex interface */ 16 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 17 | const mxArray *argin[]) { 18 | int i, m; 19 | double l[3], x[3], *llh, *xyz; 20 | 21 | /* check arguments */ 22 | mxCheckNumberOfArguments(nargin, NIN); 23 | mxCheckSizeOfColumns(argin[0], 3); 24 | 25 | /* input */ 26 | llh = (double *)mxGetPr(argin[0]); 27 | m = (int)mxGetM(argin[0]); 28 | 29 | /* output */ 30 | argout[0] = mxCreateDoubleMatrix(m, 3, mxREAL); 31 | xyz = mxGetPr(argout[0]); 32 | 33 | /* call RTKLIB function */ 34 | for (i = 0; i < m; i++) { 35 | l[0] = llh[i + m * 0] * D2R; 36 | l[1] = llh[i + m * 1] * D2R; 37 | l[2] = llh[i + m * 2]; 38 | pos2ecef(l, x); 39 | xyz[i + m * 0] = x[0]; 40 | xyz[i + m * 1] = x[1]; 41 | xyz[i + m * 2] = x[2]; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/mex/loadopts.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file loadopts.c 3 | * @brief Load options from file (.conf) 4 | * @author Taro Suzuki 5 | * @note Wrapper for "loadopts" in option.c 6 | */ 7 | 8 | #include "mex_utility.h" 9 | 10 | #define NIN 0 11 | 12 | /* mex interface */ 13 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 14 | const mxArray *argin[]) { 15 | prcopt_t popt = prcopt_default; 16 | solopt_t sopt = solopt_default; 17 | char file[512], errmsg[512]; 18 | 19 | /* check arguments */ 20 | mxCheckNumberOfArguments(nargin, NIN); 21 | 22 | popt.ionoopt = IONOOPT_BRDC; 23 | popt.tropopt = TROPOPT_SAAS; 24 | 25 | if (nargin == 1) { 26 | mxCheckChar(argin[0]); /* option file */ 27 | mxGetString(argin[0], file, sizeof(file)); /* input */ 28 | 29 | /* load option from file */ 30 | if (!loadopts(file, sysopts)) { 31 | sprintf(errmsg, "Invalid option file: %s", file); 32 | mexErrMsgTxt(errmsg); 33 | } 34 | getsysopts(&popt, &sopt, NULL); 35 | } 36 | 37 | /* outputs */ 38 | argout[0] = opt2mxopt(&popt, &sopt); 39 | } -------------------------------------------------------------------------------- /src/mex/obs2code.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file obs2code.c 3 | * @brief Convert obs code type string to obs code 4 | * @author Taro Suzuki 5 | * @note Wrapper for "obs2code" in rtkcmn.c 6 | * @note Support vector inputs 7 | */ 8 | 9 | #include "mex_utility.h" 10 | 11 | #define NIN 1 12 | 13 | /* mex interface */ 14 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 15 | const mxArray *argin[]) { 16 | int i, m, n; 17 | double *code; 18 | char *obs; 19 | 20 | /* check arguments */ 21 | mxCheckNumberOfArguments(nargin, NIN); 22 | mxCheckCell(argin[0]); 23 | 24 | /* input */ 25 | m = (int)mxGetM(argin[0]); 26 | n = (int)mxGetN(argin[0]); 27 | 28 | /* output */ 29 | argout[0] = mxCreateDoubleMatrix(m, n, mxREAL); 30 | code = mxGetPr(argout[0]); 31 | 32 | /* call RTKLIB function */ 33 | for (i = 0; i < m * n; i++) { 34 | obs = mxArrayToString(mxGetCell(argin[0], i)); 35 | code[i] = (double)obs2code(obs); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/mex/readblq.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file readblq.c 3 | * @brief Read blq ocean tide loading parameters 4 | * @author Taro Suzuki 5 | * @note Wrapper for "readblq" in rtkcmn.c 6 | */ 7 | 8 | #include "mex_utility.h" 9 | 10 | #define NIN 2 11 | 12 | /* mex interface */ 13 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 14 | const mxArray *argin[]) { 15 | const mwSize dims[3] = {11, 6, 0}; 16 | double *odisp, odispt[6 * 11]; 17 | char file[512], sta[256], errmsg[512]; 18 | 19 | /* check arguments */ 20 | mxCheckNumberOfArguments(nargin, NIN); 21 | mxCheckChar(argin[0]); /* BLQ file path */ 22 | mxCheckChar(argin[1]); /* station name */ 23 | 24 | /* input */ 25 | mxGetString(argin[0], file, sizeof(file)); /* BLQ file path */ 26 | mxGetString(argin[1], sta, sizeof(sta)); /* station name */ 27 | 28 | /* output */ 29 | argout[0] = mxCreateDoubleMatrix(6, 11, mxREAL); 30 | odisp = mxGetPr(argout[0]); 31 | 32 | /* call RTKLIB function */ 33 | if (!readblq(file, sta, odispt)) { 34 | sprintf(errmsg, "readblq: invalid BLQ file: file:%s station:%s", file, sta); 35 | mexErrMsgTxt(errmsg); 36 | } 37 | transpose_mw(odispt, dims, odisp); 38 | } 39 | -------------------------------------------------------------------------------- /src/mex/readdcb.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file readdcb.c 3 | * @brief Read differential code bias (DCB) parameters 4 | * @author Taro Suzuki 5 | * @note Wrapper for "readdcb" in preceph.c 6 | */ 7 | 8 | #include "mex_utility.h" 9 | 10 | #define NIN 1 11 | 12 | /* mex interface */ 13 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 14 | const mxArray *argin[]) { 15 | nav_t nav = {0}; 16 | char file[512], errmsg[512]; 17 | 18 | /* check arguments */ 19 | mxCheckNumberOfArguments(nargin, NIN); 20 | mxCheckChar(argin[0]); /* DCB file name */ 21 | 22 | /* input */ 23 | mxGetString(argin[0], file, sizeof(file)); /* DCB file name */ 24 | if (nargin == 2) { 25 | nav = mxnav2nav(argin[1]); 26 | } 27 | 28 | /* call RTKLIB function */ 29 | if (!readdcb(file, &nav, NULL)) { 30 | sprintf(errmsg, "readdcb: invalid DCB file: %s", file); 31 | mexErrMsgTxt(errmsg); 32 | } 33 | //mexPrintf("%f\n", nav.cbias[0][1]); 34 | 35 | /* output */ 36 | argout[0] = nav2mxnav(&nav); 37 | 38 | if (nav.n > 0) free(nav.eph); 39 | if (nav.ng > 0) free(nav.geph); 40 | if (nav.ne > 0) free(nav.peph); 41 | if (nav.nc > 0) free(nav.pclk); 42 | if (nav.erp.n > 0) free(nav.erp.data); 43 | } 44 | -------------------------------------------------------------------------------- /src/mex/readerp.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file readerp.c 3 | * @brief Read earth rotation parameters 4 | * @author Taro Suzuki 5 | * @note Wrapper for "readerp" in rtkcmn.c 6 | */ 7 | 8 | #include "mex_utility.h" 9 | 10 | #define NIN 1 11 | 12 | /* mex interface */ 13 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 14 | const mxArray *argin[]) { 15 | erp_t erp = {0}; 16 | char file[512], errmsg[512]; 17 | 18 | /* check arguments */ 19 | mxCheckNumberOfArguments(nargin, NIN); 20 | mxCheckChar(argin[0]); /* ERP file name */ 21 | 22 | /* input */ 23 | mxGetString(argin[0], file, sizeof(file)); /* ERP file name */ 24 | 25 | /* call RTKLIB function */ 26 | if (!readerp(file, &erp)) { 27 | sprintf(errmsg, "readerp: invalid ERP file: %s", file); 28 | mexErrMsgTxt(errmsg); 29 | } 30 | 31 | /* output */ 32 | argout[0] = erp2mxerp(&erp); 33 | 34 | if (erp.n > 0) free(erp.data); 35 | } 36 | -------------------------------------------------------------------------------- /src/mex/readpcv.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file readpcv.c 3 | * @brief Read antenna parameters 4 | * @author Taro Suzuki 5 | * @note Wrapper for "readpcb" in rtkcmn.c 6 | */ 7 | 8 | #include "mex_utility.h" 9 | 10 | #define NIN 1 11 | 12 | /* mex interface */ 13 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 14 | const mxArray *argin[]) { 15 | pcvs_t pcvs = {0}; 16 | char file[512], errmsg[512]; 17 | 18 | /* check arguments */ 19 | mxCheckNumberOfArguments(nargin, NIN); 20 | mxCheckChar(argin[0]); /* PCV file name */ 21 | 22 | /* input */ 23 | mxGetString(argin[0], file, sizeof(file)); /* PCV file path */ 24 | 25 | /* call RTKLIB function */ 26 | if (!readpcv(file, &pcvs)) { 27 | sprintf(errmsg, "readpcv: Invalid PCV file: %s", file); 28 | mexErrMsgTxt(errmsg); 29 | } 30 | 31 | /* output */ 32 | argout[0] = pcv2mxpcv(pcvs.pcv, pcvs.n); 33 | 34 | free(pcvs.pcv); 35 | } 36 | -------------------------------------------------------------------------------- /src/mex/readpos.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file readpos.c 3 | * @brief Read positions from station position file 4 | * @author Taro Suzuki 5 | * @note Wrapper for "readpos in rinex.c 6 | */ 7 | 8 | #include "mex_utility.h" 9 | 10 | #define NIN 2 11 | 12 | /* mex interface */ 13 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 14 | const mxArray *argin[]) { 15 | int i; 16 | char file[512], station[512]; 17 | double *pos, posrad[3]; 18 | 19 | /* check arguments */ 20 | mxCheckNumberOfArguments(nargin, NIN); 21 | mxCheckChar(argin[0]); /* station position file */ 22 | mxCheckChar(argin[1]); /* station */ 23 | 24 | /* input */ 25 | mxGetString(argin[0], file, sizeof(file)); 26 | mxGetString(argin[1], station, sizeof(station)); 27 | 28 | /* output */ 29 | argout[0] = mxCreateDoubleMatrix(1, 3, mxREAL); 30 | pos = mxGetPr(argout[0]); 31 | 32 | /* call RTKLIB function */ 33 | readpos(file, station, &posrad); 34 | for (i=0; i<3; i++) pos[i] = posrad[i]; 35 | } 36 | -------------------------------------------------------------------------------- /src/mex/readrnxc.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file readrnxc.c 3 | * @brief Read RINEX clock files 4 | * @author Taro Suzuki 5 | * @note Wrapper for "readrnxc" in rinex.c 6 | */ 7 | 8 | #include "mex_utility.h" 9 | 10 | #define NIN 1 11 | 12 | /* mex interface */ 13 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 14 | const mxArray *argin[]) { 15 | nav_t nav = {0}; 16 | char file[512], errmsg[512]; 17 | gtime_t t = {0}; 18 | 19 | /* check arguments */ 20 | mxCheckNumberOfArguments(nargin, NIN); 21 | mxCheckChar(argin[0]); 22 | 23 | /* input */ 24 | mxGetString(argin[0], file, sizeof(file)); /* rinex clock file name */ 25 | if (nargin == 2) { 26 | nav = mxnav2nav(argin[1]); 27 | if (nav.nc > 0) { 28 | free(nav.pclk); 29 | nav.pclk = NULL; 30 | nav.nc = nav.ncmax = 0; 31 | } 32 | } 33 | 34 | /* call RTKLIB function */ 35 | if (readrnxc(file, &nav) <= 0) { 36 | sprintf(errmsg, "Invalid RINEX clock file: %s", file); 37 | mexErrMsgTxt(errmsg); 38 | } 39 | 40 | /* output */ 41 | argout[0] = nav2mxnav(&nav); 42 | 43 | if (nav.n > 0) free(nav.eph); 44 | if (nav.ng > 0) free(nav.geph); 45 | if (nav.ne > 0) free(nav.peph); 46 | if (nav.nc > 0) free(nav.pclk); 47 | } 48 | -------------------------------------------------------------------------------- /src/mex/readrnxnav.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file readrnxnav.c 3 | * @brief Read RINEX navigation file 4 | * @author Taro Suzuki 5 | * @note Wrapper for "readrnxt" in rinex.c 6 | */ 7 | 8 | #include "mex_utility.h" 9 | 10 | #define NIN 1 11 | 12 | /* mex interface */ 13 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 14 | const mxArray *argin[]) { 15 | nav_t nav = {0}; 16 | char file[512], errmsg[512]; 17 | gtime_t t = {0}; 18 | 19 | /* check arguments */ 20 | mxCheckNumberOfArguments(nargin, NIN); 21 | mxCheckChar(argin[0]); 22 | 23 | /* input */ 24 | mxGetString(argin[0], file, sizeof(file)); /* rinex file name */ 25 | if (nargin == 2) { 26 | nav = mxnav2nav(argin[1]); 27 | } 28 | 29 | /* call RTKLIB function */ 30 | if (readrnxt(file, 1, t, t, 0, "", NULL, &nav, NULL) <= 0) { 31 | sprintf(errmsg, "Invalid RINEX navigation file: %s",file); 32 | mexErrMsgTxt(errmsg); 33 | } 34 | uniqnav(&nav); 35 | 36 | /* output */ 37 | argout[0] = nav2mxnav(&nav); 38 | 39 | if (nav.n > 0) free(nav.eph); 40 | if (nav.ng > 0) free(nav.geph); 41 | if (nav.ne > 0) free(nav.peph); 42 | if (nav.nc > 0) free(nav.pclk); 43 | if (nav.erp.n > 0) free(nav.erp.data); 44 | } 45 | -------------------------------------------------------------------------------- /src/mex/readsap.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file readsap.c 3 | * @brief Read satellite antenna parameters 4 | * @author Taro Suzuki 5 | * @note Wrapper for "readsap" in rinex.c 6 | */ 7 | 8 | #include "mex_utility.h" 9 | 10 | #define NIN 2 11 | 12 | /* mex interface */ 13 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 14 | const mxArray *argin[]) { 15 | nav_t nav = {0}; 16 | char file[512], errmsg[512]; 17 | gtime_t time; 18 | 19 | /* check arguments */ 20 | mxCheckNumberOfArguments(nargin, NIN); 21 | mxCheckChar(argin[0]); /* antex file name */ 22 | mxCheckSizeOfArgument(argin[1], 1, 6); /* epoch */ 23 | 24 | /* input */ 25 | mxGetString(argin[0], file, sizeof(file)); /* antex file name */ 26 | time = epoch2time((double *)mxGetPr(argin[1])); /* epoch */ 27 | 28 | if (nargin == 3) { 29 | nav = mxnav2nav(argin[2]); 30 | } 31 | 32 | /* call RTKLIB function */ 33 | if (!readsap(file, time, &nav)) { 34 | sprintf(errmsg, "readsap: invalid ANTEX file: %s", file); 35 | mexErrMsgTxt(errmsg); 36 | } 37 | 38 | /* output */ 39 | argout[0] = nav2mxnav(&nav); 40 | 41 | if (nav.n > 0) free(nav.eph); 42 | if (nav.ng > 0) free(nav.geph); 43 | if (nav.ne > 0) free(nav.peph); 44 | if (nav.nc > 0) free(nav.pclk); 45 | } 46 | -------------------------------------------------------------------------------- /src/mex/readsol.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file readsol.c 3 | * @brief Read RTKLIB solution file 4 | * @author Taro Suzuki 5 | * @note Wrapper for "readsolt" in solution.c 6 | */ 7 | 8 | #include "mex_utility.h" 9 | 10 | #define NIN 1 11 | 12 | /* mex interface */ 13 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 14 | const mxArray *argin[]) { 15 | solbuf_t solbuf = {0}; 16 | gtime_t t = {0}; 17 | char errmsg[512]; 18 | char **file = (char **)malloc(sizeof(char *)); 19 | file[0] = (char *)malloc(512 * sizeof(char)); 20 | 21 | /* check arguments */ 22 | mxCheckNumberOfArguments(nargin, NIN); 23 | mxCheckChar(argin[0]); /* solution file name */ 24 | 25 | /* input */ 26 | mxGetString(argin[0], file[0], 512); /* solution file name */ 27 | // mexPrintf("%s\n",file[0]); 28 | 29 | /* call RTKLIB function */ 30 | if (readsolt(file, 1, t, t, 0, 0, &solbuf) <= 0) { 31 | sprintf(errmsg, "Invalid RTKLIB solution file: %s", file[0]); 32 | mexErrMsgTxt(errmsg); 33 | } 34 | 35 | /* outputs */ 36 | argout[0] = sol2mxsol(solbuf.data, solbuf.n); 37 | argout[1] = mxCreateDoubleMatrix(1, 3, mxREAL); 38 | memcpy(mxGetPr(argout[1]), solbuf.rb, 3 * sizeof(double)); 39 | 40 | free(file); 41 | freesolbuf(&solbuf); 42 | } -------------------------------------------------------------------------------- /src/mex/readsolstat.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file readsolstat.c 3 | * @brief Read RTKLIB solution status file 4 | * @author Taro Suzuki 5 | * @note Wrapper for "readsolstatt" in solution.c 6 | */ 7 | 8 | #include "mex_utility.h" 9 | 10 | #define NIN 1 11 | 12 | /* mex interface */ 13 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 14 | const mxArray *argin[]) { 15 | solstatbuf_t solstatbuf = {0}; 16 | gtime_t t = {0}; 17 | char errmsg[512]; 18 | char **file = (char **)malloc(sizeof(char *)); 19 | file[0] = (char *)malloc(512 * sizeof(char)); 20 | 21 | /* check arguments */ 22 | mxCheckNumberOfArguments(nargin, NIN); 23 | mxCheckChar(argin[0]); /* solution file name */ 24 | 25 | /* input */ 26 | mxGetString(argin[0], file[0], 512); /* solution file name */ 27 | // mexPrintf("%s\n",file[0]); 28 | 29 | /* call RTKLIB function */ 30 | if (readsolstatt(file, 1, t, t, 0, &solstatbuf) <= 0) { 31 | sprintf(errmsg, "Invalid RTKLIB solution status file: %s", file[0]); 32 | mexErrMsgTxt(errmsg); 33 | } 34 | 35 | /* outputs */ 36 | argout[0] = solstat2mxsolstat(solstatbuf.data, solstatbuf.n); 37 | 38 | freesolstatbuf(&solstatbuf); 39 | free(file); 40 | } -------------------------------------------------------------------------------- /src/mex/readsp3.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file readsp3.c 3 | * @brief Read SP3 file 4 | * @author Taro Suzuki 5 | * @note Wrapper for "readsp3" in preceph.c 6 | */ 7 | 8 | #include "mex_utility.h" 9 | 10 | #define NIN 1 11 | 12 | /* mex interface */ 13 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 14 | const mxArray *argin[]) { 15 | nav_t nav = {{0}}; 16 | char file[512]; 17 | gtime_t t = {0}; 18 | 19 | /* check arguments */ 20 | mxCheckNumberOfArguments(nargin, NIN); 21 | mxCheckChar(argin[0]); /* SP3 file name */ 22 | 23 | /* input */ 24 | mxGetString(argin[0], file, sizeof(file)); /* SP3 file name */ 25 | if (nargin == 2) { 26 | nav = mxnav2nav(argin[1]); 27 | 28 | if (nav.ne > 0) { 29 | free(nav.peph); 30 | nav.peph = NULL; 31 | nav.ne = nav.nemax = 0; 32 | } 33 | } 34 | 35 | /* call RTKLIB function */ 36 | readsp3(file, &nav, 0); 37 | 38 | /* output */ 39 | argout[0] = nav2mxnav(&nav); 40 | 41 | if (nav.n > 0) free(nav.eph); 42 | if (nav.ng > 0) free(nav.geph); 43 | if (nav.ne > 0) free(nav.peph); 44 | if (nav.nc > 0) free(nav.pclk); 45 | } 46 | -------------------------------------------------------------------------------- /src/mex/reppath.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file reppath.c 3 | * @brief Replace keywords in file path 4 | * @author Taro Suzuki 5 | * @note Wrapper for "reppath" in rtkcmn.c 6 | * @note Input interface changed from original 7 | */ 8 | 9 | #include "mex_utility.h" 10 | 11 | #define NIN 1 12 | 13 | /* mex interface */ 14 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 15 | const mxArray *argin[]) { 16 | char path[512], rpath[512]; 17 | double *epoch; 18 | gtime_t time; 19 | 20 | /* check arguments */ 21 | mxCheckNumberOfArguments(nargin, NIN); 22 | mxCheckChar(argin[0]); 23 | if (nargin==2) mxCheckSizeOfArgument(argin[1], 1, 6); /* epoch */ 24 | 25 | /* input */ 26 | mxGetString(argin[0], path, sizeof(path)); /* path */ 27 | if (nargin==2){ 28 | epoch = (double *)mxGetPr(argin[1]); 29 | time = epoch2time(epoch); 30 | } else { 31 | time = utc2gpst(timeget()); 32 | } 33 | /* call RTKLIB function */ 34 | reppath(path, rpath, time, "", ""); 35 | 36 | /* outputs */ 37 | argout[0] = mxCreateString(rpath); 38 | } 39 | -------------------------------------------------------------------------------- /src/mex/rtkinit.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file rtkinit.c 3 | * @brief Initialize RTK control struct 4 | * @author Taro Suzuki 5 | * @note Wrapper for "rtkinit" in rtkpos.c 6 | */ 7 | 8 | #include "mex_utility.h" 9 | 10 | #define NIN 1 11 | 12 | /* mex interface */ 13 | 14 | /* mex_readrinexnav ----------------------------------------------------------*/ 15 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 16 | const mxArray *argin[]) { 17 | rtk_t rtk; 18 | prcopt_t popt = prcopt_default; 19 | solopt_t sopt = solopt_default; 20 | int i; 21 | 22 | /* check arguments */ 23 | mxCheckNumberOfArguments(nargin, NIN); 24 | 25 | /* input option struct */ 26 | mxopt2opt(argin[0], &popt, &sopt); 27 | 28 | /* call RTKLIB function */ 29 | rtkinit(&rtk, &popt); 30 | 31 | /* set base station position */ 32 | for (i = 0; i < 3; i++) rtk.rb[i] = popt.rb[i]; 33 | 34 | /* output */ 35 | argout[0] = rtk2mxrtk(&rtk, 1); 36 | 37 | rtkfree(&rtk); 38 | } -------------------------------------------------------------------------------- /src/mex/sat2freq.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sat2freq.c 3 | * @brief Convert satellite and obs code to frequency 4 | * @author Taro Suzuki 5 | * @note Wrapper for "sat2freq" in rtkcmn.c 6 | * @note Support vector inputs 7 | */ 8 | 9 | #include "mex_utility.h" 10 | 11 | #define NIN 3 12 | 13 | /* mex interface */ 14 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 15 | const mxArray *argin[]) { 16 | nav_t nav = {0}; 17 | int i, m, n; 18 | double *sat, *frq, *code; 19 | 20 | /* check arguments */ 21 | mxCheckNumberOfArguments(nargin, NIN); 22 | mxCheckSameSize(argin[0], argin[1]); /* sat,code */ 23 | 24 | /* inputs */ 25 | sat = (double *)mxGetPr(argin[0]); 26 | m = (int)mxGetM(argin[0]); 27 | n = (int)mxGetN(argin[0]); 28 | code = (double *)mxGetPr(argin[1]); 29 | nav = mxnav2nav(argin[2]); 30 | 31 | /* output */ 32 | argout[0] = mxCreateDoubleMatrix(m, n, mxREAL); 33 | frq = mxGetPr(argout[0]); 34 | 35 | /* call RTKLIB function */ 36 | for (i = 0; i < m * n; i++) { 37 | frq[i] = sat2freq((int)sat[i], (uint8_t)code[i], &nav); 38 | } 39 | 40 | if (nav.n > 0) free(nav.eph); 41 | if (nav.ng > 0) free(nav.geph); 42 | if (nav.ne > 0) free(nav.peph); 43 | if (nav.nc > 0) free(nav.pclk); 44 | } 45 | -------------------------------------------------------------------------------- /src/mex/satid2no.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file satid2no.c 3 | * @brief Convert satellite id to satellite number 4 | * @author Taro Suzuki 5 | * @note Wrapper for "satid2no" in rtkcmn.c 6 | * @note Support vector inputs 7 | */ 8 | 9 | #include "mex_utility.h" 10 | 11 | #define NIN 1 12 | 13 | /* mex interface */ 14 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 15 | const mxArray *argin[]) { 16 | int i, m, n; 17 | double *no; 18 | char *id; 19 | 20 | /* check arguments */ 21 | mxCheckNumberOfArguments(nargin, NIN); 22 | mxCheckCell(argin[0]); /* id */ 23 | 24 | /* input */ 25 | m = (int)mxGetM(argin[0]); 26 | n = (int)mxGetN(argin[0]); 27 | 28 | /* output */ 29 | argout[0] = mxCreateDoubleMatrix(m, n, mxREAL); 30 | no = mxGetPr(argout[0]); 31 | 32 | /* call RTKLIB function */ 33 | for (i = 0; i < m * n; i++) { 34 | id = mxArrayToString(mxGetCell(argin[0], i)); 35 | no[i] = (double)satid2no(id); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/mex/satno.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file satno.c 3 | * @brief Convert satellite system+prn/slot number to satellite number 4 | * @author Taro Suzuki 5 | * @note Wrapper for "satno" in rtkcmn.c 6 | * @note Support vector inputs 7 | */ 8 | 9 | #include "mex_utility.h" 10 | 11 | #define NIN 2 12 | 13 | /* mex interface */ 14 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 15 | const mxArray *argin[]) { 16 | int i, ino, m, n; 17 | double *sys, *prn, *no; 18 | 19 | /* check arguments */ 20 | mxCheckNumberOfArguments(nargin, NIN); 21 | mxCheckSameSize(argin[0], argin[1]); /* sys,prn */ 22 | 23 | /* inputs */ 24 | sys = (double *)mxGetPr(argin[0]); 25 | prn = (double *)mxGetPr(argin[1]); 26 | m = (int)mxGetM(argin[0]); 27 | n = (int)mxGetN(argin[0]); 28 | 29 | /* output */ 30 | argout[0] = mxCreateDoubleMatrix(m, n, mxREAL); 31 | no = mxGetPr(argout[0]); 32 | 33 | /* call RTKLIB function */ 34 | for (i = 0; i < m * n; i++) { 35 | ino = satno((int)sys[i], (int)prn[i]); 36 | no[i] = (double)ino; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/mex/satno2id.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file satno2id.c 3 | * @brief Convert satellite number to satellite id 4 | * @author Taro Suzuki 5 | * @note Wrapper for "satno2id" in rtkcmn.c 6 | * @note Support vector inputs 7 | */ 8 | 9 | #include "mex_utility.h" 10 | 11 | #define NIN 1 12 | 13 | /* mex interface */ 14 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 15 | const mxArray *argin[]) { 16 | int i, m, n; 17 | double *sat; 18 | char cid[4]; 19 | 20 | /* check arguments */ 21 | mxCheckNumberOfArguments(nargin, NIN); 22 | 23 | /* input */ 24 | sat = (double *)mxGetPr(argin[0]); 25 | m = (int)mxGetM(argin[0]); 26 | n = (int)mxGetN(argin[0]); 27 | 28 | /* output */ 29 | argout[0] = mxCreateCellMatrix(m, n); 30 | 31 | /* call RTKLIB function */ 32 | for (i = 0; i < m * n; i++) { 33 | satno2id((int)sat[i], cid); 34 | if (strcmp(cid, "") == 0) strcpy(cid, "N/A"); 35 | mxSetCell(argout[0], i, mxCreateString(cid)); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/mex/satsys.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file satid2no.c 3 | * @brief Convert satellite number to satellite system 4 | * @author Taro Suzuki 5 | * @note Wrapper for "satsys" in rtkcmn.c 6 | * @note Support vector inputs 7 | */ 8 | 9 | #include "mex_utility.h" 10 | 11 | #define NIN 1 12 | 13 | /* mex interface */ 14 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 15 | const mxArray *argin[]) { 16 | int i, isys, iprn, m, n; 17 | double *sat, *sys, *prn; 18 | 19 | /* check arguments */ 20 | mxCheckNumberOfArguments(nargin, NIN); 21 | 22 | /* input */ 23 | sat = (double *)mxGetPr(argin[0]); 24 | m = (int)mxGetM(argin[0]); 25 | n = (int)mxGetN(argin[0]); 26 | 27 | /* outputs */ 28 | argout[0] = mxCreateDoubleMatrix(m, n, mxREAL); 29 | sys = mxGetPr(argout[0]); 30 | argout[1] = mxCreateDoubleMatrix(m, n, mxREAL); 31 | prn = mxGetPr(argout[1]); 32 | 33 | /* call RTKLIB function */ 34 | for (i = 0; i < m * n; i++) { 35 | isys = satsys((int)sat[i], &iprn); 36 | sys[i] = (double)isys; 37 | prn[i] = (double)iprn; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/mex/saveopts.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file saveopts.c 3 | * @brief Save options to file 4 | * @author Taro Suzuki 5 | * @note Wrapper for "saveopts" in option.c 6 | */ 7 | 8 | #include "mex_utility.h" 9 | 10 | #define NIN 2 11 | 12 | /* mex interface */ 13 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 14 | const mxArray *argin[]) { 15 | prcopt_t popt = prcopt_default; 16 | solopt_t sopt = solopt_default; 17 | char file[512], errmsg[512], comment[512] = ""; 18 | 19 | /* check arguments */ 20 | mxCheckNumberOfArguments(nargin, NIN); 21 | mxCheckChar(argin[0]); /* option file */ 22 | if (nargin == 3) { 23 | mxCheckChar(argin[2]); /* comment */ 24 | } 25 | 26 | /* input */ 27 | mxGetString(argin[0], file, sizeof(file)); 28 | mxopt2opt(argin[1], &popt, &sopt); 29 | if (nargin == 3) { 30 | mxGetString(argin[2], comment, sizeof(comment)); 31 | } 32 | 33 | /* call RTKLIB function */ 34 | setsysopts(&popt, &sopt, NULL); 35 | 36 | /* Save option to file */ 37 | if (!saveopts(file, "w", comment, sysopts)) { 38 | sprintf(errmsg, "Invalid option file: %s", file); 39 | mexErrMsgTxt(errmsg); 40 | } 41 | } -------------------------------------------------------------------------------- /src/mex/tow2doy.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file gpst2doy.c 3 | * @brief Convert GPS time (tow, week) to day of year 4 | * @author Taro Suzuki 5 | * @note Wrapper for "time2doy" in rtkcmn.c 6 | * @note Support vector inputs 7 | */ 8 | #include "mex_utility.h" 9 | 10 | #define NIN 2 11 | 12 | /* mex interface */ 13 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 14 | const mxArray *argin[]) { 15 | bool utcflag = false; 16 | int i, nepoch; 17 | double *doy, *tow, *week; 18 | gtime_t time; 19 | 20 | /* check arguments */ 21 | mxCheckNumberOfArguments(nargin, NIN); 22 | mxCheckSameSize(argin[0], argin[1]); /* tow,week */ 23 | mxCheckSizeOfColumns(argin[0], 1); /* tow */ 24 | mxCheckSizeOfColumns(argin[1], 1); /* week */ 25 | if (nargin == 3) mxCheckScalar(argin[2]); /* utc flag */ 26 | 27 | /* inputs */ 28 | tow = (double *)mxGetPr(argin[0]); 29 | week = (double *)mxGetPr(argin[1]); 30 | nepoch = mxGetSize(argin[0]); 31 | if (nargin == 3) utcflag = (bool)mxGetScalar(argin[2]); 32 | 33 | /* output */ 34 | argout[0] = mxCreateDoubleMatrix(nepoch, 6, mxREAL); 35 | doy = mxGetPr(argout[0]); 36 | 37 | /* call RTKLIB function */ 38 | for (i = 0; i < nepoch; i++) { 39 | time = gpst2time((int)week[i], tow[i]); 40 | 41 | if (utcflag) time = utc2gpst(time); 42 | doy[i] = time2doy(time); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/mex/utc2gmst.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file utc2gmst.c 3 | * @brief Convert utc to gmst (Greenwich mean sidereal time) 4 | * @author Taro Suzuki 5 | * @note Wrapper for "utc2gmst" in rtkcmn.c 6 | * @note Support vector inputs 7 | */ 8 | 9 | #include "mex_utility.h" 10 | 11 | #define NIN 2 12 | 13 | /* mex interface */ 14 | extern void mexFunction(int nargout, mxArray *argout[], int nargin, 15 | const mxArray *argin[]) { 16 | int i, nepoch; 17 | double ep[6], *epoch, ut1_utc, *gmst; 18 | gtime_t time; 19 | 20 | /* check arguments */ 21 | mxCheckNumberOfArguments(nargin, NIN); 22 | mxCheckSizeOfColumns(argin[0], 6); /* epochs */ 23 | mxCheckScalar(argin[1]); /* ut1_utc */ 24 | 25 | /* inputs */ 26 | epoch = (double *)mxGetPr(argin[0]); 27 | nepoch = (int)mxGetM(argin[0]); 28 | ut1_utc = (double)mxGetScalar(argin[1]); 29 | 30 | /* outputs */ 31 | argout[0] = mxCreateDoubleMatrix(nepoch, 1, mxREAL); 32 | gmst = mxGetPr(argout[0]); 33 | 34 | /* call RTKLIB function */ 35 | for (i = 0; i < nepoch; i++) { 36 | ep[0] = epoch[i + nepoch * 0]; 37 | ep[1] = epoch[i + nepoch * 1]; 38 | ep[2] = epoch[i + nepoch * 2]; 39 | ep[3] = epoch[i + nepoch * 3]; 40 | ep[4] = epoch[i + nepoch * 4]; 41 | ep[5] = epoch[i + nepoch * 5]; 42 | time = epoch2time(ep); 43 | gmst[i] = utc2gmst(time, ut1_utc); 44 | } 45 | } 46 | --------------------------------------------------------------------------------