Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor changes for better conventions, and using standard C data types. #111

Merged
merged 1 commit into from Mar 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 8 additions & 9 deletions addons/St4Serial/SmartHandController/Catalog.cpp
Expand Up @@ -3,32 +3,30 @@
#include "Config.h"
#include "math.h"

#include <Ephemeris.h> // https://github.com/hjd1964/ephemeris

#include "constants.h"

// Do not change anything in the structs or arrays below, since they
// have to be in sync with the extractions scripts.

// Struct for Deep Space Objects (Messier, Herschel, ..etc.)
typedef struct {
const byte Cons;
const byte Obj_type;
const char Cons;
const char Obj_type;
const unsigned short Obj_id;
const short Mag;
const signed short Mag;
const float RA;
const float DE;
} st_dso;
} dso_t;

// Struct for stars
typedef struct {
const byte Cons;
const byte Bayer;
const char Cons;
const char Bayer;
const signed short Mag;
const float RA;
const float DE;
const char Name[16];
} st_star;
} star_t;

// Bayer designation, the Greek letter for each star within a constellation
const char* Txt_Bayer[24] = {
Expand Down Expand Up @@ -186,6 +184,7 @@ const char * Txt_Catalog[] = {

// Data for different catalogs, each is a collection of certain celestial objects
// These are machine generated using scripts from Open NGC and KStars' Star data
// Do NOT edit manually. Rerun the scripts instead.
#include "messier.h"
#include "herschel.h"
#include "stars.h"
Expand Down
2 changes: 1 addition & 1 deletion addons/St4Serial/SmartHandController/herschel.h
@@ -1,7 +1,7 @@
// This data is machine generated from the Open NGC database.
// Do NOT edit it manually. Rather, fix the import programs and rerun.
// Total for constants.h
st_dso Cat_Herschel[NUM_HERSCHEL] = {
dso_t Cat_Herschel[NUM_HERSCHEL] = {
{ 18, 9, 40, 1189, 0.217, 72.5219 }, // H 40, Cep, PN, 11.89, 00:13:01, +72:31:1, NGC0040
{ 16, 1, 129, 650, 0.4995, 60.2112 }, // H 129, Cas, OCl, 6.50, 00:29:58, +60:12:4, NGC0129
{ 16, 1, 136, 9990, 0.5252, 61.5093 }, // H 136, Cas, OCl, 99.9, 00:31:30, +61:30:3, NGC0136
Expand Down
2 changes: 1 addition & 1 deletion addons/St4Serial/SmartHandController/messier.h
@@ -1,7 +1,7 @@
// This data is machine generated from the Open NGC database.
// Do NOT edit it manually. Rather, fix the import programs and rerun.
// Total for constants.h
st_dso Cat_Messier[NUM_MESSIER] = {
dso_t Cat_Messier[NUM_MESSIER] = {
{ 77, 15, 1, 840, 5.5755, 22.0145 }, // M 001, Tau, SNR, 8.40, 05:34:31, +22:00:5, NGC1952
{ 4, 8, 2, 625, 21.5575, -0.8233 }, // M 002, Aqr, GCl, 6.25, 21:33:27, -00:49:2, NGC7089
{ 11, 8, 3, 639, 13.7031, 28.3754 }, // M 003, CVn, GCl, 6.39, 13:42:11, +28:22:3, NGC5272
Expand Down
2 changes: 1 addition & 1 deletion addons/St4Serial/SmartHandController/stars.h
@@ -1,7 +1,7 @@
// This data is machine generated from the KStars Star database.
// Do NOT edit it manually. Rather, fix the import programs and rerun.
// Total for constants.h
st_star Cat_Stars[NUM_STARS] = {
star_t Cat_Stars[NUM_STARS] = {
{ 0, 0, 206, 0.1398, 29.0904, "Alpheratz "}, // alp And, 2.07, 00:08:23.26, +29:05:25.6, Alpheratz
{ 0, 1, 206, 1.1622, 35.6206, "Mirach "}, // bet And, 2.07, 01:09:43.93, +35:37:14.0, Mirach
{ 0, 2, 210, 2.065, 42.3298, "Almach "}, // gam And, 2.1, 02:03:53.95, +42:19:47.1, Almach
Expand Down