WindhoverLabs / SLE-Provider-Simulator-

0 stars 0 forks source link

Time Source For Frames #2

Open lorenzo-gomez-windhover opened 1 year ago

lorenzo-gomez-windhover commented 1 year ago

We need to put some more thought into which time we are stamping the frame with. At the moment in our code we are doing the following:

      Instant t = Instant.now();
      CcsdsTime tc = CcsdsTime.fromUnix(t.getEpochSecond(), t.getNano());
...

      rsps.forEach(
          rsp ->
              rsp.sendFrame(
                  tc,
                  FrameQuality.good,
                  dataLinkContinuity,
                  currentPacket,
                  0,
                  512)); // using this for testing purposes ; not the best way to do this //
      // currentPacket.length()
    }

I don't know what "tc" means in this context.... Is that rec time, gen time or does the frame itself have another time of its own?

xpromache commented 1 year ago

Hi Lorenzo, poking my nose through your repositories :)

The tc there is in fact the Earth Receive Time (you can rename it to ert as it is called in the RacfServiceProvider). It is the timestamp generated by the ground station when the frame has been received on ground.

Now I didn't find if that timestamp is generated at the beginning of the frame reception or at the end but I suspect it is the latter (or maybe ground station dependent).

lorenzo-gomez-windhover commented 1 year ago

Hi Lorenzo, poking my nose through your repositories :)

No worries I do the same from time to time :).

The tc there is in fact the Earth Receive Time (you can rename it to ert as it is called in the RacfServiceProvider). It is the timestamp generated by the ground station when the frame has been received on ground.

That explains that. Thanks, good to know!

Now I didn't find if that timestamp is generated at the beginning of the frame reception or at the end but I suspect it is the latter (or maybe ground station dependent).

We're still getting familiar with SLE so I have to have another look to see where it is actually getting generated....