Commit d62dabd1 authored by Brandon Reid's avatar Brandon Reid
Browse files

autosave

parent dbcb22d4
......@@ -440,19 +440,12 @@ vector <pair<double, double>> viewFinder (pair <double, double> centerPt) { // f
vector <pair<double, double>> constellationCoordinates () { // Function to store the coordinates of the constellations
vector <pair<double, double>> coordinates;
cout << "Made it here 1" << endl;
// Canis Major
pair<double, double> pair1a;
pair1a = make_pair(7.45, -9.0);
coordinates.push_back(pair1a);
pair<double, double> pair1b;
pair1b = make_pair(6.1, -9.0);
coordinates.push_back(pair1b);
pair<double, double> pair1c;
pair1c = make_pair(7.45, -33.0);
coordinates.push_back(pair1c);
pair<double, double> pair1d;
pair1d = make_pair(6.1, -33.0);
coordinates.push_back(pair1d);
coordinates.push_back(make_pair(7.45, -9.0));
coordinates.push_back(make_pair(6.1, -9.0));
coordinates.push_back(make_pair(7.45, -33.0));
coordinates.push_back(make_pair(6.1, -33.0));
//Eridanius
pair<double, double> pair2a;
......@@ -677,14 +670,20 @@ vector <pair<double, double>> constellationCoordinates () { // Function to store
pair<double, double> pair17d;
pair17d = make_pair(8.6, 32.0);
coordinates.push_back(pair17d);
cout << "Made it here 2" << endl;
return coordinates;
}
void printConstellation (vector <pair<double,double>> constellationCoordinates, vector <pair<double,double>> window) {
//double windowLeft = window.at()
int inrangeCount = 0;
int coordinateCount = 0;
for(int j = 0; j < (constellationCoordinates.size() / 4); j++) {
cout << "Made it here 3" << endl;
for(unsigned int j = 0; j < ((constellationCoordinates.size() + 1) / 4); j++) {
inrangeCount = 0;
for (int i = 0; i < 4; i++) {
coordinateCount++;
......@@ -745,6 +744,8 @@ string constellationNamer (int index) {
return " Ursa Minor ";
} else if (index == 67) {
return " Ursa Major ";
} else {
return " Unknown constellation";
}
}
......
......@@ -8,26 +8,50 @@ using namespace std;
int main () {
//variables
string monthInput;
int monthDay = 0;
int yearInput = 0;
int hourInput = 0;
int minuteInput = 0;
pair <double,double> testPair;
// string monthInput;
// int monthDay = 0;
// int yearInput = 0;
// int hourInput = 0;
// int minuteInput = 0;
//vector <pair<double,double>> constellationCoordinates;
vector <pair<double,double>> window;
vector <pair<double,double>> coordinates;
coordinates = constellationCoordinates();
cout << "Size " << coordinates.size() << endl;
pair<double, double> pair17a;
pair17a = make_pair(15.0, 70.0);
window.push_back(pair17a);
pair<double, double> pair17b;
pair17b = make_pair(5.0, 70.0);
window.push_back(pair17b);
pair<double, double> pair17c;
pair17c = make_pair(15.0, 30.0);
window.push_back(pair17c);
pair<double, double> pair17d;
pair17d = make_pair(5.0, 30.0);
window.push_back(pair17d);
cout << "==============Welcome to the Star-Gazer v 1.0==============" << endl;
do {
yearInput = yearPrompt();
// yearInput = yearPrompt();
// monthInput = monthPrompt();
monthInput = monthPrompt();
// monthDay = dayPrompt(monthInput, yearInput);
monthDay = dayPrompt(monthInput, yearInput);
// hourInput = hourPrompt();
hourInput = hourPrompt();
// minuteInput = minutePrompt();
minuteInput = minutePrompt();
// testPair = altAndAziPair ();
// cout << "Made it here 4" << endl;
// printConstellation (coordinates, window);
testPair = altAndAziPair ();
// for (int i = 0; i < coordinates.size(); i++) {
// cout << coordinates.at(i).first << endl;
// cout << coordinates.at(i).second << endl;
// }
} while (false);
//cout << dateToHour(yearInput, monthInput, monthDay, hourInput, minuteInput) << endl;
......
Supports Markdown
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