Hello,
I am trying to create an instance of the public nested class GPSPropagator$Builder
but I have no experience using Java from MATLAB.
Although the outer class GPSPropagator
and its functions are recognized by MATLAB, the inner class Builder
is not. I have the following code that works:
rnxPath = './data/training/brdc/2020-08-06-US-MTV-2/BRDC00WRD_R_20202190000_01D_GN.rnx';
rnxFIS = java.io.FileInputStream(rnxPath);
nfParser = NavigationFileParser();
gpsNav = nfParser.parse(rnxFIS);
g17NavigationMessage = gpsNav.getGPSNavigationMessages('G17');
I have tried different options which I list below as well as the errors I get.
-
Calling the constructor
Builder
withjavaMethod
(Call Java method - MATLAB javaMethod - MathWorks France):>> javaMethod('Builder', 'org.orekit.propagation.analytical.gnss.GPSPropagator$Builder', g17NavigationMessage) Error using javaMethod No method Builder exists in Java class org.orekit.propagation.analytical.gnss.GPSPropagator$Builder
-
Calling the method
build
withjavaMethod
:>> javaMethod('build', 'org.orekit.propagation.analytical.gnss.GPSPropagator$Builder') Error using javaMethod No static build method with appropriate signature exists in Java class org.orekit.propagation.analytical.gnss.GPSPropagator$Builder
-
Calling the function
build
withjavaObject
:>> javaObject('org.orekit.propagation.analytical.gnss.GPSPropagator$Builder', g17NavigationMessage) Error using javaObject No constructor with appropriate signature exists in Java class org.orekit.propagation.analytical.gnss.GPSPropagator$Builder
-
Calling the
Builder
constructor and thebuild
method at the same time>> GPSPropagator.Builder(g17NavigationMessage).build() Unrecognized function or variable 'Builder'.
-
I also tried both the solutions proposed in How do I create an instance of a Java public static nested class from inside MATLAB 7.13 (R2011b)? - MATLAB Answers - MATLAB Central, but the structure of the outer and inner functions differ between the example and
GPSPropagator
.