Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
P
Project 3 Star Gazing
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Eric Walsh
Project 3 Star Gazing
Commits
9c96b409
Commit
9c96b409
authored
Mar 20, 2019
by
Eric Walsh
Browse files
Options
Browse Files
Download
Plain Diff
autosave
parents
80c15ae4
6abdd7bc
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
369 additions
and
27 deletions
+369
-27
Final stuff/Functions.h
Final stuff/Functions.h
+3
-1
Final stuff/Stars.cpp
Final stuff/Stars.cpp
+299
-0
Final stuff/Stars.h
Final stuff/Stars.h
+10
-0
Final stuff/coordinates.txt
Final stuff/coordinates.txt
+21
-21
Final stuff/main.cpp
Final stuff/main.cpp
+5
-2
Star Array/main.cpp
Star Array/main.cpp
+31
-3
No files found.
Final stuff/Functions.h
View file @
9c96b409
...
@@ -13,7 +13,9 @@ int hourPrompt (); // Prompts and checks hour input
...
@@ -13,7 +13,9 @@ int hourPrompt (); // Prompts and checks hour input
int
minutePrompt
();
// Prompts and checks minute input
int
minutePrompt
();
// Prompts and checks minute input
double
dateToHour
(
string
month
,
int
day
,
int
year
,
int
hour
,
int
minute
);
// Converts full date to hour
double
dateToHour
(
string
month
,
int
year
,
int
day
,
int
hour
,
int
minute
);
// Converts full date to hour
pair
<
double
,
double
>
altAndAziPair
();
// Creates pair of alitutude and azimuth
pair
<
double
,
double
>
altAndAziPair
();
// Creates pair of alitutude and azimuth
...
...
Final stuff/Stars.cpp
View file @
9c96b409
...
@@ -570,3 +570,302 @@ void Stars::UrsaMajor16() { //done
...
@@ -570,3 +570,302 @@ void Stars::UrsaMajor16() { //done
cout
<<
endl
;
cout
<<
endl
;
}
}
}
}
void
Hercules17
()
{
//done
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
stars
[
row
][
col
]
=
' '
;
}
}
stars
[
2
][
10
]
=
'*'
;
stars
[
7
][
6
]
=
'*'
;
stars
[
8
][
14
]
=
'*'
;
stars
[
9
][
16
]
=
'*'
;
stars
[
13
][
20
]
=
'*'
;
stars
[
12
][
26
]
=
'*'
;
stars
[
7
][
25
]
=
'*'
;
stars
[
5
][
26
]
=
'*'
;
stars
[
2
][
28
]
=
'*'
;
stars
[
3
][
31
]
=
'*'
;
stars
[
4
][
35
]
=
'*'
;
stars
[
17
][
16
]
=
'*'
;
stars
[
16
][
12
]
=
'*'
;
stars
[
15
][
8
]
=
'*'
;
stars
[
14
][
6
]
=
'*'
;
stars
[
15
][
3
]
=
'*'
;
stars
[
19
][
28
]
=
'*'
;
stars
[
20
][
30
]
=
'*'
;
stars
[
23
][
30
]
=
'*'
;
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
cout
<<
stars
[
row
][
col
];
}
cout
<<
endl
;
}
}
void
Cygnus18
()
{
//done
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
stars
[
row
][
col
]
=
' '
;
}
}
stars
[
2
][
29
]
=
'*'
;
stars
[
3
][
26
]
=
'*'
;
stars
[
8
][
26
]
=
'*'
;
stars
[
12
][
20
]
=
'*'
;
//middle point
stars
[
16
][
11
]
=
'*'
;
stars
[
17
][
2
]
=
'*'
;
stars
[
7
][
17
]
=
'*'
;
stars
[
8
][
11
]
=
'*'
;
stars
[
11
][
8
]
=
'*'
;
stars
[
16
][
29
]
=
'*'
;
stars
[
20
][
38
]
=
'*'
;
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
cout
<<
stars
[
row
][
col
];
}
cout
<<
endl
;
}
}
void
Pavo19
()
{
//done
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
stars
[
row
][
col
]
=
' '
;
}
}
stars
[
11
][
3
]
=
'*'
;
stars
[
1
][
11
]
=
'*'
;
stars
[
10
][
12
]
=
'*'
;
stars
[
9
][
19
]
=
'*'
;
stars
[
5
][
28
]
=
'*'
;
stars
[
5
][
34
]
=
'*'
;
stars
[
8
][
37
]
=
'*'
;
stars
[
9
][
39
]
=
'*'
;
stars
[
10
][
27
]
=
'*'
;
stars
[
17
][
18
]
=
'*'
;
stars
[
16
][
27
]
=
'*'
;
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
cout
<<
stars
[
row
][
col
];
}
cout
<<
endl
;
}
}
void
Centaurus20
()
{
//done
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
stars
[
row
][
col
]
=
' '
;
}
}
stars
[
1
][
12
]
=
'*'
;
stars
[
3
][
9
]
=
'*'
;
stars
[
5
][
16
]
=
'*'
;
stars
[
6
][
8
]
=
'*'
;
stars
[
7
][
4
]
=
'*'
;
stars
[
8
][
19
]
=
'*'
;
stars
[
5
][
19
]
=
'*'
;
stars
[
4
][
19
]
=
'*'
;
stars
[
3
][
24
]
=
'*'
;
stars
[
1
][
26
]
=
'*'
;
stars
[
3
][
33
]
=
'*'
;
stars
[
10
][
30
]
=
'*'
;
stars
[
11
][
31
]
=
'*'
;
stars
[
13
][
33
]
=
'*'
;
stars
[
12
][
35
]
=
'*'
;
stars
[
19
][
37
]
=
'*'
;
stars
[
16
][
39
]
=
'*'
;
stars
[
12
][
22
]
=
'*'
;
stars
[
16
][
19
]
=
'*'
;
stars
[
17
][
12
]
=
'*'
;
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
cout
<<
stars
[
row
][
col
];
}
cout
<<
endl
;
}
}
void
CanesVenatici21
()
{
//done
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
stars
[
row
][
col
]
=
' '
;
}
}
stars
[
9
][
9
]
=
'*'
;
stars
[
10
][
11
]
=
'*'
;
stars
[
12
][
20
]
=
'*'
;
stars
[
8
][
30
]
=
'*'
;
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
cout
<<
stars
[
row
][
col
];
}
cout
<<
endl
;
}
}
void
Lynx22
()
{
//done
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
stars
[
row
][
col
]
=
' '
;
}
}
stars
[
3
][
37
]
=
'*'
;
stars
[
5
][
31
]
=
'*'
;
stars
[
11
][
27
]
=
'*'
;
stars
[
10
][
17
]
=
'*'
;
stars
[
14
][
13
]
=
'*'
;
stars
[
15
][
5
]
=
'*'
;
stars
[
19
][
2
]
=
'*'
;
stars
[
21
][
1
]
=
'*'
;
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
cout
<<
stars
[
row
][
col
];
}
cout
<<
endl
;
}
}
void
Auriga23
()
{
//done
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
stars
[
row
][
col
]
=
' '
;
}
}
stars
[
3
][
13
]
=
'*'
;
stars
[
8
][
25
]
=
'*'
;
stars
[
9
][
9
]
=
'*'
;
stars
[
15
][
7
]
=
'*'
;
stars
[
22
][
20
]
=
'*'
;
stars
[
16
][
30
]
=
'*'
;
stars
[
9
][
29
]
=
'*'
;
stars
[
11
][
29
]
=
'*'
;
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
cout
<<
stars
[
row
][
col
];
}
cout
<<
endl
;
}
}
void
Hydra24
()
{
//done
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
stars
[
row
][
col
]
=
' '
;
}
}
stars
[
2
][
38
]
=
'*'
;
stars
[
2
][
39
]
=
'*'
;
stars
[
3
][
38
]
=
'*'
;
stars
[
3
][
39
]
=
'*'
;
stars
[
2
][
37
]
=
'*'
;
stars
[
4
][
34
]
=
'*'
;
stars
[
5
][
29
]
=
'*'
;
stars
[
8
][
30
]
=
'*'
;
stars
[
10
][
25
]
=
'*'
;
stars
[
9
][
24
]
=
'*'
;
stars
[
8
][
22
]
=
'*'
;
stars
[
10
][
19
]
=
'*'
;
stars
[
9
][
15
]
=
'*'
;
stars
[
10
][
14
]
=
'*'
;
stars
[
12
][
12
]
=
'*'
;
stars
[
16
][
9
]
=
'*'
;
stars
[
17
][
6
]
=
'*'
;
stars
[
15
][
1
]
=
'*'
;
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
cout
<<
stars
[
row
][
col
];
}
cout
<<
endl
;
}
}
void
Vela25
()
{
//done
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
stars
[
row
][
col
]
=
' '
;
}
}
stars
[
5
][
20
]
=
'*'
;
stars
[
7
][
10
]
=
'*'
;
stars
[
13
][
4
]
=
'*'
;
stars
[
16
][
17
]
=
'*'
;
stars
[
17
][
25
]
=
'*'
;
stars
[
17
][
33
]
=
'*'
;
stars
[
11
][
39
]
=
'*'
;
stars
[
8
][
28
]
=
'*'
;
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
cout
<<
stars
[
row
][
col
];
}
cout
<<
endl
;
}
}
\ No newline at end of file
Final stuff/Stars.h
View file @
9c96b409
...
@@ -30,6 +30,16 @@ class Stars {
...
@@ -30,6 +30,16 @@ class Stars {
void
Pisces14
();
void
Pisces14
();
void
UrsaMinor15
();
void
UrsaMinor15
();
void
UrsaMajor16
();
void
UrsaMajor16
();
//// new
void
Hercules17
();
void
Cygnus18
();
void
Pavo19
();
void
Centaurus20
();
void
CanesVenatici21
();
void
Lynx22
();
void
Auriga23
();
void
Hydra24
();
void
Vela25
();
private:
private:
char
stars
[
ROW
][
COL
];
char
stars
[
ROW
][
COL
];
...
...
Final stuff/coordinates.txt
View file @
9c96b409
...
@@ -14,26 +14,26 @@
...
@@ -14,26 +14,26 @@
4.7110,74.0721
4.7110,74.0721
15.8267,47.9218
15.8267,47.9218
34.6037,58.3816
34.6037,58.3816
12.6948,28.4280
12.6948,
-
28.4280
16.9742,7.9865
16.9742,
-
7.9865
16.8740,11.4339
16.8740,11.4339
34.0181,5.0078
34.0181,5.0078
2.7405,10.0304
2.7405,-10.0304
2.9492,25.9231
2.9492,-25.9231
17.3082,15.8452
17.3082,-15.8452
16.3693,36.7820
16.3693,-36.7820
22.4009,46.1279
22.4009,-46.1279
23.9052,42.9125
23.9052,-42.9125
49.0945,30.4051
49.0945,-30.4051
48.8566,2.3522
48.8566,-2.3522
56.3588,44.0767
56.3588,-44.0767
21.1458,79.0882
21.1458,-79.0882
31.4762,92.0512
31.4762,-92.0512
44.6692,102.1719
44.6692,-102.1719
24.8741,118.6757
24.8741,-118.6757
35.1796,129.0756
35.1796,-129.0756
35.1814,136.9064
35.1814,-136.9064
30.7490,121.4660
30.7490,-121.4660
29.0139,134.7533
29.0139,-134.7533
23.3593,119.7350
23.3593,-119.7350
33.8688,151.2093
33.8688,-151.2093
\ No newline at end of file
\ No newline at end of file
Final stuff/main.cpp
View file @
9c96b409
...
@@ -11,6 +11,7 @@ using namespace std;
...
@@ -11,6 +11,7 @@ using namespace std;
int
main
()
{
int
main
()
{
//variables
//variables
string
monthInput
;
string
monthInput
;
char
endMenu
;
int
monthDay
=
0
;
int
monthDay
=
0
;
int
yearInput
=
0
;
int
yearInput
=
0
;
int
hourInput
=
0
;
int
hourInput
=
0
;
...
@@ -65,11 +66,13 @@ int main () {
...
@@ -65,11 +66,13 @@ int main () {
//cout << "The function returns a right ascention of: " << returnValue.first << " and a declination of: " << returnValue.second << endl;
//cout << "The function returns a right ascention of: " << returnValue.first << " and a declination of: " << returnValue.second << endl;
window
=
viewFinder
(
returnValue
);
window
=
viewFinder
(
returnValue
);
coordinates
=
constellationCoordinates
();
coordinates
=
constellationCoordinates
();
printConstellation
(
coordinates
,
window
);
printConstellation
(
coordinates
,
window
);
}
while
(
fals
e
);
}
while
(
tru
e
);
//cout << dateToHour(yearInput, monthInput, monthDay, hourInput, minuteInput) << endl;
//cout << dateToHour(yearInput, monthInput, monthDay, hourInput, minuteInput) << endl;
...
...
Star Array/main.cpp
View file @
9c96b409
...
@@ -4,13 +4,41 @@
...
@@ -4,13 +4,41 @@
* **************************/
* **************************/
#include <iostream>
#include <iostream>
#include "Stars.h"
//
#include "Stars.h"
using
namespace
std
;
using
namespace
std
;
int
main
()
{
int
main
()
{
Stars
s
;
s
.
Pegasus
();
int
ROW
=
24
;
int
COL
=
40
;
char
stars
[
ROW
][
COL
];
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
stars
[
row
][
col
]
=
' '
;
}
}
stars
[
5
][
20
]
=
'*'
;
stars
[
7
][
10
]
=
'*'
;
stars
[
13
][
4
]
=
'*'
;
stars
[
16
][
17
]
=
'*'
;
stars
[
17
][
25
]
=
'*'
;
stars
[
17
][
33
]
=
'*'
;
stars
[
11
][
39
]
=
'*'
;
stars
[
8
][
28
]
=
'*'
;
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
cout
<<
stars
[
row
][
col
];
}
cout
<<
endl
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment