Hi everyone,
I am trying to use the Python bindings of the GPS Toolkit, in particular the PRSolution class. I followed the swig/examples/example4.py in order to read my RINEX files and to compute the position solutions, and everything was fine.
Now, I would like to use the PRSolution.PreparePRSolution method so as to obtain the corrected pseudoranges without computing the position solution. However, I can not call this method because the argument types do not match.
In particular, the call is
raimSolver.PreparePRSolution(time, satVector, syss, rangeVector, ephStore, SVP)
and the error that raises is
TypeError: in method 'PRSolution_PreparePRSolution', argument 4 of type 'std::vector< gpstk::SatID::SatelliteSystem,std::allocator< gpstk::SatID::SatelliteSystem > > &'
I know from the PYTHON.md file that the enumerations have been removed in the Python bindings, so I do not know how I could define the syss variable. After several trials, I tried
syss = [gpstk.SatID.systemGPS, gpstk.SatID.systemGlonass]
without success.
Then, I tried to use the PRSolution2 class; it has a similar method called PrepareAutonomousSolution that does not need the previous argument. I made the call
gpstk.PRSolution2_PrepareAutonomousSolution(time, satVector, rangeVector, ephStore, SVP)
and unfortunately another error raised
TypeError: Wrong number or type of arguments for overloaded function 'PRSolution2_PrepareAutonomousSolution'.
Possible C/C++ prototypes are:
gpstk::PRSolution2::PrepareAutonomousSolution(gpstk::CommonTime const &,std::vector< gpstk::SatID,std::allocator< gpstk::SatID > > &,std::vector< double,std::allocator< double > > const &,gpstk::XvtStore< gpstk::SatID > const &,Matrix< double > &,std::ostream *)
gpstk::PRSolution2::PrepareAutonomousSolution(gpstk::CommonTime const &,std::vector< gpstk::SatID,std::allocator< gpstk::SatID > > &,std::vector< double,std::allocator< double > > const &,gpstk::XvtStore< gpstk::SatID > const &,Matrix< double > &)
I definitely think that the problem concerns the variable SVP, since the other ones have been previously used for the computation of the position solution.
Always from the PYTHON.md file, I know that the Matrix class is not wrapped so I do not know how to pass this argument. I tried with a list, a numpy array and even with the gpstk.seqToVector without success.
Furthermore, I do not know how the GPS Toolkit could return the filled SVP matrix since it is passed as argument. I saw that functions modifying parameters passed by reference are opportunely modified but this method still requires the matrix as an argument.
Looking at the source code of PRSolution, I came across the RAIMComputeSimple method, that is used in order to avoid using "data types not exposed in swig". Therefore, I wonder if there actually exist a way to make things work.
What am I doing wrong? Is there a way to call those functions in Python?
These are the only pieces of code where I found something that corrects the measured pseudoranges. If there are other way to do this, please let me know.
Thank you for your time, and for this great library.
Hi everyone,
I am trying to use the Python bindings of the GPS Toolkit, in particular the
PRSolutionclass. I followed theswig/examples/example4.pyin order to read my RINEX files and to compute the position solutions, and everything was fine.Now, I would like to use the
PRSolution.PreparePRSolutionmethod so as to obtain the corrected pseudoranges without computing the position solution. However, I can not call this method because the argument types do not match.In particular, the call is
and the error that raises is
I know from the
PYTHON.mdfile that the enumerations have been removed in the Python bindings, so I do not know how I could define thesyssvariable. After several trials, I triedwithout success.
Then, I tried to use the
PRSolution2class; it has a similar method calledPrepareAutonomousSolutionthat does not need the previous argument. I made the calland unfortunately another error raised
I definitely think that the problem concerns the variable
SVP, since the other ones have been previously used for the computation of the position solution.Always from the
PYTHON.mdfile, I know that theMatrixclass is not wrapped so I do not know how to pass this argument. I tried with a list, a numpy array and even with thegpstk.seqToVectorwithout success.Furthermore, I do not know how the GPS Toolkit could return the filled
SVPmatrix since it is passed as argument. I saw that functions modifying parameters passed by reference are opportunely modified but this method still requires the matrix as an argument.Looking at the source code of PRSolution, I came across the
RAIMComputeSimplemethod, that is used in order to avoid using "data types not exposed in swig". Therefore, I wonder if there actually exist a way to make things work.What am I doing wrong? Is there a way to call those functions in Python?
These are the only pieces of code where I found something that corrects the measured pseudoranges. If there are other way to do this, please let me know.
Thank you for your time, and for this great library.