Commit ec91b94d authored by Brandon Reid's avatar Brandon Reid

autosave

parent 0865371a
......@@ -826,6 +826,6 @@ bool restart(){
if (input == 'y'){
return false;
} else {
exit(0);
return true;
}
}
\ No newline at end of file
......@@ -12,7 +12,6 @@ int main () {
do{
//variables
string monthInput;
char endMenu;
int monthDay = 0;
int yearInput = 0;
int hourInput = 0;
......@@ -20,12 +19,13 @@ int main () {
double hoursSinceYear = 0;
pair <double,double> AltAndAziPair;
pair <double, double> longAndLatPair;
pair<double,double> returnValue;
vector <pair<double,double>> window;
vector <pair<double,double>> coordinates;
cout << "==============Welcome to the Star-Gazer v 1.0==============" << endl;
do {
yearInput = yearPrompt();
monthInput = monthPrompt();
......@@ -41,42 +41,17 @@ int main () {
printCities();
longAndLatPair = longAndLat();
//calculating the julian date
// cout << "if the date is January 27, 2017 at 5:45:54.6 pm, the julian date function should return 2457781.240208." << endl
// << "It actually returns: " << julian(2017, 641.9) << endl;
// cout << "if the date is January 1, 2000 at 00:00:00, the GMST date function should return: 6.79519916667." << endl
// << "It actually returns: " << GMST(2000, 0) << endl;
// //converting time and longitude to phi
/*cout << "if its January 27, 2034, 5:45 pm at a longitude of 49 the, phi should equal 4.65147698949." << endl
<< "Phi actually equals: " << timeToPhi(2034, 641.765166667, 49) << endl;*/
//test the algorithm as a whole
// pair<double, double> test;
// test.first = -46;
// test.second = 89;
// pair<double,double> horizontal;
// horizontal.first = 20;
// horizontal.second = 270;
hoursSinceYear = dateToHour(monthInput, yearInput, monthDay, hourInput, minuteInput);
pair<double,double> returnValue;
returnValue = algorithm(hoursSinceYear, longAndLatPair, AltAndAziPair, yearInput);
//cout << "The function returns a right ascention of: " << returnValue.first << " and a declination of: " << returnValue.second << endl;
window = viewFinder(returnValue);
coordinates = constellationCoordinates();
printConstellation(coordinates, window);
} while (true);
//cout << dateToHour(yearInput, monthInput, monthDay, hourInput, minuteInput) << endl;
}while(restart());
} while(restart());
return 0;
}
\ No newline at end of file
Markdown is supported
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