-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added scapix class, update build.gradle version
- Loading branch information
Showing
26 changed files
with
10,209 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[submodule "app/src/main/cpp/lib/spline"] | ||
path = app/src/main/cpp/lib/spline | ||
url = https://github.com/ttk592/spline | ||
[submodule "app/src/main/cpp/lib/eigen"] | ||
path = app/src/main/cpp/lib/eigen | ||
url = https://gitlab.com/libeigen/eigen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
app/src/androidTest/java/com/googleresearch/capturesync/ReceiveDelayTests.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.googleresearch.capturesync; | ||
|
||
import android.content.Context; | ||
import android.util.Pair; | ||
|
||
import androidx.test.core.app.ApplicationProvider; | ||
import androidx.test.platform.app.InstrumentationRegistry; | ||
|
||
import com.googleresearch.capturesync.softwaresync.TimeSync; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
public class ReceiveDelayTests { | ||
Context unitTestContext; | ||
|
||
@Before | ||
public void initContext() { | ||
unitTestContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); | ||
unitTestContext = ApplicationProvider.getApplicationContext(); | ||
} | ||
|
||
@Test | ||
public void receiveValueFirstTest_isCorrect() { | ||
String firstNameFile = "ForUnitTestFile4.csv"; | ||
Pair<double[][], double[]> firstPair = ReadFromFile.ReadFromCSV(firstNameFile, unitTestContext); | ||
String secondNameFile = "ForUnitTestFile5.csv"; | ||
Pair<double[][], double[]> secondPair = ReadFromFile.ReadFromCSV(secondNameFile, unitTestContext); | ||
|
||
TimeSync currentObject = new TimeSync(firstPair.first, secondPair.first, firstPair.second, secondPair.second, false); | ||
currentObject.resample(1.0); | ||
currentObject.obtainDelay(); | ||
double timeDelay = currentObject.getTimeDelay(); | ||
|
||
Assert.assertEquals(0.005384159941042243, timeDelay, 0.000001); | ||
} | ||
|
||
@Test | ||
public void receiveValueSecondTest_isCorrect() { | ||
String firstNameFile = "ForUnitTestFile6.csv"; | ||
Pair<double[][], double[]> firstPair = ReadFromFile.ReadFromCSV(firstNameFile, unitTestContext); | ||
String secondNameFile = "ForUnitTestFile7.csv"; | ||
Pair<double[][], double[]> secondPair = ReadFromFile.ReadFromCSV(secondNameFile, unitTestContext); | ||
|
||
TimeSync currentObject = new TimeSync(firstPair.first, secondPair.first, firstPair.second, secondPair.second, false); | ||
currentObject.resample(1.0); | ||
currentObject.obtainDelay(); | ||
double timeDelay = currentObject.getTimeDelay(); | ||
|
||
Assert.assertEquals(0.0493466958931981, timeDelay, 0.000001); | ||
} | ||
} |
Oops, something went wrong.