Palantíri (Quenya plural of Palantír, “far-seer”) is a Python-based Software-in-the-Loop (SIL) simulation framework developed to emulate the backend system provided by ESA for CIARC 2024/25.
The framework simulates MELVIN’s internal state and trajectory, and enables both control and observation of the simulation via API endpoints built with Flask. In addition, it accurately models beacons and zones—both known and secret—along with their dynamic states.
- 🛰️ Accurate CIARC simulation physics modeling
- 🌐 REST API for observation and control of MELVIN satellite
- ⏰️ Time-aware simulation with custom clock
- 🔊 Real-time SSE (Server-Sent Events) for beacon pings
- 🎯 Objective management: zoned & beacon-based
- ⚡ Lightweight Flask backend for easy integration with external systems
src/
├── __main__.py # Entry point for simulation
├── app/
│ ├── models/ # models for MEVLVN stats and objective management
│ │ ├── melvin.p
│ │ ├── obj_manager.py
│ │ ├── obj_zoned.py
│ │ ├── obj_beacon.py
│ ├── routes/ # Flask blueprints
│ ├── helpers.py # Vector math, constraints, validation
│ ├── constants.py
│ └── sim_clock.py
melvin.py: Simulates satellite movement, enforcing acceleration constraints, velocity bounds, and fuel consumption. Can receive target velocity and gradually apply it in validated steps.obj_manager.py: Simulates backend behavior in objective management for both beacon and zoned obj
GET /announcements: SSE stream emitting beacon pingsPUT /beacon: Submission of Beacon Position estimatePUT /control: Command a new target velocity and camera stateGET|PUT|DELETE /objective: Manage objectives manually or randomlyGET /observation: Returns MELVIN’s current telemetryGET /reset: Resets simlulation
-
Clone the repo
git clone https://github.com/CIARC-CUIYC/Palantiri.git cd Palantiri -
Create and activate virtual environment
python3.11 -m venv .venv source .venv/bin/activate -
Install palantiri dependencies
pip install -r requirements.txt
-
Run the simulation
python -m src
Differing from the PUT command at the /objective endpoint of the actual CIARC backend that commanding of the Palantiri endpoint differs slightly
{
"num_random_zoned": 0, // required field
"num_random_beacon": 0, // required field
"zoned_objectives": [ // optional field, [] if empty
{
"id": 1,
"name": "Precise Picture 10",
"start": "2025-03-29T12:10:00Z",
"end": "2025-03-29T16:10:00Z",
"decrease_rate": 0.99,
"zone": [
12465,
8935,
13065,
9535
],
"optic_required": "narrow",
"coverage_required": 1.0,
"description": "Scout the land between the mountains. Something stirs in the shadows",
"sprite": null,
"secret": false
}
], // optional field, [] if empty
"beacon_objectives": [
{
"id": 2,
"name": "EBT 2",
"start": "2025-03-29T9:10:00Z",
"end": "2025-03-29T13:00:00Z",
"decrease_rate": 0.99,
"attempts_made": 0,
"description": "The Beacon 2 is lit! Gondor calls for aid!",
"beacon_height": 5721,
"beacon_width": 8300
}
] // optional
}To run MELVIN-OB inside the Cirdan container environment (with the SIL framework):
git clone https://github.com/CIARC-CUIYC/cirdan.git
cd cirdan
docker compose up --buildThis setup includes:
- melvin-ob in a terminal-accessible tmux session
- Palantíri SIL backend (exposes REST API)
See detailed instructions here.