forked from aerospaceresearch/lonepseudoranger
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,43 @@ | ||
#include <iostream> | ||
#include <unistd.h> | ||
#include <string> | ||
|
||
#include "Reader.h" | ||
|
||
void processSignalData(); | ||
void processSignalData( std::string, std::string, std::string ); | ||
|
||
int main( int argc, char* argv[] ) | ||
{ | ||
Stations mStations; | ||
Reader reader; | ||
bool test = false; | ||
int c = getopt( argc, argv, "d:" ); | ||
switch( c ){ | ||
case 'd': | ||
reader.loadFromDirectory( optarg ); | ||
processSignalData(); | ||
break; | ||
default: | ||
std::cout << "Missing path to the directory! Use parameter -d." << std::endl; | ||
return -1; | ||
std::string statInput = "";//beacon222.sat"; | ||
std::string statOutput = "output";//stats222.txt"; | ||
std::string dir; | ||
int c; | ||
bool isDirectoryKnown = false; | ||
while( ( c = getopt( argc, argv, "d:i:o:" ) ) != -1 ) | ||
{ | ||
switch( c ){ | ||
case 'i': | ||
statInput = std::string( optarg ); | ||
std::cout << "Selected input: " << statInput << std::endl; | ||
break; | ||
case 'o': | ||
statOutput = std::string( optarg ); | ||
std::cout << "Selected output: " << statOutput << std::endl; | ||
break; | ||
case 'd': | ||
isDirectoryKnown = true; | ||
reader.loadFromDirectory( optarg ); | ||
dir = std::string( optarg ); | ||
processSignalData( statInput, statOutput, dir ); //.substr(dir.length()-16, 14 ) ); | ||
break; | ||
default: | ||
std::cout << "Missing path to the directory! Use parameter -d." << std::endl; | ||
return -1; | ||
} | ||
} | ||
if( !isDirectoryKnown ) | ||
std::cout << "Directory with .gsd files unknown!" << std::endl; | ||
return 0; | ||
} |