PHPackages                             harmonicdigital/ccsds - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. harmonicdigital/ccsds

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

harmonicdigital/ccsds
=====================

An SDK for parsing CCSDS files.

v1.0.0(3mo ago)01MITPHPPHP ^8.4CI passing

Since Mar 31Pushed 3mo agoCompare

[ Source](https://github.com/Harmonic-Digital-Ltd/CCSDS-PHP)[ Packagist](https://packagist.org/packages/harmonicdigital/ccsds)[ RSS](/packages/harmonicdigital-ccsds/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

CCSDS PHP SDK
=============

[](#ccsds-php-sdk)

A PHP library for parsing [CCSDS](https://ccsds.org) (Consultative Committee for Space Data Systems) files. Currently supports **Orbit Ephemeris Messages (OEM)**.

Requirements
------------

[](#requirements)

- PHP 8.4+
- [league/flysystem](https://flysystem.thephpleague.com/) ^3.33

Installation
------------

[](#installation)

```
composer require harmonicdigital/ccsds
```

Usage
-----

[](#usage)

### Parsing an OEM file

[](#parsing-an-oem-file)

`CcsdsClient` accepts any [Flysystem](https://flysystem.thephpleague.com/) `FilesystemReader`, giving you flexibility over where your files are stored - local disk, S3, SFTP, in-memory, etc.

```
use HarmonicDigital\Ccsds\CcsdsClient;
use League\Flysystem\Filesystem;
use League\Flysystem\Local\LocalFilesystemAdapter;

$filesystem = new Filesystem(new LocalFilesystemAdapter('/path/to/data'));
$client = new CcsdsClient($filesystem);

$oemFile = $client->parseOemFile('ephemeris/H20090909_0001.LOE');
```

### Working with the parsed file

[](#working-with-the-parsed-file)

```
// File-level header
echo $oemFile->header->version;      // e.g. "1.0"
echo $oemFile->header->originator;   // e.g. "ESOC"
echo $oemFile->header->creationDate->format('Y-m-d\TH:i:s');

// File-level comments
foreach ($oemFile->comments as $comment) {
    echo $comment . PHP_EOL;
}

// Segments - each covers a contiguous time range
foreach ($oemFile as $segment) {
    $meta = $segment->metadata;

    echo $meta->objectName;          // e.g. "HERSCHEL"
    echo $meta->objectId;            // e.g. "2009-026A"
    echo $meta->refFrame;            // e.g. "EME2000"
    echo $meta->timeSystem;          // e.g. "TDB"
    echo $meta->startTime->format('Y-m-d\TH:i:s.u');
    echo $meta->stopTime->format('Y-m-d\TH:i:s.u');

    // State vectors - position in km, velocity in km/s
    foreach ($segment->stateVectors as $sv) {
        echo $sv->epoch->format('Y-m-d\TH:i:s.u');
        echo "  x={$sv->x}  y={$sv->y}  z={$sv->z}";
        echo "  xDot={$sv->xDot}  yDot={$sv->yDot}  zDot={$sv->zDot}";
        echo PHP_EOL;
    }
}
```

### Lazy parsing

[](#lazy-parsing)

The parser reads the file header eagerly, then yields segments lazily via a `CachedIterator`. This means:

- Accessing `$oemFile->header` and `$oemFile->comments` never triggers segment loading.
- Segments are parsed on demand as you iterate.
- Subsequent iterations replay from the cache - the underlying stream is only read once.

```
// Safe to iterate multiple times at no extra I/O cost
$segments = iterator_to_array($oemFile);
$same     = iterator_to_array($oemFile); // served from cache
```

### Error handling

[](#error-handling)

```
use HarmonicDigital\Ccsds\Exception\ParseException;
use League\Flysystem\UnableToReadFile;

try {
    $oemFile = $client->parseOemFile('missing_or_corrupt.oem');
    foreach ($oemFile as $segment) { /* ... */ }
} catch (UnableToReadFile $e) {
    // Flysystem could not open the file
} catch (ParseException $e) {
    // The file content does not conform to the OEM format
}
```

> **Note:** `ParseException` may be thrown during header parsing (immediately) or during segment iteration (lazily). Wrap the full iteration in the same `try/catch` block.

### Custom parser

[](#custom-parser)

You can substitute your own OEM parser by implementing `OemParserInterface`:

```
use HarmonicDigital\Ccsds\CcsdsClient;
use HarmonicDigital\Ccsds\Parser\OemParserInterface;

$client = new CcsdsClient($filesystem, new MyCustomOemParser());
```

Data model
----------

[](#data-model)

ClassDescription`OemFile`Top-level result. Contains a `Header`, file-level comments, and iterable `OemSegment`s.`Header``version`, `creationDate` (`DateTimeImmutable`), `originator`.`OemSegment`A `Metadata` block paired with its `StateVector[]`. Also iterable directly over state vectors.`Metadata`Object name, ID, reference frame, time system, start/stop times, and optional interpolation settings.`StateVector`Epoch (`DateTimeImmutable`) + position (x/y/z km) + velocity (xDot/yDot/zDot km/s) stored as `numeric-string` to preserve decimal precision.Running tests
-------------

[](#running-tests)

```
composer install
./vendor/bin/phpunit
```

License
-------

[](#license)

MIT-NON-AI - see [LICENSE](LICENSE).

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance82

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

92d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/135672?v=4)[Rick Ogden](/maintainers/rickogden)[@rickogden](https://github.com/rickogden)

---

Top Contributors

[![rickogden](https://avatars.githubusercontent.com/u/135672?v=4)](https://github.com/rickogden "rickogden (5 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/harmonicdigital-ccsds/health.svg)

```
[![Health](https://phpackages.com/badges/harmonicdigital-ccsds/health.svg)](https://phpackages.com/packages/harmonicdigital-ccsds)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k532.1M19.5k](/packages/laravel-framework)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M528](/packages/shopware-core)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9417.2k58](/packages/open-dxp-opendxp)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
