Git Product home page Git Product logo

iss-mimic / mimic Goto Github PK

View Code? Open in Web Editor NEW
286.0 26.0 26.0 520.45 MB

We use the actual live data from the International Space Station to control a 3D-printed model that moves the solar arrays and radiators to track the real ISS in real time. We also host two pages that display ALL of the public ISS telemetry below::

Home Page: https://iss-mimic.github.io/Mimic/

License: MIT License

Python 52.79% JavaScript 1.02% Shell 1.33% C++ 16.23% kvlang 28.63%
python kivy iss space nasa arduino raspberry-pi lightstreamer telemetry 3d-printing

mimic's Introduction

License: MIT Contributors Discord GitHub last commit Twitter Follow YouTube Video Views

Welcome to the ISS Mimic project repository! We are developing a 3D printed model of the International Space Station that uses the actual ISS live telemetry to mimic the actual positioning of the ISS solar arrays and radiators! We are also developing tools to visualize all of the ISS public telemetry in informative ways! Join our discord to provide feedback, ask questions, or get involved!

https://discord.gg/zPKyE6hBSe

We are always looking for people to help with the coding of our raspberry pi telemetry display program, the telemetry website, the creation of ISS CAD models, general project ideas, etc...

If you want to build your own ISS Mimic, or just want to use the ISS telemetry in your own application, we are more than happy to help.

Check out our youtube video:

ISS MIMIC!

ISS MIMIC!

The International Space Station is constantly downlinking data (telemetry) for Mission Control to monitor. Several years ago, NASA provided some of the data to the public in order to spur interest in the ISS and space exploration under the (now defunct) ISSlive project using the lightstreamer service (http://demos.lightstreamer.com/ISSLive/). We saw this project and wanted to expand on its potential. Since the development of isslive.com, some more data was added to the public feed and was, sadly, never incorporated into the website. The current total epic and all inclusive list of public telemetry can be seen at our page here https://iss-mimic.github.io/Mimic/ and in an even cooler format here https://iss-mimic.github.io/Mimic/dashboard.html Sadly, ISSlive.com is no longer maintained, but thanks largely in part to our efforts, the telemetry is still being provided to the public through the same lightstreamer connection.

You can find info on installing our (still heavily in development but with some pretty cool working features now) custom ISS telemetry display program here: https://github.com/ISS-Mimic/Mimic/wiki/Build-Instruction%3A-Mimic-Software-Setup-Instructions

The telemetry is awesome in and of itself. But we wanted to do something more with the data, using it to drive software and hardware. Software - running a Raspberry Pi, we want to display all of the telemetry in an interesting and informative manner, enabling visualization of more than just boring numbers. Hardware - using Arduino related microcontrollers, receiving data from the Raspberry Pi, we want to control a 3D-printed model of the ISS and make it exactly match up with the actual ISS in real time. All of the solar arrays, radiators, and outboard truss will be able to rotate to match the ISS joint angles.

Stuff that moves

The project is still a work in progress. We have a fully functioning model that works with all 12 motors turning correctly and able to sync with live data. However, we want to increase the fidelity. Our low-fidelity model is completely finished and available here: STL Files. We are still working on the high fidelity upgrade (help us!) and trying to make the ISS look as detailed as possible while still being printable. The software is still a work in progress, too. But from the standpoint of receiving telemetry and transmitting it to the Arduinos, the basic functionality is finished. The finishing touches on the software are all for visualizing the telemetry.

Functional but not pretty model!

DISCLAIMER - We are not professional programmers. We are just a group of dedicated ISS program employees and enthusiasts trying to share our love of the space program through this awesome project. All the code maintained here was created to work toward our specific goal, and much of it was using languages that none of us had used before. You may find the structure, style, and lack of comments to be completely novice and infuriating. You may scream out in frustration, laugh in disgust, or even weep at the obfuscated nonsense appearing before your eyes.

That said, feel free to improve upon our caffeine-induced, late-night, insanity-plagued programming madness or even just scrap it all and make something better using our ideas.

Check out the wiki for more information.

You can view a video showing some of our project here:https://youtu.be/W9iZBjzOEEQ. Here's an older video: https://www.youtube.com/watch?v=sbdHXjDQ-U8 .

The software is pretty cool and provides even more in-depth functionality than isslive.com. We'll be adding videos and pictures soon to show off the software capabilities.

Status/Priorities

We are currently focused on refining the CAD model and splitting out all the STL files for printing. All of the STL files currently in this repo are likely outdated or currently changing. We will also release the raw CAD once finished.

We are also working on finishing the software.

mimic's People

Contributors

cactus314 avatar dallasbrittany avatar digisembler avatar godspeeddiscvry avatar herculesferrari avatar iss-mimic avatar juggler2000 avatar kariton avatar kosmicfly avatar spacetowel avatar streadgold avatar swglasspit avatar thomasbassa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mimic's Issues

Make GUI screen size independent

Currently the GUI is explicitly designed for the raspberry pi official touchscreen (though as of now all layouts are based on screen width - so it should mostly maintain positioning regardless of screen size). This could be significantly improved though.

Predict upcoming LOS

Using SGANT elevation telemetry and/or GPS coords of ISS, add message to GUI user predicting an upcoming Loss of Signal. Would be a cool/possibly easy enhancement

Arduino Due has pansy pull-up resistors, causes interrupt woes. Solve with more resistors.

Arduino Due has a plethora of pins available for interrupts -- any digital pin, actually. It is recommended to avoid pin 13 since it's tied to an LED, but still, 53 pins.

Initial attempts to read encoder pulses as interrupts failed completely. Typically, nothing at all happened. Some web searches indicated that there is a known issue with the Due, where it's internal pull-up resistors are 100K-Ohm. This leads to little sensitivity to an encoder pulse. The reported solution is to use an (external) 2.2K-Ohm resistor tied to 3.3v as a pull-up resistor. Tests show that this works super-fantastically, at least for two motors (with to interrupts each).

The best-case scenario yields using a total of 20 pins for interrupts. This is two for each DC motor (8 BGA, 2 SARJ).

Will update issue once tested with more channels.

Send twitter + web scraping to background thread

The beautiful soup python web scraping library is great but reallllllyyyyyy slow. When scraping is triggering by the EVA page (due to tweet that contains EVA BEGINS and two crewmember twitter handles) the kivy processing freezes for ~10s waiting for the web parsing to complete. Need to determine how to send this stuff to the background thread so that kivy can keep doing whatever instead of waiting on this routine to complete

Finish Orbit Screen

  • Add orbit ground track to map image
  • Add daily orbit count
  • Add total orbit count
  • Fix TLE fetching
  • Add countdown till next pass
  • Add detection of visible passes
  • add visible pass data
  • add night region
  • Add orbital elements
  • Add ISS tle
  • Add GMT time
  • Add pass calculations (require location input)
  • Add 3d

Demo Orbit

Create a minute-orbit (or longer, check motor specs). All joints simulate an entire orbit over the span of one minute.

Mimic Screen - Notify of Events by flashing appropriate button

From main Mimic (ISS home) screen - if an event is occuring (Soyuz/Progress docking, EVA) it might be good to "flash" the Russian screen button or EVA button etc and alert user than more info is available on that screen

  • GNC Screen - Flash for Attitude Maneuver or CMG Problem

  • EVA Screen - Flash for US EVA

  • EVA Screen - Flash for RS EVA (no idea how to determine, maybe ISS is in EVA mode and we can rule out robotics somehow?)

Add main EVA page

Add the default EVA landing page (not US or RS specific). Add generic EVA info, airlock pictures. Add buttons to go to the Russian or US EVA page, and also make those buttons flash if EVA in progress.

Enough Interrupts on Arduino Mega?

Each DC motor we are using has a magnetic encoder -- a magnet fixed to the motor shaft rotates past a hall-effect sensor, which generates a short voltage pulse. To ensure every pulse is counted (and we keep track of where we are), interrupts are used which pause the running code on the Arduino and increment the count.

The Mega has 6 Hardware interrupts. We'll need a total of 10 interrupts (8 for BGAs, 2 for SARJs). Perhaps "software interrupts" can work, or we can have some shared hardware interrupts perhaps.

Specs on Mega: https://www.arduino.cc/en/Main/arduinoBoardMega

May want autotuning of motor PID settings

Low priority item, might be superfluous.

Expect some variation motor-to-motor due to gearbox differences, alignment variability, etc. Autotuning might be a convenient way to choose PID params for each motor. For the BGAs, the resulting values would likely vary dependent on SARJ angle due to gravity. If arrays are vertical, the moment on the gearbox will be very low and P, I coeffs would likely be small, while D might be larger compared to when arrays are horizontal. So, might have to sweep SARJ angle while tuning BGAs.

This might be more trouble than it's worth, but we can investigate. Gearbox will provide a lot of mechanical damping, and code latency may dominate response bandwidth more than mechanical system.

Get bio photos of Crewmembers

A few problems with this - should be easy but really isn't.

Option 1 - use image url provided by peopleinspace api. This does not seem to work though - perhaps they don't allow hotlinking?

Option 2 - use wikipedia astronaut image
- the image url works fine and wikipedia actually does allow hotlinking
- problem is that I don't see a good way to determine the correct image url. wikipedia api returns all image urls on an article, but it is not consistent or obvious which image url is the one I want

Option 3 - other image source?

Change main screen animation from clock event to actual animation? (or unschedule)

Might be better to have the orbiting ISS icon on the main screen be an animation object rather than a moving clock event thing (not sure if animation if better).

If it remains a clock event, it might be good to unschedule the event when not on the main screen (currently the animation keeps going even when the user is on a different screen). This might reduce lag.

Or just move animations to a background thread if I ever figure out how to do that.

EVA problems

Lag noticed ~every second on EPS animations during EVA in progress

Weird white rectangle displayed over EVA crew pictures

Also EVA timer is wrong

Fix Desktop Icon

Desktop Icon crashes due to some problem with the twitter keys

Add settings screen to GUI

Add settings button to main GUI screen. Options could include - metric/english, user location (for ISS pass alerts), and other stuff (error logging, etc).

Complete Javascript Integration

  • Add buttons to start JS and stop it
  • Add SQL call upon app exit to reset AOS to 0 so app starts with signal lost
  • Use subprocess communication to retrieve JS console output and display within GUI

Animations freaking out

Solar array animations completely black out occasionally. Only happens after certain amount of time running? Maybe happened to the ISS signal status icon also once

Adafruit Motor Driver v2.3 requires logic jumper change to work with Due (3.3v)

The Arduino Due functions on 3.3v logic. The Adafruit Motor Driver Shield v2.3 runs at 5v logic by default, but can be configured to use 3.3 volt by cutting a trace on the board and adding a solder jumper.

As of today (Oct 28, 2017) this link is quite dated, referring to a 1.5.6 version of Arduino. It's assumed the logic/jumper information still applies: https://learn.adafruit.com/adafruit-motor-shield-v2-for-arduino?view=all

"For use with the Due or other 3.3v processors, you must configure the board for 3.3v logic levels. Find the set of 3 pads labeled "Logic". Cut the small trace between the center pad and 5v and add a jumper from 3.3v to the center"

Arduino loop time toggles between 7 and 615ms

For some reason, the Arduino Loop time (start to finish within loop function) is either 7ms (yea!) or 615 ms (boo) with no known cause. It's never anything in between. It doesn't seem to matter if the motor shield is powered externally or not.

I couldn't find any floating ground or other impropriety. There doesn't seem to be anything in the loop that would cause the system to wait for anything. Serial comm with PC is at high rate (115k).

Hitting the reset button seems to eventually put it into the slower state. Sometimes, unplugging and re-plugging the USB from the PC gets you back to the fast mode.

My only thought would be something with the interrupts, or perhaps demon possession.

Here's an example of it going from swell to hell. All I did was press the reset button on the motor shield. The serial output says "Motor test" a that point. The last value on each line is the loop duration, in ms. It's also obvious from the rate of serial prints to the screen that it's taking much longer.

190.00,32.40,250,6714.67|,190.00,33.40,250,3540.57, deltaT:7
190.00,33.20,250,6690.51|,190.00,34.00,250,3536.37, deltaT:7
190.00,34.00,250,6666.31|,190.00,34.80,250,3528.13, deltaT:7
190.00,34.80,250,6642.07|,190.00,35.60,250,3519.85, deltaT:7
190.00,35.40,250,6625.80|,190.00,36.40,250,3511.53, deltaT:7
190.00,36.20,250,6601.49|,190.00,37.20,250,3503.17, ⸮Motor test!
190.00,143.20,250,1872.00|,190.00,139.20,250,1016.00, deltaT:617
190.00,191.40,55,-56.00|,190.00,186.20,87,87.78, deltaT:616
190.00,239.40,250,-2128.89|,190.00,233.20,250,-864.00, deltaT:616
190.00,288.00,250,-4376.20|,190.00,279.80,250,-2073.93, deltaT:616
190.00,336.60,250,-6773.93|,190.00,326.40,250,-3428.09, deltaT:616
190.00,374.00,250,-8839.41|,190.00,360.40,250,-4635.48, deltaT:615
190.00,380.20,250,-9675.13|,190.00,365.00,250,-5268.23, deltaT:616

Convert buttons to graphics

Most GUI buttons are still the basic kivy widgets, need to replace them with custom graphics that have depth and can be depressed (replaced with depressed button graphic on_press)

Add EVA Info Screen

Add second screen to the US EVA page with a procedure checklist and maybe the pressure profile. Also add text descriptions of procedure events (prebreath, ISLE). Add all interesting airlock telemetry too.

Change all telemetry value colors to global variable

Instead of tediously changing every instance of every telemetry value to a different color on every screen every time the signal status changes - how about using a variable?

kind of exactly the reason variables exist...

Expected fight between LED's and interrupts -> Undetected joint angle error

The LED libraries (both Adafruits and FastLED) temporarily disable interrupts when sending commands to the LED strips. This is because the timing on the embedded control chips is very sensitive.

The potential issue is that we could miss some encoder-provoked interrupts while transmitting to the LEDs, meaning we could miss some encoder counts. This would cause us to rotate the motors further than desired, and never know it.

It's not a big problem in the near-term, as the error would likely be small (although it would accumulate), particularly if we don't update the LED commands very often.

Potential solutions:

  1. Command all motors to stop, and wait for them to do so, prior to updating the LEDs. This is only feasible if we would rarely update the LEDs.
  2. Estimate how much we have traveled while the interrupts were disabled based on the speed command, and update our counts accordingly.
  3. Offload the actual commanding of LED's to a secondary arduino, dedicated to sending only LED commands. This would require some kind of communication between the primary (Mega) and secondary. Fortunately, the Mega has an unused hardware serial that could be used for this (or software serial or other protocol on other pins). But this would add complexity to it all.
  4. If we do get some kind of auto-calibration going, this could update joint angles as needed. This means we'd be "wrong" most of the time, and only "right" immediately after calibration. Our current calibration plan would only work when the SARJ is at one of two angles, and may require BGA's to be at particular angles as well. So this calibration would be either infrequent or we'd have to think of an alternative approach.

Make code occasionally check for serial connections

Code should continuously poll for serial devices attached - so it can handle attaching the devices after program begins. Also need to catch any errors if an attached serial device is detached while the program is running

Launching Javascript from inside Python App

Got the telemetry subscription js program running as a nonblocking subprocess within the python GUI with subprocess Popen and that works great but the program can't exit without closing the subprocess and nothing is working to kill the subprocess. Tried p.kill() might not be invoking it correctly from within kivy.

Add increment option to Control Screen

Allow user to select custom increment size for manual control - so each triangle button increments the motor angle by that custom amount (right now only increments 1deg). But not too much - add check (or speed safety control) so this won't break anything.

GUI gets super laggy during EVA

Entire program gets very laggy during EVA. Probably due to the high number of scheduled tasks.

Find way to send EVA timer and hold timer to background.

I guess this is the same issue as #21

URLopen crash

Line 1392, crashed getting TLE problem with urlopen

My guess is that the internet was down or the webpage timed out and that isn't handled in the code

EVA URL Scraping Surname Problems

Need exact surname value to find html tag from beautiful soup - "Vande Hei" rather than just "Hei". Not sure how to solve. Need to search within tag text.

Fix issue where Lightstreamer does not notify loss of signal

Sometimes lightstreamer does not change TIME00001 status from 24 when signal is not live, so all our code continues to think data is live when it is not.

Probable solution: get last good timestamp from data value and compare to actual time

URL exception catching issues

Calling the URL open function directly usually works but can throw an exception which will crash the program. However when I attempt to implement a try-except block it ~never successfully calls the URL open function. Not sure what's going on there.

Remove all twitter functionality?

With iss101 ceasing all twitter updates, we lost our main EVA info source.

Due to that I think we should just remove all twitter functionality. Would make the code simpler, and we would no longer require every user to sign up for a twitter developer account which quite frankly is not very simple and probably a bit too much work to ask from all of our users. Also a pain to maintain that functionality.

Thoughts? Still hoping we can find a web source to scrape some kind of EVA status info from.

Finish EVA functionality

Hard to uniquely identify which stage of the EVA procedure is occurring, especially if the program launches after the procedure begins.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.