psas/av3-fc

FC packets have different timestamp than ethernet packets

Opened this issue · 5 comments

In the Launch-12 log, the VERS, SEQN, ROLL, and MESG packets had a different timestamp base (about 0x2EFF3C4, but possibly just 0) than packets coming in over ethernet (about 0x6824606CA712). These four messages are generated by the flight computer, and thus had timestamps originating from clock_gettime(CLOCK_MONOTONIC), whereas ethernet messages obtained the timestamp from the SO_TIMESTAMPNS metadata of incoming recvmsg() packets. We open the socket with setsockopt(s, SOL_SOCKET, SO_TIMESTAMPNS, ...), however according to documentation I found, the sub-options of SOF_TIMESTAMPING_RX_HARDWARE | SOF_TIMESTAMPING_RX_SOFTWARE | SOF_TIMESTAMPING_SYS_HARDWARE are only used if we instead choose socket option SO_TIMESTAMPING. And in any case apparently none of these use the same time-base as CLOCK_MONOTONIC; they either use standard system time or an ethernet card clock.

Also, since these were on different time bases, our policy of subtracting a monotonic start time from the ethernet packet timestamp in to_psas_time() was probably useless.

Hi,
Is this project still alive ? I am looking to contribute to Aerospace projects with languages like Python C/C++. Please do let me know if there are any active projects.

Hi whatliesbeyond,
Unfortunately this project has reached the end of its usefulness for us. Currently our group is in an in-between stage as we gear up to rewrite the avionics system in Rust.

@ThirteenFish

I am also interested in contributing to open source avionics projects. Can you provide some links to new active repositories/projects that the group is working on?

Thanks.

@BigChief45 and @whatliesbeyond: People in our group who are working on software are, at the moment, mostly focused on our cubesat project. See https://github.com/oresat/devsat and https://github.com/oresat/syscon-rs for example. We expect to bring things we learn from that project back to building rocket avionics, eventually.