https://github.com/ericstoneking/42 Skip to content Navigation Menu Toggle navigation Sign in * Product + GitHub Copilot Write better code with AI + Security Find and fix vulnerabilities + Actions Automate any workflow + Codespaces Instant dev environments + Issues Plan and track work + Code Review Manage code changes + Discussions Collaborate outside of code + Code Search Find more, search less Explore + All features + Documentation + GitHub Skills + Blog * Solutions By company size + Enterprises + Small and medium teams + Startups By use case + DevSecOps + DevOps + CI/CD + View all use cases By industry + Healthcare + Financial services + Manufacturing + Government + View all industries View all solutions * Resources Topics + AI + DevOps + Security + Software Development + View all Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners + Executive Insights * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} ericstoneking / 42 Public * Notifications You must be signed in to change notification settings * Fork 82 * Star 310 Simulation for spacecraft attitude control system analysis and design 310 stars 82 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 43 * Pull requests 4 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights ericstoneking/42 master BranchesTags [ ] Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 113 Commits .github/workflows .github/ workflows Database Database Demo Demo Development Development Docs Docs InOut InOut Include Include Kit Kit License License Model Model MonteCarlo MonteCarlo Object Object Rx Rx Screenshots Screenshots Source Source Standalone Standalone Tx Tx Utilities Utilities World World .gitignore .gitignore Makefile Makefile README.md README.md README.txt README.txt View all files Repository files navigation * README 42 - Spacecraft Simulation 42 is a comprehensive general-purpose simulation of spacecraft attitude and orbit dynamics. Its primary purpose is to support design and validation of attitude control systems, from concept studies through integration and test. 42 accurately models multi-body spacecraft attitude dynamics (with rigid and/or flexible bodies), and both two-body and three-body orbital flight regimes, modelling environments from low Earth orbit to throughout the solar system. 42 simulates multiple spacecraft concurrently, facilitating studies of rendezvous, proximity operations, and precision formation flying. It also features visualization of spacecraft attitude. Features: * Multi-body dynamics (tree topology, rotational and/or translational joints) * Rigid and/or flexible bodies * Multiple spacecraft (prox ops, formation flying, or independent) * Inter-spacecraft and spacecraft-surface contact forces support landers, rovers, and spacecraft servicing scenarios * Two-body or three-body orbits, anywhere in the solar system * Optional visualization * Socket-based interprocess comm (IPC) interface to other apps * Fast setup for concept studies * Rigorous and full-featured to support full spacecraft life cycle Installation If you're installing on Windows, see the file "Install-msys.txt" in the Docs folder. The compiler will attempt to detect what platform you're on (Linux, OSX, or Msys), but its success rate isn't great. If you have errors on the first compile or run, try editing your Makefile to manually set your 42PLATFORM. For OpenGL graphics, newer Macs with Retina displays will need the GLFW graphics libraries, available from MacPorts, Homebrew, and probably elsewhere. Otherwise, you'll need the GLUT libraries, which are also readily available if not already installed on your system. Graphics are optional, settable in the Makefile by GUIFLAG. Getting Started See the overview, "42 Overview.pdf", in the Docs folder. Also recommended: * Nomenclature.pdf * POV Menu.pdf * Key Bindings.txt * FSW Models.pdf * Flight Regimes.pdf The default folder for inputs and outputs is "InOut". Look there for sample input files. "Inp_Sim.txt" is the top-level input file. The input/output folder may be changed for a sim run by running 42 with an argument. For example, enter this at the command prompt: 42 Demo Common Problems 1. 42 expects the input files to be plain vanilla text files. If your text editor adds formatting, makes straight quotes into smart quotes, etc, 42 may get confused. The most common symptom is generating the "Bogus input in DecodeString" error. 2. Also text-related, 42 is very simple-minded about reading the input files. Adding extra lines, or accidentally deleting a line, or swapping lines, will throw things out of synch. Again, the most common symptom is the "Bogus input in DecodeString" error. Use your debugger to trace back where the error was generated. (The actual mistake may be at that line, or may be somewhere upstream.) About Simulation for spacecraft attitude control system analysis and design Resources Readme Activity Stars 310 stars Watchers 36 watching Forks 82 forks Report repository Releases No releases published Packages 0 No packages published Contributors 3 * @ericstoneking ericstoneking Eric T. Stoneking * @ThatcherC ThatcherC Thatcher Chamberlin * @acxz acxz Akash Patel Languages * C 79.0% * C++ 11.4% * Python 2.2% * MATLAB 2.1% * GLSL 2.0% * Fortran 1.7% * Other 1.6% Footer (c) 2025 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.