Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
246 commits
Select commit Hold shift + click to select a range
9eb705f
Starting to update for new packages
ccmehil Jan 19, 2022
e459978
Update telescope_server.py
ccmehil Jan 20, 2022
c10d555
Create readme.md
ccmehil Jan 20, 2022
4aabc92
Update readme.md
ccmehil Jan 20, 2022
e6cd5a4
Create mpu9250_test.py
ccmehil Jan 20, 2022
9b29609
Update readme.md
ccmehil Jan 20, 2022
76943ca
Update readme.md
ccmehil Jan 20, 2022
d7a8134
Update readme.md
ccmehil Jan 20, 2022
a0a0953
Create readme.md
ccmehil Jan 20, 2022
5f2c758
Rearranging
Jan 20, 2022
a819b1e
Original Code secure in src folder
Jan 20, 2022
7a4ceff
Refactoring
Jan 20, 2022
1f26092
Update readme.md
ccmehil Jan 20, 2022
4ab1d2e
First refactoring
Jan 20, 2022
ed26811
Module updates
Jan 20, 2022
8c34c3f
Update mpu9250.py
Jan 20, 2022
aa48904
Update mpu9250.py
Jan 20, 2022
0d1e5d7
Update mpu9250.py
Jan 20, 2022
ff1e76c
hardware module issues
Jan 20, 2022
66c1ffb
Update mpu9250.py
Jan 20, 2022
a4a8046
Update mpu9250.py
Jan 20, 2022
a5f09e1
Update mpu9250.py
Jan 20, 2022
1933867
Update mpu9250.py
Jan 20, 2022
d7bbdd6
Update mpu9250.py
Jan 20, 2022
59577b5
Update mpu9250.py
Jan 20, 2022
fd9a521
Update mpu9250.py
Jan 20, 2022
12c109b
Update mpu9250.py
Jan 20, 2022
5a9a6e8
Update mpu9250.py
Jan 20, 2022
f2b1acc
Update mpu9250.py
Jan 20, 2022
89ba0ee
Update mpu9250.py
Jan 20, 2022
0fbc17c
Update mpu9250.py
Jan 20, 2022
a2b2762
Update mpu9250.py
Jan 20, 2022
887cdcd
Update telescope_server.py
Jan 20, 2022
3948701
Update telescope_server.py
Jan 20, 2022
bfadd51
Update telescope_server.py
Jan 20, 2022
6f5a050
Update telescope_server.py
Jan 20, 2022
5e5ec20
Update telescope_server.py
Jan 20, 2022
0ac771f
Update telescope_server.py
Jan 20, 2022
d5b2948
Update telescope_server.py
Jan 20, 2022
eb523ef
Update telescope_server.py
Jan 20, 2022
c8babd3
Update telescope_server.py
Jan 20, 2022
932c808
Update telescope_server.py
Jan 20, 2022
62262ab
Update telescope_server.py
Jan 20, 2022
6219043
Update telescope_server.py
Jan 20, 2022
cb67276
Update telescope_server.py
Jan 20, 2022
45c3fca
Update telescope_server.py
Jan 20, 2022
a5ab2da
Update telescope_server.py
Jan 20, 2022
c783429
Update telescope_server.py
Jan 21, 2022
811d25f
Update telescope_server.py
Jan 21, 2022
7d50a91
Update telescope_server.py
Jan 21, 2022
d20f5c0
Update telescope_server.py
Jan 21, 2022
8164b48
Update telescope_server.py
Jan 21, 2022
fdc134a
Update telescope_server.py
Jan 21, 2022
c2023d2
Update telescope_server.py
Jan 21, 2022
3d528eb
Create todo.md
ccmehil Jan 21, 2022
355c1d6
Create corrections.md
ccmehil Jan 21, 2022
669b7fc
Update telescope_server.py
Jan 22, 2022
a579d67
Update telescope_server.py
Jan 22, 2022
feb5371
Documentation
Jan 22, 2022
1e84d26
Update readme.md
Jan 22, 2022
bbee4c2
Update readme.md
Jan 22, 2022
ac82f0e
Update corrections.md
Jan 22, 2022
b54cfc7
Update telescope_server.py
Jan 22, 2022
2ad64cb
Update telescope_server.py
Jan 22, 2022
3fc70b1
Update telescope_server.py
Jan 22, 2022
200432c
socket handling
Jan 22, 2022
8f0537c
Update telescope_server.py
Jan 22, 2022
5c4993d
Update corrections.md
Jan 22, 2022
ec69457
Update todo.md
Jan 22, 2022
a59c66f
Update telescope_server.py
Jan 23, 2022
5fca61b
Update telescope_server.py
Jan 23, 2022
d68cb8f
Update telescope_server.py
Jan 23, 2022
f4bfc43
Update telescope_server.py
Jan 23, 2022
3e5fe00
Update telescope_server.py
Jan 23, 2022
43bdc1e
Update telescope_server.py
Jan 23, 2022
3f07a23
Update telescope_server.py
Jan 23, 2022
eefaf62
Update telescope_server.py
Jan 23, 2022
b47dda0
Update telescope_server.py
Jan 23, 2022
54b70e0
Update telescope_server.py
Jan 23, 2022
a2e8383
Update telescope_server.py
Jan 23, 2022
fc0cafd
Update telescope_server.py
Jan 23, 2022
e18fb44
Update telescope_server.py
Jan 23, 2022
aa1eb85
Update telescope_server.py
Jan 23, 2022
2bb3694
Update telescope_server.py
Jan 23, 2022
e2eba2a
Update telescope_server.py
Jan 23, 2022
d610b23
Update telescope_server.py
Jan 23, 2022
5044c6d
Update telescope_server.py
Jan 23, 2022
c39a657
Update telescope_server.py
Jan 23, 2022
827f5ea
Update telescope_server.py
Jan 23, 2022
386b590
Update telescope_server.py
Jan 23, 2022
27b9280
Update telescope_server.py
Jan 23, 2022
d2e66b8
Update telescope_server.py
Jan 23, 2022
96c4c8d
Update telescope_server.py
Jan 23, 2022
0f38b17
Update telescope_server.py
Jan 23, 2022
836be81
Update telescope_server.py
Jan 23, 2022
ca93df1
Update telescope_server.py
Jan 23, 2022
be0c6a1
Update todo.md
Jan 23, 2022
0c61032
Update telescope_server.py
Jan 23, 2022
dcf15ec
Update telescope_server.py
Jan 23, 2022
0ad3d0c
Update telescope_server.py
Jan 23, 2022
4791f60
Update todo.md
Jan 23, 2022
a34a321
Update telescope_server.py
Jan 23, 2022
33e5f67
Update telescope_server.py
Jan 23, 2022
c2c908f
Update telescope_server.py
Jan 23, 2022
d83b7d5
Update telescope_server.py
Jan 23, 2022
3ad6099
Update telescope_server.py
Jan 23, 2022
33229a4
Update todo.md
Jan 23, 2022
598372b
Update telescope_server.py
Jan 23, 2022
7d5e862
Update telescope_server.py
Jan 23, 2022
9bc9830
Update telescope_server.py
Jan 23, 2022
c4853c1
Update telescope_server.py
Jan 23, 2022
7137cf8
Update telescope_server.py
Jan 23, 2022
72bf9a8
Update telescope_server.py
Jan 23, 2022
999777c
Update telescope_server.py
Jan 23, 2022
8fb6652
Update todo.md
Jan 23, 2022
198ccfc
Update telescope_server.py
Jan 23, 2022
429d141
Update telescope_server.py
Jan 23, 2022
75ac52a
Update telescope_server.py
Jan 23, 2022
b8283c5
Update telescope_server.py
Jan 23, 2022
3673f44
Update todo.md
Jan 23, 2022
6a893a8
Update telescope_server.py
Jan 23, 2022
0104010
Update todo.md
Jan 23, 2022
a952310
Update telescope_server.py
Jan 24, 2022
4105bb5
Update telescope_server.py
Jan 24, 2022
a00c068
Update todo.md
Jan 24, 2022
de99ce5
Results of testing
Jan 24, 2022
65c94f2
Update telescope_server.py
Jan 24, 2022
5365bba
Update telescope_server.py
Jan 24, 2022
18a5960
Update telescope_server.py
Jan 24, 2022
af1eded
Update telescope_server.py
Jan 24, 2022
10dbb19
Update telescope_server.py
Jan 24, 2022
20d70f2
Update telescope_server.py
Jan 24, 2022
78e48d8
Update telescope_server.py
Jan 24, 2022
8509535
Update telescope_server.py
Jan 24, 2022
5115273
Update telescope_server.py
Jan 24, 2022
7e80824
Update telescope_server.py
Jan 24, 2022
9f41f81
Update telescope_server.py
Jan 24, 2022
48bfb5f
Update telescope_server.py
Jan 24, 2022
32298d1
Update telescope_server.py
Jan 24, 2022
282903c
Update telescope_server.py
Jan 24, 2022
2392538
Update telescope_server.py
Jan 24, 2022
28de422
Update telescope_server.py
Jan 24, 2022
3a161e4
Update telescope_server.py
Jan 24, 2022
6bdc1cd
Update telescope_server.py
Jan 24, 2022
95b8238
Update telescope_server.py
Jan 24, 2022
a3157b1
Update telescope_server.py
Jan 24, 2022
b2e5dd9
Update telescope_server.py
Jan 24, 2022
f23d56b
Update telescope_server.py
Jan 24, 2022
0f05fc9
Update telescope_server.py
Jan 24, 2022
40a6d08
Update telescope_server.py
Jan 24, 2022
d7bcd28
Update telescope_server.py
Jan 24, 2022
7a9939a
minor
Jan 25, 2022
4e980d6
Update readme.md
Jan 25, 2022
e040d32
Update telescope_server.py
Jan 25, 2022
83f78b8
Update telescope_server.py
Jan 25, 2022
6724704
Update telescope_server.py
Jan 25, 2022
95262fd
Update telescope_server.py
Jan 25, 2022
cb8d040
Update telescope_server.py
Jan 25, 2022
f6bc525
Update telescope_server.py
Jan 25, 2022
cec303c
Update telescope_server.py
Jan 25, 2022
0337da4
Update telescope_server.py
Jan 25, 2022
83e7b90
Update telescope_server.py
Jan 25, 2022
362cdad
Update telescope_server.py
Jan 25, 2022
d123a44
Update telescope_server.py
Jan 25, 2022
c3983c5
Create log_slew_test_25Jan2328.txt
Jan 25, 2022
44cae85
Update telescope_server.py
Jan 25, 2022
fed16f1
Update telescope_server.py
Jan 25, 2022
5473003
Update telescope_server.py
Jan 25, 2022
79014bb
Update telescope_server.py
Jan 25, 2022
b16092e
Update telescope_server.py
Jan 25, 2022
1b3bd5d
Update telescope_server.py
Jan 25, 2022
4ba6ef7
Update telescope_server.py
Jan 25, 2022
2590a0f
Update telescope_server.py
Jan 25, 2022
5ba90f9
Update telescope_server.py
Jan 25, 2022
ae63cb5
Update telescope_server.py
Jan 26, 2022
7dfee4b
Update telescope_server.py
Jan 26, 2022
13d29eb
Update telescope_server.py
Jan 26, 2022
b4601c5
Update telescope_server.py
Jan 26, 2022
b9a92c9
Update telescope_server.py
Jan 26, 2022
ecc00d7
Update telescope_server.py
Jan 26, 2022
39f1fac
Update telescope_server.py
Jan 26, 2022
ecee24f
Update telescope_server.py
Jan 26, 2022
b65db49
Update telescope_server.py
Jan 26, 2022
f25e120
Update telescope_server.py
Jan 26, 2022
e105351
Update telescope_server.py
Jan 26, 2022
e7537b7
Update telescope_server.py
Jan 26, 2022
b71a3fb
Update telescope_server.py
Jan 26, 2022
286312c
Update telescope_server.py
Jan 26, 2022
0dc694e
Update telescope_server.py
Jan 26, 2022
f7e8a1c
Update telescope_server.py
Jan 26, 2022
9986bfe
Update telescope_server.py
Jan 26, 2022
37a4b75
Update readme.md
Jan 26, 2022
f6f1285
Update telescope_server.py
Jan 27, 2022
3d0a8d6
Evening Results
Jan 27, 2022
ba3eb55
Update telescope_server.py
Jan 27, 2022
7dcdb5a
Update readme.md
Jan 27, 2022
dc3b7cd
Update telescope_server.py
Jan 27, 2022
8d9019b
Update telescope_server.py
Jan 27, 2022
3d3b42b
Update telescope_server.py
Jan 27, 2022
d825a5c
Update telescope_server.py
Jan 27, 2022
7fed5b7
Update telescope_server.py
Jan 27, 2022
321bf55
Update telescope_server.py
Jan 27, 2022
243d89d
Update telescope_server.py
Jan 27, 2022
05ccdf2
Update telescope_server.py
Jan 27, 2022
2521da5
Update telescope_server.py
Jan 27, 2022
9a1600d
Update telescope_server.py
Jan 27, 2022
17b68cb
Update todo.md
Jan 27, 2022
2a52498
Update telescope_server.py
Jan 27, 2022
e844faf
Update telescope_server.py
Jan 27, 2022
b9b42e9
Update todo.md
Jan 27, 2022
5d55803
Update telescope_server.py
Jan 27, 2022
70f124a
Results of the evening
Jan 27, 2022
4d2b770
plain txt
Jan 27, 2022
e170190
rearranging
Jan 27, 2022
c77c1ce
more arranging
Jan 27, 2022
e0a8583
Update corrections.md
Jan 27, 2022
9919516
Update corrections.md
Jan 27, 2022
b3a3e2a
Update corrections.md
Jan 27, 2022
01dc9e6
Update readme.md
Jan 27, 2022
3b6848f
Update readme.md
Jan 27, 2022
dea7605
more cleanup and arranging
Jan 27, 2022
7a431cc
Update telescope_server.py
Jan 30, 2022
725f481
Update telescope_server.py
Jan 30, 2022
f16b95d
Update telescope_server.py
Jan 30, 2022
a9487e0
Update telescope_server.py
Jan 30, 2022
deadf8d
Create log_slew_test_30Jan2134.txt
Jan 30, 2022
c420bdb
Update telescope_server.py
Jan 30, 2022
a30929e
Update readme.md
Jan 30, 2022
a68451c
Update readme.md
Jan 30, 2022
70fbfcd
Update telescope_server.py
Jan 30, 2022
74629bb
Update telescope_server.py
Jan 30, 2022
410283d
Update readme.md
Jan 30, 2022
af733d3
Update telescope_server.py
Jan 30, 2022
a77b1b5
Update telescope_server.py
Jan 30, 2022
ab23359
Update telescope_server.py
Jan 30, 2022
aea880b
Update telescope_server.py
Jan 30, 2022
6d421a4
Update telescope_server.py
Jan 30, 2022
54371bb
Update telescope_server.py
Jan 30, 2022
9f02f35
Update telescope_server.py
Jan 30, 2022
8e6c131
Update telescope_server.py
Feb 1, 2022
58cd15f
Update telescope_server.py
Feb 1, 2022
56f9a7b
Update readme.md
Feb 1, 2022
3c76a67
Update telescope_server.py
Feb 1, 2022
2f3fab3
Update telescope_server.py
Feb 1, 2022
cf9acbe
Update telescope_server.py
Feb 1, 2022
a1ebc63
Update telescope_server.py
Feb 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
205 changes: 205 additions & 0 deletions mpu9250.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
#!/usr/bin/env python
from __future__ import print_function

import sys
from time import sleep, time
from math import pi, sin, cos, asin, acos, atan2, sqrt
import numpy as np

try:
import time
from mpu9250_jmdev.registers import *
from mpu9250_jmdev.mpu_9250 import MPU9250

mpu = MPU9250(
address_ak=AK8963_ADDRESS,
address_mpu_master=MPU9050_ADDRESS_68, # In 0x68 Address
address_mpu_slave=None,
bus=1,
gfs=GFS_1000,
afs=AFS_8G,
mfs=AK8963_BIT_16,
mode=AK8963_MODE_C100HZ)

mpu.configure()
except ImportError:
sys.stderr.write("Ensure mpu9250_jmdev is present and importable\n")
sys.exit(1)

#Local imports
from quaternions import _check_close
from quaternions import quaternion_to_rotation_matrix_rows, quaternion_from_rotation_matrix_rows
from quaternions import quaternion_from_axis_angle
from quaternions import quaternion_from_euler_angles, quaternion_to_euler_angles
from quaternions import quaternion_multiply, quaternion_normalise

class GYMOD(object):
def __init__(self, bus=None):
self._last_gyro_time = 0 #needed for interpreting gyro
self.read_gyro_delta() #Discard first reading
q_start = self.current_orientation_quaternion_mag_acc_only()
self._q_start = q_start
self._current_hybrid_orientation_q = q_start
self._current_gyro_only_q = q_start

def update(self):
"""Read the current sensor values & store them for smoothing. No return value."""
t = time.time()
delta_t = t - self._last_gyro_time
if delta_t < 0.020:
#Want at least 20ms of data
return
v_gyro = np.array(self.read_gyro(), np.float)
v_acc = np.array(self.read_accel(), np.float)
v_mag = np.array(self.read_compass(), np.float)
self._last_gyro_time = t

#Gyro only quaternion calculation (expected to drift)
rot_mag = sqrt(sum(v_gyro**2))
v_rotation = v_gyro / rot_mag
q_rotation = quaternion_from_axis_angle(v_rotation, rot_mag * delta_t)
self._current_gyro_only_q = quaternion_multiply(self._current_gyro_only_q, q_rotation)
self._current_hybrid_orientation_q = quaternion_multiply(self._current_hybrid_orientation_q, q_rotation)

if abs(sqrt(sum(v_acc**2)) - 1) < 0.3:
#Approx 1g, should be stationary, and can use this for down axis...
v_down = v_acc * -1.0
v_east = np.cross(v_down, v_mag)
v_north = np.cross(v_east, v_down)
v_down /= sqrt((v_down**2).sum())
v_east /= sqrt((v_east**2).sum())
v_north /= sqrt((v_north**2).sum())
#Complementary Filter
#Combine (noisy) orientation from acc/mag, 2%
#with (drifting) orientation from gyro, 98%
q_mag_acc = quaternion_from_rotation_matrix_rows(v_north, v_east, v_down)
self._current_hybrid_orientation_q = tuple(0.02*a + 0.98*b for a, b in
zip(q_mag_acc, self._current_hybrid_orientation_q))


#1st order approximation of quaternion for this rotation (v_rotation, delta_t)
#using small angle approximation, cos(theta) = 1, sin(theta) = theta
#w, x, y, z = (1, v_rotation[0] * delta_t/2, v_rotation[1] *delta_t/2, v_rotation[2] * delta_t/2)
#q_rotation = (1, v_rotation[0] * delta_t/2, v_rotation[1] *delta_t/2, v_rotation[2] * delta_t/2)
return

def current_orientation_quaternion_hybrid(self):
"""Current orientation using North, East, Down (NED) frame of reference."""
self.update()
return self._current_hybrid_orientation_q

def current_orientation_quaternion_mag_acc_only(self):
"""Current orientation using North, East, Down (NED) frame of reference."""
#Can't use v_mag directly as North since it will usually not be
#quite horizontal (requiring tilt compensation), establish this
#using the up/down axis from the accelerometer.
#Note assumes starting at rest so only acceleration is gravity.
v_acc = np.array(self.read_accel(), np.float)
v_mag = np.array(self.read_compass(), np.float)
return self._quaternion_from_acc_mag(v_acc, v_mag)

def _quaternion_from_acc_mag(self, v_acc, v_mag):
v_down = v_acc * -1.0 #(sign change depends on sensor design?)
v_east = np.cross(v_down, v_mag)
v_north = np.cross(v_east, v_down)
#Normalise the vectors...
v_down /= sqrt((v_down ** 2).sum())
v_east /= sqrt((v_east ** 2).sum())
v_north /= sqrt((v_north ** 2).sum())
return quaternion_from_rotation_matrix_rows(v_north, v_east, v_down)

def current_orientation_euler_angles_hybrid(self):
"""Current orientation using yaw, pitch, roll (radians) using sensor's frame."""
return quaternion_to_euler_angles(*self.current_orientation_quaternion_hybrid())

def current_orientation_euler_angles_mag_acc_only(self):
"""Current orientation using yaw, pitch, roll (radians) using sensor's frame."""
return quaternion_to_euler_angles(*self.current_orientation_quaternion_mag_acc_only())

def read_accel(self, scaled=True):
"""Returns an X, Y, Z tuple; if scaled in units of gravity."""
accel = mpu.readAccelerometerMaster()
if scaled:
return accel[0], accel[1], accel[2]
else:
return accel[0], accel[1], accel[2]

def read_gyro(self, scaled=True):
"""Returns an X, Y, Z tuple; If scaled uses radians/second.

WARNING: Calling this method directly will interfere with the higher-level
methods like ``read_gyro_delta`` which integrate the gyroscope readings to
track orientation (it will miss out on the rotation reported in this call).
"""
gyro = mpu.readGyroscopeMaster()
if scaled:
return gyro[0], gyro[1], gyro[2]
else:
return gyro[0], gyro[1], gyro[2]

def read_gyro_delta(self):
"""Returns an X, Y, Z tuple - radians since last call."""
t = time.time()
gyro = mpu.readGyroscopeMaster()
d = np.array([gyro[0], gyro[1], gyro[2]], np.float) / (t - self._last_gyro_time)
self._last_gyro_time = t
return d

def read_compass(self, scaled=True):
"""Returns an X, Y, Z tuple."""
compass = mpu.readMagnetometerMaster()
if scaled:
return compass[0], compass[1], compass[2]
else:
return compass[0], compass[1], compass[2]


if __name__ == "__main__":
print("Starting...")
imu = GYMOD()

#Sanity test:
x, y, z = imu.read_accel()
g = sqrt(x*x + y*y + z*z)
print("Magnitude of acceleration %0.2fg (%0.2f %0.2f %0.2f)" % (g, x, y, z))
if abs(g - 1) > 0.3:
sys.stderr.write("Not starting from rest, acceleration %0.2f\n" % g)
sys.exit(1)
print("Starting q by acc/mag (%0.2f, %0.2f, %0.2f, %0.2f)" % imu._q_start)

try:
while True:
print()
imu.update()
#w, x, y, z = imu.current_orientation_quaternion_hybrid()
w, x, y, z = imu._current_hybrid_orientation_q
#print("Gyroscope/Accl/Comp q (%0.2f, %0.2f, %0.2f, %0.2f)" % (w, x, y, z))
yaw, pitch, roll = quaternion_to_euler_angles(w, x, y, z)
print("Gyroscope/Accl/Comp q (%0.2f, %0.2f, %0.2f, %0.2f), "
"yaw %0.1f, pitch %0.2f, roll %0.1f (degrees)" % (w, x, y, z,
yaw * 180.0 / pi,
pitch * 180.0 / pi,
roll * 180.0 / pi))

w, x, y, z = imu._current_gyro_only_q
#print("Gyro-only quaternion (%0.2f, %0.2f, %0.2f, %0.2f)" % (w, x, y, z))
yaw, pitch, roll = quaternion_to_euler_angles(w, x, y, z)
print("Gyro-only quaternion (%0.2f, %0.2f, %0.2f, %0.2f), "
"yaw %0.1f, pitch %0.2f, roll %0.1f (degrees)" % (w, x, y, z,
yaw * 180.0 / pi,
pitch * 180.0 / pi,
roll * 180.0 / pi))

w, x, y, z = imu.current_orientation_quaternion_mag_acc_only()
#print("Accel/Comp quaternion (%0.2f, %0.2f, %0.2f, %0.2f)" % (w, x, y, z))
yaw, pitch, roll = quaternion_to_euler_angles(w, x, y, z)
print("Accel/Comp quaternion (%0.2f, %0.2f, %0.2f, %0.2f), "
"yaw %0.1f, pitch %0.2f, roll %0.1f (degrees)" % (w, x, y, z,
yaw * 180.0 / pi,
pitch * 180.0 / pi,
roll * 180.0 / pi))
sleep(0.25)
except KeyboardInterrupt:
print()
pass
print("Done")
56 changes: 56 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Original Project

In 2014 or there abouts [Peter Cook](https://github.com/peterjc) put together an amzing little project.

[Blog Posts](http://astrobeano.blogspot.com/2014/01/instrumented-telescope-with-raspberry.html)

The idea was to use a Raspberry Pi and Gyro sensors to create a "Push To" style mount for his telescope.

>Instrumented Telescope with Raspberry Pi and orientation sensor
>A "Push To" telescope mount is like a fully automated "Go To" telescope mount, but without the motors. You must manually move the telescope, but because the >telescope knows where it is pointed, you get live tracking telling you where it needs to go.

Fast forward to 2022,
- the GY-80 module originally used is out of date.
- astropysics - a Python module used is no longer maintained
- SkySafari has a whole lot of new versions

This project is now an attempt to perseve the original hard work and begin to refactor the code. The needs I have are limited to the "Push To", image capturing and camera connection are not something I am focused on.

# Current Progress

- [Corrections to Date](results/corrections.md)
- [Open Items](results/todo.md)

# Sky Safari Plus

Testing in the original project was done in Sky Safari Plus 4.0, current testing is in Sky Safari Plus 7.0

Telescope usually setup as:

```
Scope Type: Meade LX-200 GPS
Mount Type: Equatorial Push-To (or any push to setting)
Auto-Detect SkyFi: Off
IP Address: That of the computer running this script (default 10.0.0.1)
Port Number: 4030 (default)
Set Time & Location: On (default is off)
Readout Rate: 4 per second (default)
Save Log File: Off (default)
```

# Protocol

[LX-200](https://www.meade.com/support/LX200CommandSet.pdf)

# Tools

In order to try and understand Latitude and Longitude, and how to convert that to degrees and then to radians

- [Decimal Degrees Units to Degrees, Minutes and Seconds Converter](https://www.engineeringtoolbox.com/latitude-longitude-d_1371.html)
- [Converting degrees to radians and vice versa](https://planetcalc.com/71/)

Example Greenwich
- 51.4934° N, 0.0098° E
- > Latitude : 51 deg 29 min 36.24 sec
> Longitude: 0 deg 0 min 35.28 sec
- Radians 0.898729 0.000171
Binary file added results/RPReplay_Final1643059606.MOV
Binary file not shown.
Loading