Commit 22bfe019 authored by Louis Aucouturier's avatar Louis Aucouturier
Browse files

Documentation and coverage improvement

- Test for getAvailableSystems in DCBStation was defined.
- Documentation was completed for DCBSatellite, DCBStation, and
SinexLoader.
parent 8f7be07b
Pipeline #1837 passed with stages
in 27 minutes and 55 seconds
...@@ -19,6 +19,16 @@ package org.orekit.files.sinex; ...@@ -19,6 +19,16 @@ package org.orekit.files.sinex;
import org.orekit.gnss.SatelliteSystem; import org.orekit.gnss.SatelliteSystem;
/**
* Class based on DCB, used to store the data parsed in SinexLoader,
* for Differential Code Biases computed for satellites.
* Satellites and stations have differentiated classes as stations
* might have multiple satellite systems.
* The data is stored in a single DCB object.
*
* @author Louis Aucouturier
* @since 11.2
*/
public class DCBSatellite { public class DCBSatellite {
/** Satellite PRN identifier. /** Satellite PRN identifier.
...@@ -27,13 +37,14 @@ public class DCBSatellite { ...@@ -27,13 +37,14 @@ public class DCBSatellite {
*/ */
private String satPRN; private String satPRN;
/** */ /** DCB description container. */
private DCBDescription dcbDescription; private DCBDescription dcbDescription;
/** */ /** DCB solution data. */
private DCB dcbSat; private DCB dcbSat;
/** /**
* Constructor for the DCBSatellite class.
* @param satPRN * @param satPRN
*/ */
public DCBSatellite(final String satPRN) { public DCBSatellite(final String satPRN) {
......
...@@ -22,6 +22,16 @@ import java.util.Set; ...@@ -22,6 +22,16 @@ import java.util.Set;
import org.orekit.gnss.SatelliteSystem; import org.orekit.gnss.SatelliteSystem;
/**
* Class based on DCB, used to store the data parsed in SinexLoader,
* for Differential Code Biases computed for stations.
* Satellites and stations have differentiated classes as stations
* might have multiple satellite systems.
* The data is stored in a Map of DCB, identified by the SatelliteSystem.
*
* @author Louis Aucouturier
* @since 11.2
*/
public class DCBStation { public class DCBStation {
/** Station ID. */ /** Station ID. */
......
...@@ -50,6 +50,7 @@ import org.orekit.utils.units.Unit; ...@@ -50,6 +50,7 @@ import org.orekit.utils.units.Unit;
* Loader for Solution INdependent EXchange (SINEX) files. * Loader for Solution INdependent EXchange (SINEX) files.
* <p> * <p>
* For now only few keys are supported: SITE/ID, SITE/ECCENTRICITY, SOLUTION/EPOCHS and SOLUTION/ESTIMATE. * For now only few keys are supported: SITE/ID, SITE/ECCENTRICITY, SOLUTION/EPOCHS and SOLUTION/ESTIMATE.
* DCB/DESCRIPTION and DCB/SOLUTION can be parsed in the case of DCB Sinex files.
* They represent the minimum set of parameters that are interesting to consider in a SINEX file. * They represent the minimum set of parameters that are interesting to consider in a SINEX file.
* </p> * </p>
* @author Bryan Cazabonne * @author Bryan Cazabonne
...@@ -170,6 +171,8 @@ public class SinexLoader { ...@@ -170,6 +171,8 @@ public class SinexLoader {
* Get the creation date of the parsed SINEX file. * Get the creation date of the parsed SINEX file.
* *
* @return SINEX file creation date as an AbsoluteDate * @return SINEX file creation date as an AbsoluteDate
*
* @since 11.2
*/ */
public AbsoluteDate getCreationDate() { public AbsoluteDate getCreationDate() {
return creationDate; return creationDate;
...@@ -212,6 +215,8 @@ public class SinexLoader { ...@@ -212,6 +215,8 @@ public class SinexLoader {
* *
* @param id * @param id
* @return DCBSatellite object corresponding to the satPRN value. * @return DCBSatellite object corresponding to the satPRN value.
*
* @since 11.2
*/ */
public DCBStation getDCBStation(final String id) { public DCBStation getDCBStation(final String id) {
return dcbStationMap.get(id); return dcbStationMap.get(id);
...@@ -222,6 +227,8 @@ public class SinexLoader { ...@@ -222,6 +227,8 @@ public class SinexLoader {
* *
* @param id * @param id
* @return DCBSatellite object corresponding to the satPRN value. * @return DCBSatellite object corresponding to the satPRN value.
*
* @since 11.2
*/ */
public DCBSatellite getDCBSatellite(final String id) { public DCBSatellite getDCBSatellite(final String id) {
return dcbSatelliteMap.get(id); return dcbSatelliteMap.get(id);
...@@ -234,6 +241,8 @@ public class SinexLoader { ...@@ -234,6 +241,8 @@ public class SinexLoader {
* *
* @param dcb * @param dcb
* @param id * @param id
*
* @since 11.2
*/ */
private void addDCBStation(final DCBStation dcb, final String id) { private void addDCBStation(final DCBStation dcb, final String id) {
if (dcbStationMap.get(id) == null) { if (dcbStationMap.get(id) == null) {
...@@ -247,6 +256,8 @@ public class SinexLoader { ...@@ -247,6 +256,8 @@ public class SinexLoader {
* *
* @param dcb * @param dcb
* @param id * @param id
*
* @since 11.2
*/ */
private void addDCBSatellite(final DCBSatellite dcb, final String id) { private void addDCBSatellite(final DCBSatellite dcb, final String id) {
if (dcbSatelliteMap.get(id) == null) { if (dcbSatelliteMap.get(id) == null) {
......
...@@ -20,6 +20,7 @@ package org.orekit.files.sinex; ...@@ -20,6 +20,7 @@ package org.orekit.files.sinex;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
...@@ -211,10 +212,18 @@ public class SinexLoaderDCBTest { ...@@ -211,10 +212,18 @@ public class SinexLoaderDCBTest {
String stationIdRef = "AGGO"; String stationIdRef = "AGGO";
String stationSystemRef = "G"; String stationSystemRef = "G";
DCBStation DCBTest = loader.getDCBStation(stationIdRef); DCBStation DCBTest = loader.getDCBStation(stationIdRef);
// Test getStationId : Station Case // Test getStationId : Station Case
Assert.assertEquals(stationIdRef, DCBTest.getStationId()); Assert.assertEquals(stationIdRef, DCBTest.getStationId());
//Test getAvailableSystems
final SatelliteSystem sat1 = SatelliteSystem.parseSatelliteSystem("G");
final SatelliteSystem sat2 = SatelliteSystem.parseSatelliteSystem("E");
final Set<SatelliteSystem> setSystemRef = new HashSet<>();
setSystemRef.add(sat1);
setSystemRef.add(sat2);
final Set<SatelliteSystem> setSystem = DCBTest.getAvailableSatelliteSystems();
Assert.assertEquals(setSystemRef, setSystem);
} }
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment