Download the PHP package harmonicdigital/ccsds without Composer
On this page you can find all versions of the php package harmonicdigital/ccsds. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package ccsds
CCSDS PHP SDK
A PHP library for parsing CCSDS (Consultative Committee for Space Data Systems) files. Currently supports Orbit Ephemeris Messages (OEM).
Requirements
- PHP 8.4+
- league/flysystem ^3.33
Installation
Usage
Parsing an OEM file
CcsdsClient accepts any Flysystem FilesystemReader, giving you flexibility over where your files are stored - local disk, S3, SFTP, in-memory, etc.
Working with the parsed file
Lazy parsing
The parser reads the file header eagerly, then yields segments lazily via a CachedIterator. This means:
- Accessing
$oemFile->headerand$oemFile->commentsnever triggers segment loading. - Segments are parsed on demand as you iterate.
- Subsequent iterations replay from the cache - the underlying stream is only read once.
Error handling
Note:
ParseExceptionmay be thrown during header parsing (immediately) or during segment iteration (lazily). Wrap the full iteration in the sametry/catchblock.
Custom parser
You can substitute your own OEM parser by implementing OemParserInterface:
Data model
| Class | Description |
|---|---|
OemFile |
Top-level result. Contains a Header, file-level comments, and iterable OemSegments. |
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
License
MIT-NON-AI - see LICENSE.