Commit 6de8ae65 authored by Walterio Montanez's avatar Walterio Montanez

autosave

parent f4881005
......@@ -174,7 +174,6 @@ pair<double,double> altAndAziPair () {
return aziPair;
}
double dateToHour (string month, int year, int day, int hour, int minute) { // Converts the date into hours
//variables
double totHours = 0;
......@@ -244,20 +243,20 @@ vector <pair<double, double>> viewFinder (pair <double, double> centerPt) { // f
pair1 = make_pair((centerPt.first + 3.875) - 24, centerPt.second + 39);
corners.push_back(pair1);
} else if (i == 1) { // top right point
pair2 = make_pair(centerPt.first - 3.875), centerPt.second + 39);
pair2 = make_pair((centerPt.first - 3.875), centerPt.second + 39);
corners.push_back(pair2);
} else if (i == 2) { // bottom left point
pair3 = make_pair((centerPt.first + 3.875) - 24, centerPt.second - 39);
corners.push_back(pair3);
} else if (i == 3) { // bottom right point
pair4 = make_pair(centerPt.first - 3.875), centerPt.second - 39);
pair4 = make_pair((centerPt.first - 3.875), centerPt.second - 39);
corners.push_back(pair4);
}
}
} else if (centerPt.first < 3.875 && centerPt.second < 51) { // done
for(int i = 0; i < 4; i++) {
if (i == 0) { // top left point
pair1 = make_pair(centerPt.first + 3.875), centerPt.second + 39);
pair1 = make_pair((centerPt.first + 3.875), centerPt.second + 39);
corners.push_back(pair1);
} else if (i == 1) { // top right point
pair2 = make_pair(24 - (3.875 - centerPt.first), centerPt.second + 39);
......@@ -342,20 +341,20 @@ vector <pair<double, double>> viewFinder (pair <double, double> centerPt) { // f
pair1 = make_pair((centerPt.first + 3.875) - 24, centerPt.second + 39);
corners.push_back(pair1);
} else if (i == 1) { // top right point
pair2 = make_pair(centerPt.first - 3.875), centerPt.second + 39);
pair2 = make_pair((centerPt.first - 3.875), centerPt.second + 39);
corners.push_back(pair2);
} else if (i == 2) { // bottom left point
pair3 = make_pair((centerPt.first + 3.875) - 24, centerPt.second - 39);
corners.push_back(pair3);
} else if (i == 3) { // bottom right point
pair4 = make_pair(centerPt.first - 3.875), centerPt.second - 39);
pair4 = make_pair((centerPt.first - 3.875), centerPt.second - 39);
corners.push_back(pair4);
}
}
} else if (centerPt.first < 3.875 && centerPt.second > -51) { // done
for(int i = 0; i < 4; i++) {
if (i == 0) { // top left point
pair1 = make_pair(centerPt.first + 3.875), centerPt.second + 39);
pair1 = make_pair((centerPt.first + 3.875), centerPt.second + 39);
corners.push_back(pair1);
} else if (i == 1) { // top right point
pair2 = make_pair(24 - (3.875 - centerPt.first), centerPt.second + 39);
......@@ -604,7 +603,7 @@ vector <pair<double, double>> constellationCoordinates () {
pair<double, double> pair12c;
pair12c = make_pair(18.0, -42.0);
coordinates.push_back(pair12c);
pair<double, double> pair1d;
pair<double, double> pair12d;
pair12d = make_pair(16.0, -42.0);
coordinates.push_back(pair12d);
......@@ -615,7 +614,7 @@ vector <pair<double, double>> constellationCoordinates () {
pair<double, double> pair13b;
pair13b = make_pair(20.3, -12.0);
coordinates.push_back(pair13b);
pair<double, double> pair1c;
pair<double, double> pair13c;
pair13c = make_pair(21.8, -28.0);
coordinates.push_back(pair13c);
pair<double, double> pair13d;
......@@ -629,7 +628,7 @@ vector <pair<double, double>> constellationCoordinates () {
pair<double, double> pair14b;
pair14b = make_pair(21.2, 30.0);
coordinates.push_back(pair14b);
pair<double, double> pair1c;
pair<double, double> pair14c;
pair14c = make_pair(.2, 6.0);
coordinates.push_back(pair14c);
pair<double, double> pair14d;
......@@ -671,10 +670,10 @@ vector <pair<double, double>> constellationCoordinates () {
pair<double, double> pair17b;
pair17b = make_pair(8.6, 61.0);
coordinates.push_back(pair17b);
pair<double, double> pair1c;
pair<double, double> pair17c;
pair17c = make_pair(13.7, 32.0);
coordinates.push_back(pair17c);
pair<double, double> pair1d;
pair<double, double> pair17d;
pair17d = make_pair(8.6, 32.0);
coordinates.push_back(pair17d);
}
......@@ -684,14 +683,14 @@ void viewWindow (vector <pair<double,double>> constellationCoordinates, vector <
int inrangeCount = 0;
int coordinateCount = 0;
for(int j = 0; j < (constellationCoordinates.size / 4); j++) {
for(int j = 0; j < (constellationCoordinates.size() / 4); j++) {
inrangeCount = 0;
for (int i = 0; i < 4; i++) {
coordinateCount++;
if(((windown.at(0).first) > (constellationCoordinates.at(coordinateCount).first)) && ((windown.at(1).first) < (constellationCoordinates.at(coordinateCount).first))
&& ((windown.at(2).first) > (constellationCoordinates.at(coordinateCount).first)) && ((windown.at(3).first) < (constellationCoordinates.at(coordinateCount).first))
&& ((windown.at(0).second) > (constellationCoordinates.at(coordinateCount).second)) && ((windown.at(1).second) < (constellationCoordinates.at(coordinateCount).second))
&& ((windown.at(2).second) > (constellationCoordinates.at(coordinateCount).second)) && ((windown.at(3).second) < (constellationCoordinates.at(coordinateCount).second))) {
if(((window.at(0).first) > (constellationCoordinates.at(coordinateCount).first)) && ((window.at(1).first) < (constellationCoordinates.at(coordinateCount).first))
&& ((window.at(2).first) > (constellationCoordinates.at(coordinateCount).first)) && ((window.at(3).first) < (constellationCoordinates.at(coordinateCount).first))
&& ((window.at(0).second) > (constellationCoordinates.at(coordinateCount).second)) && ((window.at(1).second) < (constellationCoordinates.at(coordinateCount).second))
&& ((window.at(2).second) > (constellationCoordinates.at(coordinateCount).second)) && ((window.at(3).second) < (constellationCoordinates.at(coordinateCount).second))) {
inrangeCount++;
}
}
......
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