<commit_before>/**
 * Stellarduino.ino
 * The base Arduino sketch that makes up the heart of Stellarduino.
 *
 * This software is pretty dodgy, but accomplishes PushTo so long as you
 * preselect alignment stars below.
 *
 * Software Requirements
 * TLB's Encoder library: http://www.pjrc.com/teensy/td_libs_Encoder.html
 * Adafruit's RTC library: https://github.com/adafruit/RTClib
 *
 * Hardware Requirements
 * To run this program, you'll need an Arduino Uno or better, a 16x2 LCD,
 * display, a push button, and a 220k ohm resistor.
 *
 * For more information, including a setup guide, head to
 * www.caseyfulton.com/stellarduino
 *
 * Version: 0.4 Better Alignment
 * Author: <NAME>, casey AT caseyfulton DOT com
 * Website: http://www.caseyfulton.com/stellarduino
 * License: MIT, http://opensource.org/licenses/MIT
 */

#include <EEPROM.h>
#include <Encoder.h>
#include <LiquidCrystal.h>
#include <math.h>
#include <Wire.h>
#include "RTClib.h"
#include "StellarduinoUtilities.h"
#include "MeadeSerial.h"

#define DEBUG false

// Encoder steps per revolution of scope (typically 4 * CPR * gearing).
#define ALT_SPR 10000
#define AZ_SPR 10000

// The number of stars in the EEPROM catalogue.
#define CATALOGUE_STARS 50

// The number of stars to use during alignment - currently immutable.
#define ALIGNMENT_STARS 2

// Meade serial connection.
MeadeSerial meade;

// Display.
// TODO: Make provision for I2C LCD.
LiquidCrystal lcd(6, 7, 8, 9, 10, 11);

// Encoders.
Encoder altEncoder(2, 4);
Encoder azEncoder(3, 5);

// Real Time Clock.
RTC_DS1307 rtc;

// Real Time Clock date/time object - may come from being manually entered.
DateTime initialDate;

// Initial time as radians.
float initialTime;

// Sidereal time when the sketch started, expressed in radians.
// TODO: This could replace initialTime, or at least inform it.
float initialSiderealTime;

// Alignment stars - loaded from EEPROM.
ObservedStar alignmentStars[2];

// Temp location to put catalogue stars while calculating their suitability.
CatalogueStar catalogueStar;<commit_msg>Removing moved constants from main sketch file.<commit_after>/**
 * Stellarduino.ino
 * The base Arduino sketch that makes up the heart of Stellarduino.
 *
 * This software is pretty dodgy, but accomplishes PushTo so long as you
 * preselect alignment stars below.
 *
 * Software Requirements
 * TLB's Encoder library: http://www.pjrc.com/teensy/td_libs_Encoder.html
 * Adafruit's RTC library: https://github.com/adafruit/RTClib
 *
 * Hardware Requirements
 * To run this program, you'll need an Arduino Uno or better, a 16x2 LCD,
 * display, a push button, and a 220k ohm resistor.
 *
 * For more information, including a setup guide, head to
 * www.caseyfulton.com/stellarduino
 *
 * Version: 0.4 Better Alignment
 * Author: <NAME>, casey AT caseyfulton DOT com
 * Website: http://www.caseyfulton.com/stellarduino
 * License: MIT, http://opensource.org/licenses/MIT
 */

#include <EEPROM.h>
#include <Encoder.h>
#include <LiquidCrystal.h>
#include <math.h>
#include <Wire.h>
#include "RTClib.h"
#include "StellarduinoUtilities.h"
#include "MeadeSerial.h"

#define DEBUG false

// Encoder steps per revolution of scope (typically 4 * CPR * gearing).
#define ALT_SPR 10000
#define AZ_SPR 10000

// Meade serial connection.
MeadeSerial meade;

// Display.
// TODO: Make provision for I2C LCD.
LiquidCrystal lcd(6, 7, 8, 9, 10, 11);

// Encoders.
Encoder altEncoder(2, 4);
Encoder azEncoder(3, 5);

// Real Time Clock.
RTC_DS1307 rtc;

// Real Time Clock date/time object - may come from being manually entered.
DateTime initialDate;

// Initial time as radians.
float initialTime;

// Sidereal time when the sketch started, expressed in radians.
// TODO: This could replace initialTime, or at least inform it.
float initialSiderealTime;

// Alignment stars - loaded from EEPROM.
ObservedStar alignmentStars[2];

// Temp location to put catalogue stars while calculating their suitability.
CatalogueStar catalogueStar;
{'fraction_non_alphanumeric': 0.09871568874338957, 'fraction_numerical': 0.019390581717451522, 'mean_word_length': 4.131782945736434, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 2, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3619186', 'n_tokens_mistral': 1399, 'n_tokens_neox': 1266, 'n_words': 459}