AeroRust / WorkingGroup

Issues tracker for ideas, ongoing work, looking for mentors, mentors available. Join here!
39 stars 2 forks source link

CCSDS protocols overview #1

Open elpiel opened 4 years ago

elpiel commented 4 years ago

We are in need of a mentor!

CCSDS protocols overview

@MagixInTheAir expressed a desire to gather information about Consultative Committee for Space Data Systems (CCSDS) protocols as an overview for newcomers and a reference.

TBD:

  1. Where should we post this information (markdown in github, a blog like medium, ....)?
  2. .... ?

There is more TBD and comments are very welcome!

pwnorbitals commented 4 years ago

A Wiki could be interesting to regroup all the info. Further work will be to establish the Rust state-of-the-art for the CCSDS protocols, and maybe create a small team to build the missing essential crates

xadaemon commented 4 years ago

A wiki is a good format for us to share data, technical specs and the likes I agree with @MagixInTheAir and offering myself to help.

tyler124 commented 4 years ago

I'm currently working on a Rust implementation of the CFDP protocol. However, I was planning on it being proprietary (open to opinions on this). I'm a fan of open source and have some ideas on what could be best accomplished in that realm in regards to Rust and aerospace.

Initially, I think a great open-source contribution would be the development and stabilization of crates that replicate the behavior of commonly used crates and data structures, but removing any dynamic memory allocation (generally prohibited for any real-time system). An example of this would be the "arrayvec" crate which provides stack-only implementations of Vector and String collections.

nsmryan commented 4 years ago

I have a crate for the ccsds primary header (which could use some work to be honest...). The primary header is simple, but there is some discussion about how to write such crates that would be helpful: I agree with writing crates that do not have memory allocation, but perhaps even more contraints should be applied to crates intemded for aerospace applications.

pwnorbitals commented 4 years ago

I believe those crates are bound to be compiled for embedded targets, therefore constraints like no_std are probably needed

tyler124 commented 4 years ago

I'm somewhat ignorant on the subject, but isn't no_std only really necessary when writing kernel, firmware, or bootloader code? I'd like to see data on it, but I assume that even most CubeSats are at least running an operating system.

pwnorbitals commented 4 years ago

Embedded real time operating systems usually don't provide the full functionality that a "regular" OS provide (dynamic linking, file system support, ...), and I think it's safe to say that aerospace crates are going to be compiled alongside those RTOSes (RTOSes and the application code are often compiled once, together. RTOS with dynamic executable loading are far from the norm in critical systems, afaik).

pwnorbitals commented 4 years ago

@tyler124 Do you have good knowledge of the CCSDS standards and protocols ? Would you mind meeting on Discord to talk about this in a bit more detail ? I'd like to complete the Wiki

tyler124 commented 4 years ago

@MagixInTheAir From what I know, CCSDS standards are quite extensive. I'm only really familiar with the ones that I use at work which include CFDP (file transfer protocol for space) and the internal message bus used by NASA cFS. I'd be down to chat on Discord sometime, I'll try to be online most of the day tomorrow (Friday).

elpiel commented 3 years ago

@tyler124 do you have any updates on CFDP? I know that Libre Space Foundation is currently working on micropython implementation. I would love to get in touch with you and talk about the protocol in general (maybe your goals/ideas as well)

tyler124 commented 3 years ago

I did quite a bit of research into file transfer protocols for spacecraft last year. To summarize, I think you really only need something like CFDP for deep space systems. For anything in LEO, you'd be better off with FTP. It's a far more robust protocol and should be natively included in most kernels. Regarding Rust for aerospace, I'd focus on a "MVP" that people actually want to use for cubesats in LEO before worrying about deep space. Maybe have a branch of NASA's cFS that slowly starts to get ported to Rust, but still remains a fully functional C/Rust mixture? I think this follows how a lot of big tech companies have been integrating Rust into major products.

Definitely down to talk! Though focusing on interviewing right now so my open source contributions are going to be limited for a while haha.

MoralCode commented 3 years ago

dropping this here in case its helpful. it seems like a mostly-complete parser for the Space Packet Protocol. could probably be turned into its own crate https://github.com/kubos/kubos/blob/master/libs/comms-service/src/spacepacket.rs

MoralCode commented 3 years ago

Update: i made a crate for it and am now trying to debug it https://github.com/KubOS-Preservation-Group/ccsds-spacepacket

elpiel commented 3 years ago

Update: i made a crate for it and am now trying to debug it https://github.com/KubOS-Preservation-Group/ccsds-spacepacket

Thank you for sharing that @MoralCode! I will look around if anyone is interested to get into space protocols and contribute to he crate!

robamu commented 2 years ago

Hello,

I recently released our own CCSDS and ECSS packet protocol implementation crate: https://github.com/us-irs/spacepackets-rs

The feature set is still quite basic but I already used the ECSS PUS Telemetry and Telecommand Implementation to send a ping telecommand to a demo application and send back ping telemetry. It fully supports no_std environments and also is compatible with serde.

This crate will also be the foundation of a larger crate collection targeted towards building satellite or remote systems software in general, but that was not published yet.

I might also consider adding a Rust implementation of the CCSDS File Delivery Protocol (CFDP) packet stack in the future because all of the future missions at our institute have a file system in some shape or form.

elpiel commented 2 years ago

@robamu This is a great effort, thanks for sharing it! I'm very excited that some common protocols are finally being developed in the Rust ecosystem.

I would love to discuss if we have common ground to base future collaboration and the projects you're currently developing in the university.

PS: Feel invited to pop inside the AeroRust community Discord.

MoralCode commented 2 years ago

I recently released our own CCSDS and ECSS packet protocol implementation crate: https://github.com/us-irs/spacepackets-rs

you should consider getting this listed on https://areweinspaceyet.org/ and/or tagging it with the new aerospace tags on crates.io! Love to see more crates for this being created!