Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import java.net.InetAddress; | |
import java.util.LinkedHashMap; | |
import java.util.Map; | |
import java.util.concurrent.*; | |
/** | |
* This class is used to check if a remote peer is reachable | |
*/ | |
public class ReachableCache { |
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
#!/bin/bash | |
sudo apt-get update && apt-get install curl git mingw-w64 cmake make nsis | |
mkdir -p dune/build | |
git clone --depth=1 https://github.com/LSTS/dune.git dune/source | |
cd dune/build | |
curl https://gist.githubusercontent.com/zepinto/dbbe84fa4ca6e7f59954adabc5bc3dcc/raw/1eeb0cd156ed63498bda525d8de5bb0ff764654b/mingw-w64-x86_64.cmake > mingw-w64-toolchain.cmake | |
cmake -DCMAKE_TOOLCHAIN_FILE=mingw-w64-toolchain.cmake ../source && make package -j8 |
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
# Sample toolchain file for creating Windows installer. | |
# | |
# Typical usage: | |
# 1) install cross compiler and packager: `sudo apt-get install mingw-w64 nsis` | |
# 2) cd <path/to/build/folder> | |
# 3) cmake -DCMAKE_TOOLCHAIN_FILE=~/mingw-w64-x86_64.cmake <path/to/source/folder> | |
# 4) make -j<cores> | |
# 5) make package | |
set(CMAKE_SYSTEM_NAME Windows) |
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
#!/bin/bash | |
WORKSPACE_DIR=~/workspace | |
DUNE_DIR=$WORKSPACE_DIR/dune/build | |
IMC4J_DIR=$WORKSPACE_DIR/imc4j | |
NEPTUS_DIR=$WORKSPACE_DIR/neptus | |
# Stop DUNE if already running | |
while pgrep -x "dune" > /dev/null; do | |
killall dune |
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
package pt.lsts.imc.lsf.batch; | |
import pt.lsts.imc.IMCDefinition; | |
import pt.lsts.imc.PlanControlState; | |
import pt.lsts.imc.PlanControlState.STATE; | |
import pt.lsts.imc.lsf.UnserializedMessage; | |
public class ManeuverTimes { | |
public static void main(String[] args) throws Exception { |
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
#!/bin/bash | |
if [ $# -le 0 ] | |
then | |
echo "Usage: ./script.bash <video_file>" | |
exit 1 | |
fi | |
echo "Extracting matadata" | |
ffmpeg32 -i "$1" -f ffmetadata metadata.txt |
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 class uses KML loading code available from | |
* http://labs.micromata.de/projects/jak/download.html | |
*/ | |
package pt.lsts.neptus.plugins.kml; | |
import java.io.File; | |
import java.util.List; | |
import pt.lsts.neptus.mp.ManeuverLocation; |
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
import pt.lsts.imc.* | |
import pt.lsts.imc.lsf.* | |
import pt.lsts.util.WGS84Utilities | |
// Obtain an LSF index object | |
idx = new LsfIndex(new File("/path/to/Data.lsf")) | |
// Create a scanner | |
scanner = new IndexScanner(idx); |
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
import pt.lsts.imc.EstimatedState | |
import pt.lsts.imc.lsf.LsfIndex | |
import pt.lsts.util.WGS84Utilities; | |
// Create an LSF index object | |
idx = new LsfIndex(new File("/path/to/Data.lsf")) | |
// Get all recorded states with minimum separation of 1000 milliseconds | |
idx.getIterator(EstimatedState.class, (long)1000).each { | |
// Print to the screen the location parsed from the state |
NewerOlder