Commit 6a7502fd authored by Brandon Reid's avatar Brandon Reid
Browse files

autosave

parent 2a9fee8e
#include "Functions.h" #include "Functions.h"
#include "Stars.h" #include "Stars.h"
#include "Constellation.h"
#include <string> #include <string>
#include <iostream> #include <iostream>
#include <vector> #include <vector>
...@@ -245,20 +246,20 @@ vector <pair<double, double>> viewFinder (pair <double, double> centerPt) { // f ...@@ -245,20 +246,20 @@ vector <pair<double, double>> viewFinder (pair <double, double> centerPt) { // f
pair1 = make_pair((centerPt.first + 3.875) - 24, centerPt.second + 39); pair1 = make_pair((centerPt.first + 3.875) - 24, centerPt.second + 39);
corners.push_back(pair1); corners.push_back(pair1);
} else if (i == 1) { // top right point } 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); corners.push_back(pair2);
} else if (i == 2) { // bottom left point } else if (i == 2) { // bottom left point
pair3 = make_pair((centerPt.first + 3.875) - 24, centerPt.second - 39); pair3 = make_pair((centerPt.first + 3.875) - 24, centerPt.second - 39);
corners.push_back(pair3); corners.push_back(pair3);
} else if (i == 3) { // bottom right point } 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); corners.push_back(pair4);
} }
} }
} else if (centerPt.first < 3.875 && centerPt.second < 51) { // done } else if (centerPt.first < 3.875 && centerPt.second < 51) { // done
for(int i = 0; i < 4; i++) { for(int i = 0; i < 4; i++) {
if (i == 0) { // top left point 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); corners.push_back(pair1);
} else if (i == 1) { // top right point } else if (i == 1) { // top right point
pair2 = make_pair(24 - (3.875 - centerPt.first), centerPt.second + 39); pair2 = make_pair(24 - (3.875 - centerPt.first), centerPt.second + 39);
...@@ -343,20 +344,20 @@ vector <pair<double, double>> viewFinder (pair <double, double> centerPt) { // f ...@@ -343,20 +344,20 @@ vector <pair<double, double>> viewFinder (pair <double, double> centerPt) { // f
pair1 = make_pair((centerPt.first + 3.875) - 24, centerPt.second + 39); pair1 = make_pair((centerPt.first + 3.875) - 24, centerPt.second + 39);
corners.push_back(pair1); corners.push_back(pair1);
} else if (i == 1) { // top right point } 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); corners.push_back(pair2);
} else if (i == 2) { // bottom left point } else if (i == 2) { // bottom left point
pair3 = make_pair((centerPt.first + 3.875) - 24, centerPt.second - 39); pair3 = make_pair((centerPt.first + 3.875) - 24, centerPt.second - 39);
corners.push_back(pair3); corners.push_back(pair3);
} else if (i == 3) { // bottom right point } 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); corners.push_back(pair4);
} }
} }
} else if (centerPt.first < 3.875 && centerPt.second > -51) { // done } else if (centerPt.first < 3.875 && centerPt.second > -51) { // done
for(int i = 0; i < 4; i++) { for(int i = 0; i < 4; i++) {
if (i == 0) { // top left point 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); corners.push_back(pair1);
} else if (i == 1) { // top right point } else if (i == 1) { // top right point
pair2 = make_pair(24 - (3.875 - centerPt.first), centerPt.second + 39); pair2 = make_pair(24 - (3.875 - centerPt.first), centerPt.second + 39);
...@@ -605,7 +606,7 @@ vector <pair<double, double>> constellationCoordinates () { ...@@ -605,7 +606,7 @@ vector <pair<double, double>> constellationCoordinates () {
pair<double, double> pair12c; pair<double, double> pair12c;
pair12c = make_pair(18.0, -42.0); pair12c = make_pair(18.0, -42.0);
coordinates.push_back(pair12c); coordinates.push_back(pair12c);
pair<double, double> pair1d; pair<double, double> pair12d;
pair12d = make_pair(16.0, -42.0); pair12d = make_pair(16.0, -42.0);
coordinates.push_back(pair12d); coordinates.push_back(pair12d);
...@@ -616,7 +617,7 @@ vector <pair<double, double>> constellationCoordinates () { ...@@ -616,7 +617,7 @@ vector <pair<double, double>> constellationCoordinates () {
pair<double, double> pair13b; pair<double, double> pair13b;
pair13b = make_pair(20.3, -12.0); pair13b = make_pair(20.3, -12.0);
coordinates.push_back(pair13b); coordinates.push_back(pair13b);
pair<double, double> pair1c; pair<double, double> pair13c;
pair13c = make_pair(21.8, -28.0); pair13c = make_pair(21.8, -28.0);
coordinates.push_back(pair13c); coordinates.push_back(pair13c);
pair<double, double> pair13d; pair<double, double> pair13d;
...@@ -630,7 +631,7 @@ vector <pair<double, double>> constellationCoordinates () { ...@@ -630,7 +631,7 @@ vector <pair<double, double>> constellationCoordinates () {
pair<double, double> pair14b; pair<double, double> pair14b;
pair14b = make_pair(21.2, 30.0); pair14b = make_pair(21.2, 30.0);
coordinates.push_back(pair14b); coordinates.push_back(pair14b);
pair<double, double> pair1c; pair<double, double> pair14c;
pair14c = make_pair(.2, 6.0); pair14c = make_pair(.2, 6.0);
coordinates.push_back(pair14c); coordinates.push_back(pair14c);
pair<double, double> pair14d; pair<double, double> pair14d;
...@@ -672,10 +673,10 @@ vector <pair<double, double>> constellationCoordinates () { ...@@ -672,10 +673,10 @@ vector <pair<double, double>> constellationCoordinates () {
pair<double, double> pair17b; pair<double, double> pair17b;
pair17b = make_pair(8.6, 61.0); pair17b = make_pair(8.6, 61.0);
coordinates.push_back(pair17b); coordinates.push_back(pair17b);
pair<double, double> pair1c; pair<double, double> pair17c;
pair17c = make_pair(13.7, 32.0); pair17c = make_pair(13.7, 32.0);
coordinates.push_back(pair17c); coordinates.push_back(pair17c);
pair<double, double> pair1d; pair<double, double> pair17d;
pair17d = make_pair(8.6, 32.0); pair17d = make_pair(8.6, 32.0);
coordinates.push_back(pair17d); coordinates.push_back(pair17d);
} }
...@@ -685,14 +686,14 @@ void printConstellation (vector <pair<double,double>> constellationCoordinates, ...@@ -685,14 +686,14 @@ void printConstellation (vector <pair<double,double>> constellationCoordinates,
int inrangeCount = 0; int inrangeCount = 0;
int coordinateCount = 0; int coordinateCount = 0;
for(int j = 0; j < (constellationCoordinates.size / 4); j++) { for(int j = 0; j < (constellationCoordinates.size() / 4); j++) {
inrangeCount = 0; inrangeCount = 0;
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
coordinateCount++; coordinateCount++;
if(((windown.at(0).first) > (constellationCoordinates.at(coordinateCount).first)) && ((windown.at(1).first) < (constellationCoordinates.at(coordinateCount).first)) if(((window.at(0).first) > (constellationCoordinates.at(coordinateCount).first)) && ((window.at(1).first) < (constellationCoordinates.at(coordinateCount).first))
&& ((windown.at(2).first) > (constellationCoordinates.at(coordinateCount).first)) && ((windown.at(3).first) < (constellationCoordinates.at(coordinateCount).first)) && ((window.at(2).first) > (constellationCoordinates.at(coordinateCount).first)) && ((window.at(3).first) < (constellationCoordinates.at(coordinateCount).first))
&& ((windown.at(0).second) > (constellationCoordinates.at(coordinateCount).second)) && ((windown.at(1).second) < (constellationCoordinates.at(coordinateCount).second)) && ((window.at(0).second) > (constellationCoordinates.at(coordinateCount).second)) && ((window.at(1).second) < (constellationCoordinates.at(coordinateCount).second))
&& ((windown.at(2).second) > (constellationCoordinates.at(coordinateCount).second)) && ((windown.at(3).second) < (constellationCoordinates.at(coordinateCount).second))) { && ((window.at(2).second) > (constellationCoordinates.at(coordinateCount).second)) && ((window.at(3).second) < (constellationCoordinates.at(coordinateCount).second))) {
inrangeCount++; inrangeCount++;
} }
} }
...@@ -774,13 +775,13 @@ void constellationOutputter (int index) { ...@@ -774,13 +775,13 @@ void constellationOutputter (int index) {
} else if (index == 43) { } else if (index == 43) {
a.Sagistarius10(); a.Sagistarius10();
} else if (index == 47) { } else if (index == 47) {
a.Scorpius11() a.Scorpius11();
} else if (index == 51) { } else if (index == 51) {
a.Capricornus12(); a.Capricornus12();
} else if (index == 55) { } else if (index == 55) {
a.Pegasus13(); a.Pegasus13();
} else if (index == 59) { } else if (index == 59) {
a.Pisces14() a.Pisces14();
} else if (index == 63) { } else if (index == 63) {
a.UrsaMinor15(); a.UrsaMinor15();
} else if (index == 67) { } else if (index == 67) {
......
#include <string> #include <string>
#include <vector>
using namespace std; using namespace std;
...@@ -16,4 +17,14 @@ double dateToHour (string month, int day, int hour, int minute); // Converts ful ...@@ -16,4 +17,14 @@ double dateToHour (string month, int day, int hour, int minute); // Converts ful
pair<double,double> altAndAziPair (); // Creates pair of alitutude and azimuth pair<double,double> altAndAziPair (); // Creates pair of alitutude and azimuth
bool isLeap (int year); // Bool check for leap year bool isLeap (int year); // Bool check for leap year
\ No newline at end of file
vector <pair<double, double>> viewFinder (pair <double, double> centerPt);
vector <pair<double, double>> constellationCoordinates ();
void printConstellation (vector <pair<double,double>> constellationCoordinates, vector <pair<double,double>> window);
string constellationNamer (int index);
void constellationOutputter (int index);
\ No newline at end of file
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