Skip to content
Miguel Nunes edited this page Jan 1, 2026 · 3 revisions

Introduction

COSMOS-core is a generic software framework primarily developed to operate small satellites. COSMOS-core can be used as the on-board flight software for CubeSats but also as the Ground Stations software and Mission Operations Centers. It can also be installed on UAV's or rovers and other unmanned systems. Written in C/C++ it can be installed on x86 or ARM processors such as the Raspberry Pi, BeagleBone board, Gumstix, ISISpace OBC, Unibap iX5, etc.

Documentation

Tutorials

Starting

  1. Installing Prerequisites
  2. Obtaining the Source Code

COSMOS Core – Coding Rules

Rule Reason
Always use std::abs (never bare abs). Prevents overload ambiguity between <cstdlib> and <cmath>, especially with Clang. Makes intent explicit and ensures portability across compilers and platforms.
Always cast explicitly when calling std::abs on non-plain int types. Fixed-width integers (int32_t, int64_t, uint8_t, etc.) and typedefs can trigger ambiguous overload resolution. Explicit casts document intent and avoid compiler-dependent behavior.

Example

// ❌ Not allowed
abs(face_idx);

// ✅ Required
std::abs(static_cast<int>(face_idx));

Clone this wiki locally