Giter VIP home page Giter VIP logo

spel-uchile / suchai-flight-software Goto Github PK

View Code? Open in Web Editor NEW
39.0 21.0 18.0 2.95 MB

THIS REPOSITORY HAS BEEN MOVED TO GITLAB

Home Page: https://gitlab.com/spel-uchile/suchai-flight-software

License: GNU General Public License v3.0

C 85.13% CMake 2.41% Shell 1.48% Python 8.94% Smalltalk 0.33% Makefile 1.29% Assembly 0.41%
flight-software cubesat gplv3 freertos flight zmq nanosatellite

suchai-flight-software's Introduction

Nanosatellite Flight Software

โ— IMPORTANT NOTE: This repository has been moved to GitLab

Build Status GitHub tag license

SUCHAI Flight software was originally developed to be used in the SUCHAI nanosatellite (1U CubeSat). SUCHAI was launch into orbit in June 2017 and has been working properly.

The main idea was to design a highly modular and extensible flight software architecture to help the development of CubeSats projects that are composed by large and heterogeneous teams. Provides a ready-to-use nanosatellite flight software, a flexible way to add/remove functionalities or paylodads, and supports an incremental development.

The software architecture is based on the command processor design pattern. Developers can extend the functionalities by adding new commands to the system (with low impact in the whole software) or adding new clients that can request any of the available commands depending on their custom control strategy. Commands and control modules can be added or removed with zero impact in the software main functionalities. Once a command is implemented, it can be used in the software itself and also as a telecommand.

Current implementation uses the LibCSP to communicate subsytems and the ground station. Linux port can use the LibCSP with ZMQ interface.

Visit http://spel.ing.uchile.cl to get latest news about SUCHAI project. Visit http://www.freertos.org/ to get FreeRTOS source code and documentation. Visit https://github.com/libcsp/libcsp to get the latest version of the LibCSP.

More:

Key features

  • Highly extensible and modular command processor architecture.
  • Ported to FreeRTOS and Linux.
  • Designed for medium-range microcontrollers such as ATMEL AVR32, Espressif ESP32.
  • Ported and tested on Raspberry PI.
  • Can be used as Flight Software, Ground Station Software or general purpose embedded system firmware.
  • Flight inheritance: SUCHAI I (Jun 2017)

Build status

Last architecture extracted

Build notes

SUCHAI flight software was designed to run in multiple embedded architectures using FreeRTOS. It was also ported to Linux to facilitate the development and debugging. Currently, it has been tested in the following OS/Architectures:

  • Ubuntu 18.04, 20.04 (x86_64)
  • ArchLinux, Manjaro Linux (x86_64)
  • Raspbian 9 Stretch, 10 Buster (RPi 3, 3+, 4, ZeroW)
  • FreeRTOS (ESP32, Nanomind A3200 AVR32UC3)

Linux build

Requirements

Linux's installation requires the following libraries:

Library name Ubuntu and family Archlinux and family
cmake >= 3.16 cmake cmake
gcc >= 7.5 gcc gcc
make >= 4.1 make make
python2 >= 2.7.17 python python2
zmq >= 4.2.5 libzmq3-dev zeromq
pkg-config >= 0.29.1 pkg-config pkgconf
(opt) sqlite >= 3.22 libsqlite3-dev sqlite
(opt) libpq >= 10.17 libpq-dev libpq-dev
(opt) cunit >= 2.1.3 libcunit1-dev postgresql

Clone

Clone this repository

git clone https://gitlab.com/spel-uchile/suchai-flight-software.git
cd suchai-flight-software

Build

Use the cmake to easily install internal dependencies, create the settings header include/config.h and build the example app in apps/simple:

cmake -B build
cmake --build build

Use the -DAPP option to build another app inside the apps directory

cmake -B build -DAPP=simple
cmake --build build

Use -HL or check include/config.h.in to learn how to customize the build. Pass arguments with -D option. For example, select the log level and the storage mode with -DSCH_LOG and -DSCH_ST_MODE

cmake -B build -HL
cmake -B build -DSCH_LOG=INFO -DSCH_ST_MODE=SQLITE
cmake --build build

Run

Go to the app build folder ex: cd build/apps/simple and execute

cd build/apps/simple
./suchai-app

The output should be similar to

[INFO ][1625522858][Console] 
______________________________________________________________________________
                     ___ _   _  ___ _  _   _   ___ 
                    / __| | | |/ __| || | /_\ |_ _|
                    \__ \ |_| | (__| __ |/ _ \ | | 
                    |___/\___/ \___|_||_/_/ \_\___|
______________________________________________________________________________


[INFO ][1625522858][FlightPlan] Started
[INFO ][1625522858][Communications] Started
SUCHAI>

Type help to see the list of commands. Type \exit to exit the software.

Using ZMQ interface

In Linux, LibCSP uses the ZMQ interface to communicate different nodes. To pass messages between zmq_hub interfaces, we required a ZMQ Forwarder Device (Proxy) running in background. To start the ZMQ Forwarder server:

cd sandbox/csp_zmq
python3 zmqhub.py

It is possible to change the default ports (8001, 8002) and activate a monitor socket (8003) that will print all messages to stout using:

cd sandbox/csp_zmq
python3 zmqhub.py [-h] [-i IN_PORT] [-o OUT_PORT] [-m MON_PORT] [--mon] [--con]

A test ZMQ CSP Node is also available as an example, so it is possible to test the communication between the node and the SUCHAI Flight Software. Run the example node zmqnode.py using:

cd sandbox/csp_zmq
python3 zmqnode.py

Default parameters should work directly, but it is possible to set the ports and zmqhub.py ip address to connect to remote nodes through TCP/IP.

cd sandbox/csp_zmq
python3 zmqnode.py [-n NODE] [-d IP] [-i IN_PORT] [-o OUT_PORT] [--nmon] [--ncon]

Now you can try to send a command to the Flight Software from the example ZMQ CSP Node, for example the com_ping to the node 1 (Flight Software node) on port 10 (csp ping).

cd sandbox/csp_zmq
python3 zmqnode.py 
Namespace(in_port='8001', ip='localhost', ncon=True, nmon=True, node=9, out_port='8002')
Reader started!
Writer started!
<node> <port> <message>: 1 10 com_ping
<node> <port> <message>: b'\x00\xca\x9d\x82'
829dca00
2191378944
Header S 1, D 9, Dp 55, Sp 10, Pr 2, HMAC False XTEA False RDP False CRC32 False
b'\xc8' S 1, D 9, Dp 55, Sp 10, Pr 2, HMAC False XTEA False RDP False CRC32 False

Refs:

Build for other architectures

Currently the flight software supports the following architectures (some platforms may have limited or under development support):

First install the drivers for the desired architecture python3 compile.py <OS> <ARCH> --drivers

  • Nanomind A3200: python3 compile.py FREERTOS NANOMIND
  • Atmel AV32UC3 Xplained board: python3 compile.py FREERTOS AVR32 --comm 0
  • Raspberry Pi: python3 compile.py LINUX RPI
  • Esspressif ESP32: python3 compile.py FREERTOS ESP32 --comm 0 --fp 0 --hk 0 --st_mode 0

Please refer to the documentation for more details

How to cite

Plain text

C. E. Gonzalez, C. J. Rojas, A. Bergel and M. A. Diaz, "An architecture-tracking approach to evaluate a modular and extensible flight software for CubeSat nanosatellites," in IEEE Access.
doi: 10.1109/ACCESS.2019.2927931
keywords: {cubesat;embedded software;flight software;nanosatellites;software architecture;software quality;software visualization;open source},
URL: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=8758807&isnumber=6514899

Bibtex

@article{gonzalez2019, 
author={C. E. {Gonzalez} and C. J. {Rojas} and A. {Bergel} and M. A. {Diaz}}, 
journal={IEEE Access}, 
title={An architecture-tracking approach to evaluate a modular and extensible flight software for CubeSat nanosatellites}, 
year={2019}, 
volume={}, 
number={}, 
pages={1-1}, 
keywords={cubesat;embedded software;flight software;nanosatellites;software architecture;software quality;software visualization;open source}, 
doi={10.1109/ACCESS.2019.2927931}, 
ISSN={2169-3536}, 
month={},}

Contact

issue tracker Use the issue tracker to submit questions, requirements and bugs.

SPEL Team the SPEL team at Twitter to get latest news about the SUCHAI project

suchai-flight-software's People

Contributors

carlgonz avatar eliasobreque avatar gdiazh avatar gedoix avatar grynn01 avatar iibanez avatar javier-op avatar keimi avatar matvidal avatar mschi182 avatar riul1999 avatar samuel-gutierrez avatar sanhuezafce avatar sofiabobadilla avatar spelsever avatar tami2293 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

Watchers

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

suchai-flight-software's Issues

Sequence of 5 commands throws exit code -11

The sequence is:

tm_parse_status 168850784532074374035732101058055169116 12826105913956939644 E0@2Ni*@ -162817515606114395225612514469063087299 -48916261179497125227303848440736194118 -6386859017823808887 r@F5uu -8152784359493193565
gssb_set_burn_config -285600039855062482800991264458719794343 -3143019222374379877 10778628039574652351 -219709885077994447318495468478095151127 FZG -322088856487707042825536300309208787826 w
drp_set_deployed
fp_del_cmd_unix ^TyCU& -243018170100445935 "4n3Kr/hr 80211873877148678249755549121640936724 1175049179
com_get_config h -7060649124262353519 2063750755

Sequence of commands throws exit code -11

The sequence of commands is:
"fp_set_cmd_dt"

"gssb_scan 1570809601 -502724551 -207689967522053560240006486440210879011 -1906221885054151582 -2017574192 -26771786396317915425903150388096251942 4076499320741445102 7751495610295036243 -828631144"

"tm_send_all 436627662453843063 -2687033829345982241 13997518759513266973 14674935186524010863 -1534739514519453045 807879254 1164247519092420432 7051323479983469592 503201991 -1550152233"

drp_test_system_vars"

"gssb_set_burn_config -6690146220262749044 -777747710 79357889134942078670306964600107774866 630392312 9084461947661266482 s]FF|D -262362310400266692 8945187735004609119 8533449279143882221 109835432170862106180712269844526604466 1816906110"

"obc_debug -6299584703222430305 2(a@ -281698357 7659775534121710382 77043071182138059272694242900654827657 -5052480249634489692 -1130892461 170416894928981539923668082548937661336"

"obc_set_pwm_duty -157642089"

"drp_test_system_vars 259674816464209894511136752048128058138 94162125089387586442163899335397856434 O^7/'{T -7382787234533512311 +)p"

"gssb_antenna_release 981198085 2211974669360261098"

"rw_get_speed -321378747606318608625622217834816028283 \ -2083678030"

Sequence of commands throws exit -11

The sequence of commands is:

"gssb_pwr -3939704102564418991 5869781495315577964 4 7253250973193467282 72641676938523946195919586611020448663 92095852830421742"

"obc_get_tle 16793979699593080985 17857068573924393177 10322398680214003687 Or_J&* 192257590 250513719604684287491227831468642555152 7894739251394641014 8707923985211518596 A'k;H"

"obc_get_tle params": "2004194787"

"drp_add_hrs_alive 3127852952733958122 9391651738274219152 -979119932 7231170491688674323 -489433029 4482114832065666601 63388019059325091875233039272059300098 "

"obc_set_tle 14411003027049097651 C== 2344406868469659858"

"com_send_tc 314106718 EH8 -1694651545 7341018154555866319 -4882686391962200564 775208981"

"com_set_node -1865028106 1687056686716975758 -3538630954116661940 867883283 l0Y99yH\vi 643596633 5388925920445264797 -84075540 2857361756551372032"

"fp_test_params"

"fp_del_cmd_unix 6442240141094730330 7545538707934846397"

"fp_reset V2% -280075423304112696701987095457908484966 -49831311687398385273978517385574318196 48478279 1031446878426546993 10079855211877668909 4151605445481177871 350623479 334702254052999802426606103352297202003"

Sequence of 5 commands throws exit code -11

Sequence of commands is:

"gssb_reset -162235413443821623 8736244940626816304"

"obc_set_tle"

"obc_set_pwm_freq",

"gssb_get_version 4900349466271317223 "zjef Z9rF 1002738577 271451416 558282791 5023020593747579306 -37767479446758962465613594881978750570"

"test -873305648 -1034835497 112491808494696360044992285786311589539 -277877143"

Sequence of 5 commands throws exit code -6

The sequence of commands is:

fp_set_cmd_dt 10685766673932084438 316562296480678074322945892569819525176 -4706376058693988141 7895821880778207496 -216861335064999293075164844188354471002 7h -97218791981793025508575714833254546993

fp_del_cmd_unix 4145431447295472417 167814994569696459750664963254211943804 -160401535533694550832784241146563695751 14409585826784860364 -396152628868124769 -3613327155379350658

drp_set_var -2912397551469654202

obc_set_tle -9172355177681338773 124981537113928098429509642876753256459

eps_update_status 9B 4286779939540587736 5979805617969048743 -197375177450351726114189881962650158786 3269297781262208496

Sequence of 5 commands throws exit code -6

Sequence of commands is:

"tm_send_status -68701354"

"gssb_fss_get_sun 1288652323 Q 318962519325648401710290741580484028254 qE> 191540444421703305155645509042680402008 293705463288891552935045227601980042940 lpXj%A"

"com_reset_wdt 220718549516542030809205637483749600022 S 8847751712903538989 1165047287025277169 116289922971744243240431336871985501853 XI8OM 11670134208106239312 957776749 -1152373505"

"obc_get_time 30255627979779820292641854784812129487 (+ -27986165 -1144688216315706797 12498981589249031195 6840991733966923125 533148472 275102807868824157469835407700679643809 -100606505655366270632002058811612127353 1605865303"

"gssb_get_sun 1543856412575773972 8908007516411552305 2546419596703022958 15454304195786738286627236972982390297 10825290333211387467 5640292223231509688"

Sequence of commands throws exit code -11

The sequence of commands is:

"gssb_update_status 13114707873100699871 -1295122392656799462"

"drp_set_deployed -2839240284063128215 8854960178993842277 8278393466535547529 /C`\oT1 -1688772934 4638960282771722547"

"com_get_node 690890402 -1565196126828933738 690661039 1947986788 -28411077913503982526933255228876678809 18402930521369763437 107481891138607206184721761500359311065 -45906536080829042733208746669796909165 -4108173749987309422"

"tm_get_last -164040754 8282436447999562153 BY$)<06z 3520503035377478554 16631784210685291956 -1288817755"

"gssb_get_burn_config 1906463276918721798 !.#g8I<e -306097513196705264343419776659548199256 3291758091439764070"

"gssb_fss_get_sun 17793172483358541992 1748609753 326575974013180645350250924784747378043 151787458383796402521519864535358394749 -312425636343172857691655136058123360667 1986755151"

"tm_send_from 60m.;IY7 -5928446198366387529 8738488433362938232 $D$ 2910308660931216136 -5727870536230084230 +?,Mz:6n -7701572424650857009"

"fp_set_cmd_unix"

"drp_add_hrs_alive 10986626793187991348"

"eps_get_hk"

Sequence of 5 commands throws exit code -11

The sequence is:

gssb_scan -2110280802362568495 1381875143260985219 110452449716733463724627601247698298760 sQ| -43440911163844475771688937364413356453 PXD7,S"<>
obc_ident -259073815535013427331144113073405393202
fp_del_cmd
gssb_msp_get_temp -146826490 -53227423718077 7729595554257556250 1606778943 jxBo29"t !,#S5+s' -199843053958632832766255511922795698899
gssb_antenna_release 5101762581718345517 6709301450416865821 7680068895152077360 7654387271614045144 101329204992396973158448339507572123484

Sequence of 5 commands throws exit code -11

The sequence of commands is:

obc_set_pwm_duty 18221623561739586533 8731242133605340464 16751745491882990990

set_state 5008842613955793048 11913439593305283187 9667569828325268691 m -862888146917974231 499172246 -274721835882903595804130858020128974265 442332804268056516 1570747869623505808 3869701252845365712

obc_set_pwm_duty 420420830 3303051807172582988 16461879370529141336 267442982521426175410696173961471788718 -2712645606071996258

fp_del_cmd_unix

gssb_arm_auto u_ -3552896448412383464 592142547 4378478481738076541 -1015403806 1865705502

Sequence of 5 commands throws exit code -6

The sequence is:

com_send_tc -2016134195 2933613756462766678 3829660254495945630 9892550684126858924 -370022029 247624907990293865567540788278104003046 -981886501434924297 2281101741481345098
gssb_fss_commit_config 15670767676204863412 -112385675305236296859730417207647639208 ~Al -298782226381617367579460469939466726643 -1329404391125174631 6099824550254041059 1679516747 5215813735733266533 W<
gssb_arm_auto -38194404 -1656682779 130060935560650123078829178699809027242 <-z
gssb_get_burn_config
com_send_tc -5076181772921582833

Sequence of commands throws exit code -11

The sequence of commands is:

"fp_reset 1021463177 -5320402784844063955 -1606866196 277232024 9089134029674669343 8217340274238680791 -135979014"

"gssb_arm_auto 2610565815066700675 -30035499816372985238471947786909003184"

"rw_set_speed L!tbhgkT{ 7982946915931094536 12295296398082041365450938421476112832 tvGD(A= -1051911532"

"gssb_arm_manual 252045315478401006267650357516397858676 1414625747532590887 141785527721912545466387656586828862052 11075365681726051105"

"fp_set_cmd_dt 8491608756322007804 5738581701507994598 -278725552406922882104697024257626081425 10907446217861268816 11814953139839873380 -835344384 1409097552 -1863829533675351479 1533926432"

"eps_hard_reset 8005570532855740608 4489326368079561463"

"gssb_update_status 14112042645500862211 2449798175984001236 @& 834874357 10352207280021978328 16787595283797129712 -288922013758665095417106619462985232565 4542339945640453723"

"tm_send_all 183021380251465014541381338183037095082 8465952388666631162 352763092843062734"

"fp_set_cmd"

"com_ping -1254676991 -4088914682101012663"

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.