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

autosave

parent fe09c644
...@@ -49,4 +49,6 @@ int main(){ ...@@ -49,4 +49,6 @@ int main(){
returnValue = algorithm(641.9, test, horizontal, 2017); returnValue = algorithm(641.9, test, horizontal, 2017);
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 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; << "Right ascention of: " << returnValue.first << " and a declination of: " << returnValue.second << endl;
} }
/****************************************************
* File: Constellation.h
* Description: Array to output constalltions (try an array and as an image)
* *****************/
#ifndef STARS_H
#define STARS_H
#include <iostream>
const int ROW = 24;
const int COL = 40;
class Stars {
public:
char UrsaMinor();
char UrsaMajor();
// Winter(); ?? maybe
//////////////
char CanisMajor();
char Eridanius();
char Gemini();
char Orion();
char Tarus();
// Spring(); ??
//////////////
char Bootes();
char Cancer();
char Leo();
char Virgo();
// Summer(); ??
/////////////
char Aquila();
char Sagistarius();
char Scorpius();
// Fall(); ??
///////////
char Capricornus();
char Pegasus();
char Pisces();
private:
// const int ROW = 24;
// const int COL = 40;
char stars[ROW][COL];
};
#endif
\ No newline at end of file
#include "Functions.h" #include "Functions.h"
#include "Constellation.h"
#include "Stars.h" #include "Stars.h"
#include <string> #include <string>
#include <iostream> #include <iostream>
......
...@@ -23,7 +23,6 @@ pair<double,double> longAndLat () { ...@@ -23,7 +23,6 @@ pair<double,double> longAndLat () {
} }
while(!fin.eof()) { while(!fin.eof()) {
cout << "Howdy " << endl;
string temp1; string temp1;
string temp2; string temp2;
pair<double,double> tempPair; pair<double,double> tempPair;
...@@ -37,7 +36,7 @@ pair<double,double> longAndLat () { ...@@ -37,7 +36,7 @@ pair<double,double> longAndLat () {
// TODO Print the cities // TODO Print the cities
do { do {
cout << "In the list about, which city do you live in/live near? (enter number): "; cout << endl << "In the list about, which city do you live in/live near? (enter number): ";
if (!(cin >> cityNum)) { // validates that numbers were entered and checks input if (!(cin >> cityNum)) { // validates that numbers were entered and checks input
cerr << "Error! Please enter a valid integar." << endl; cerr << "Error! Please enter a valid integar." << endl;
cin.clear(); cin.clear();
......
#include <iostream> #include <iostream>
#include "Functions.h" #include "Functions.h"
#include "Constellation.h"
#include "countries.h" #include "countries.h"
#include "Algorithm.h"
#include <vector> #include <vector>
#include <string> #include <string>
#include <utility> #include <utility>
...@@ -37,8 +37,34 @@ int main () { ...@@ -37,8 +37,34 @@ int main () {
longAndLatPair = longAndLat(); longAndLatPair = longAndLat();
} while (false); //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;
pair<double,double> returnValue;
returnValue = algorithm(641.9, longAndLatPair, AltAndAziPair, 2017);
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;
printConstellation(constellationCoordinates(), viewFinder(returnValue));
} while (false);
//cout << dateToHour(yearInput, monthInput, monthDay, hourInput, minuteInput) << endl; //cout << dateToHour(yearInput, monthInput, monthDay, hourInput, minuteInput) << endl;
return 0; return 0;
} }
\ 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