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;
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 {
/** Satellite PRN identifier.
......@@ -27,13 +37,14 @@ public class DCBSatellite {
*/
private String satPRN;
/** */
/** DCB description container. */
private DCBDescription dcbDescription;
/** */
/** DCB solution data. */
private DCB dcbSat;
/**
* Constructor for the DCBSatellite class.
* @param satPRN
*/
public DCBSatellite(final String satPRN) {
......
......@@ -22,6 +22,16 @@ import java.util.Set;
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 {
/** Station ID. */
......
......@@ -50,6 +50,7 @@ import org.orekit.utils.units.Unit;
* Loader for Solution INdependent EXchange (SINEX) files.
* <p>
* 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.
* </p>
* @author Bryan Cazabonne
......@@ -170,6 +171,8 @@ public class SinexLoader {
* Get the creation date of the parsed SINEX file.
*
* @return SINEX file creation date as an AbsoluteDate
*
* @since 11.2
*/
public AbsoluteDate getCreationDate() {
return creationDate;
......@@ -212,6 +215,8 @@ public class SinexLoader {
*
* @param id
* @return DCBSatellite object corresponding to the satPRN value.
*
* @since 11.2
*/
public DCBStation getDCBStation(final String id) {
return dcbStationMap.get(id);
......@@ -222,6 +227,8 @@ public class SinexLoader {
*
* @param id
* @return DCBSatellite object corresponding to the satPRN value.
*
* @since 11.2
*/
public DCBSatellite getDCBSatellite(final String id) {
return dcbSatelliteMap.get(id);
......@@ -234,6 +241,8 @@ public class SinexLoader {
*
* @param dcb
* @param id
*
* @since 11.2
*/
private void addDCBStation(final DCBStation dcb, final String id) {
if (dcbStationMap.get(id) == null) {
......@@ -247,6 +256,8 @@ public class SinexLoader {
*
* @param dcb
* @param id
*
* @since 11.2
*/
private void addDCBSatellite(final DCBSatellite dcb, final String id) {
if (dcbSatelliteMap.get(id) == null) {
......
......@@ -20,6 +20,7 @@ package org.orekit.files.sinex;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.junit.Assert;
import org.junit.Before;
......@@ -212,9 +213,17 @@ public class SinexLoaderDCBTest {
String stationSystemRef = "G";
DCBStation DCBTest = loader.getDCBStation(stationIdRef);
// Test getStationId : Station Case
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