Commit daa23f2c authored by Brandon Reid's avatar Brandon Reid

autosave

parent 776a498a
......@@ -815,18 +815,18 @@ bool restart(){
do{
cin >> input;
tolower(input);
if(input != 'y' || input != 'n'){
if(input != 'y' && input != 'n'){
goodInput = false;
cerr << "Error: Invalid input. Try again." << endl;
cin.clear();
} else {
goodInput = true;
}
}while(!goodInput);
} while(!goodInput);
if(input == 'y'){
if (input == 'y'){
return false;
} else {
return true;
exit(0);
}
}
\ No newline at end of file
......@@ -27,4 +27,6 @@ void printConstellation (vector <pair<double,double>> constellationCoordinates,
string constellationNamer (int index); // funciton to name all the constellations
void constellationOutputter (int index); // function to output the images of the constellations
\ No newline at end of file
void constellationOutputter (int index); // function to output the images of the constellations
bool restart(); // function to ask for restart options
\ No newline at end of file
......@@ -571,7 +571,7 @@ void Stars::UrsaMajor16() { //done
}
}
void Hercules17() { //done
void Stars::Hercules17() { //done
for(int row = 0; row < 24; row++) {
for(int col = 0; col < 40; col++) {
......@@ -610,7 +610,7 @@ void Hercules17() { //done
}
void Cygnus18() { //done
void Stars::Cygnus18() { //done
for(int row = 0; row < 24; row++) {
for(int col = 0; col < 40; col++) {
......@@ -642,7 +642,7 @@ void Cygnus18() { //done
}
void Pavo19() { //done
void Stars::Pavo19() { //done
for(int row = 0; row < 24; row++) {
for(int col = 0; col < 40; col++) {
......@@ -674,7 +674,7 @@ void Pavo19() { //done
}
void Centaurus20() { //done
void Stars::Centaurus20() { //done
for(int row = 0; row < 24; row++) {
for(int col = 0; col < 40; col++) {
......@@ -715,7 +715,7 @@ void Centaurus20() { //done
}
void CanesVenatici21() { //done
void Stars::CanesVenatici21() { //done
for(int row = 0; row < 24; row++) {
for(int col = 0; col < 40; col++) {
......@@ -741,7 +741,7 @@ void CanesVenatici21() { //done
}
void Lynx22() { //done
void Stars::Lynx22() { //done
for(int row = 0; row < 24; row++) {
for(int col = 0; col < 40; col++) {
......@@ -771,7 +771,7 @@ void Lynx22() { //done
}
void Auriga23() { //done
void Stars::Auriga23() { //done
for(int row = 0; row < 24; row++) {
for(int col = 0; col < 40; col++) {
......@@ -801,7 +801,7 @@ void Auriga23() { //done
}
void Hydra24() { //done
void Stars::Hydra24() { //done
for(int row = 0; row < 24; row++) {
for(int col = 0; col < 40; col++) {
......@@ -841,7 +841,7 @@ void Hydra24() { //done
}
void Vela25() { //done
void Stars::Vela25() { //done
for(int row = 0; row < 24; row++) {
for(int col = 0; col < 40; col++) {
......
......@@ -11,7 +11,6 @@ using namespace std;
int main () {
//variables
string monthInput;
char endMenu;
int monthDay = 0;
int yearInput = 0;
int hourInput = 0;
......@@ -41,39 +40,22 @@ int main () {
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 algorithm function, when its January 27, 2017, at 5:45:54 pm, at a lat and long of -46,89 and when looking at the sky at 20, 270 (in horizontal coordinates), gives: " << endl
<< "Right ascention of: " << returnValue.first << " and a declination of: " << returnValue.second << endl;
// cout << "The algorithm function, when its January 27, 2017, at 5:45:54 pm, at a lat and long of -46,89 and when looking at the sky at 20, 270 (in horizontal coordinates), gives: " << endl
// << "Right ascention of: " << returnValue.first << " and a declination of: " << returnValue.second << endl;
window = viewFinder(returnValue);
coordinates = constellationCoordinates();
printConstellation(coordinates, window);
} while (false);
} while (!restart());
//cout << dateToHour(yearInput, monthInput, monthDay, hourInput, minuteInput) << endl;
......
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