Skip to content

Instantly share code, notes, and snippets.

@zepinto
Created January 17, 2015 16:58
Show Gist options
  • Save zepinto/f82a8243e9f1b9169f23 to your computer and use it in GitHub Desktop.
Save zepinto/f82a8243e9f1b9169f23 to your computer and use it in GitHub Desktop.
Parsing LSF files in Groovy
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
println WGS84Utilities.toLatLonDepth(it)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment