alxndrsh / fpf

Frame Processing Framework
MIT License
17 stars 4 forks source link

transfer frame incorrect #2

Closed vinnitu closed 6 years ago

vinnitu commented 6 years ago

I have saw ccsds transfer frame spec image

and note you have different version of it

for example spacecraftid - must be 10bits, but you use 8bits

static inline t_uint16  CADU_GET_SPACECRAFT(BYTE* p) { return (t_uint16)( ( ( p[4] & 0x3FUL) << 2 ) | ((p[5] & 0xC0) >> 6) );}

and what is it - tf_v1 - where is spec on it?

thx

alxndrsh commented 6 years ago

Initially FPF was designed to work with "CCSDS Version-2 Transfer Frame" ( described in CCSDS 732.0-B series documents). Such frames have 01 in the first two bits, then 8 bit per satellite, and so on. Such frames are used by EOS series satellites. Your picture refers to transfer frame structure from CCSDS 132-x book. The last is actually considered more actual and recommended for implementation. Support for this frame types was quite rudimentary and implemented not in all base object( e.g. CNode_CADUdump has tf_version ini-parameter to select a frame version to decode and dump). TFV1GET* series of macro may be used t oexcctract main version-1 frame fields.