Comments (5)
Your question made me realize I don't have the COSMOS-to-cFS command flow documented in a single concise place. Good topic for a future video! Hopefully I can string the pieces together in a meaningful way here.
-
Binary packets are transferred between COSMOS and KIT_CI (Command Ingest) which is an app running in the cFS. The term cFS is used to refer to all of the FSW running. The binary packet format is defined on slide 5 in the following Software Bus slides.
https://github.com/OpenSatKit/OpenSatKit/blob/master/cosmos/cfs_kit/tutorials/cfe/training/OSK-T02-1-cFE-SB.pdf
The same CCSDS packet format used between ground and flight is used onboard. -
The first 2 bytes of the message is the ID so in your example KIT_CI tried to interpret 'he' as the message ID which corresponds to the 0x6865 in the event message. 0x68 = ASCII 'h' and 0x65 = ASCII 'e'
-
COSMOS takes care of creating the binary command packet when you send a command from either a screen or from a COSMOS script that is run from the script runner or test runner tool. COSMOS creates the binary packet using the command definitions that are defined in "targets". Every FSW app has COSMOS target that defines the app's command and telemetry packets. For example the following directory contains KIT_CI's command and telemetry definitions: https://github.com/OpenSatKit/OpenSatKit/tree/master/cosmos/config/targets/KIT_CI/cmd_tlm
-
Here's KIT_CI's NOOP command in the COSMOS Command Sender tool. The CCSDS fields correspond to the diagram in the SB slides I mentioned above.
-
When you send a command the Command Sender captures the COSMOS script command which looks like this for the KIT_CI NOOP and this is the syntax a script can use.
cmd("KIT_CI NOOP with CCSDS_STREAMID 7936, CCSDS_SEQUENCE 49152, CCSDS_LENGTH 1, CCSDS_CHECKSUM 0, CCSDS_FUNCCODE 0") -
The Runtime Environment App video may also be helpful. It describes parts of this as well
https://www.youtube.com/watch?v=p3RrovUyLOs
Let me know if have more questions.
from opensatkit.
Thank you for the explanation. That helps clear up some of my confusion.
In number 5, when you mentioned "this is the syntax a script can can use." Which script are you referring to here?
Is there a way I can use the command below without having to do it through the GUI, but running it from a script instead?
cmd("KIT_CI NOOP with CCSDS_STREAMID 7936, CCSDS_SEQUENCE 49152, CCSDS_LENGTH 1, CCSDS_CHECKSUM 0, CCSDS_FUNCCODE 0")
Thank you
from opensatkit.
What I'm hoping to achieve is sending a command from my web application to cFS. I'm just not sure which would be the best way to do it. At first I thought I would be able to send a command directly to cFS through UDP socket but it seems that I still have to translate the command to binary CCSDS format, which is handled by COSMOS. I'm not looking to reproduce something that is already done by COSMOS, but I'm wondering if it will be possible for me to write a ruby script that utilizes some COSMOS libraries to create a binary command packet and send to cFS without having to use any GUI tool (e.g. script runner or test runner tool)?
from opensatkit.
COSMOS scripts are run in either the Script Runner or Test Runner. For now stick with Script Runner because Test Runner involves a framework that will be helpful when you're ready to write tests but it adds a layer you don't need yet. The COSMOS scriptng guide is at https://cosmosrb.com/docs/v4/scripting. COSMOS has added a lot of methods like cmd() on top of Ruby.
I started Sript Runner from the Launcher and pasted the KIT_CI NOOP command and hit start and it executed it. Ignore the yellow warning about bit definitions in the Script Runer output box, I'm working that issue.
Here's an example OSK script that demos some File Manager app features that you can run in Script Runner
As a heads up, OSK adds a thin layer on top of COSMOS's scripting API. For example the FM script contains lines like the one below. These run methods that do common processing like verify a valid command counter in telemetry after a command is sent. You don't have to use OSK's layer and the OSK/cosmos/lib code serves as the documentation at the moment.
Osk::flight.send_cmd("FM","SEND_DIR_PKT with DIRECTORY #{Osk::FLT_SRV_DIR}, DIR_LIST_OFFSET 0")
from opensatkit.
Hi David,
Thank you so much for your help. I have what I need now.
Thank you,
Pita
from opensatkit.
Related Issues (20)
- Connection refused when I add new SC HOT 2
- ruby Launcher HOT 4
- Issue with installing and running cFS HOT 3
- Error installing qtbindings HOT 1
- OSK-QS-Intro.pdf not found HOT 2
- OSK-QS-cFS-Eng.pdf not found HOT 2
- OSK_C_TUTOR - Undefined Method "fsw_name" HOT 10
- Outdated package key? HOT 1
- Housekeeping Telemetry packets are not populating HOT 2
- Ubuntu 20.04 Launcher error - cannot load such file
- Problems installing OSK? Do this instead! [no clickbait]
- Add license information HOT 2
- ruby Launcher libqtruby4shared.so : cannot open HOT 1
- Inquiry Regarding Lost Telemetry Data Packets
- JAVA ERROR не выводит игровую карту.
- RSS link broken HOT 1
- OpenSatKit Install Version
- Error when build cFS with new ' cFE App Dev Guide template ' applications HOT 4
- FM's SET_FILE_PERMISSIONS function code is incorrect
- Installation error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opensatkit.