-
Notifications
You must be signed in to change notification settings - Fork 8
Home
Miguel Nunes edited this page Jan 1, 2026
·
3 revisions
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.
- To learn more about COSMOS and get installation steps go to (https://hsfl.github.io/cosmos-docs/
| 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. |
// ❌ Not allowed
abs(face_idx);
// ✅ Required
std::abs(static_cast<int>(face_idx));