Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explore Fprime sequencer (scheduler) and if possible modify to enforce accuracy to the second #19

Open
dheadrick1618 opened this issue Jul 12, 2023 · 7 comments
Assignees

Comments

@dheadrick1618
Copy link
Member

dheadrick1618 commented Jul 12, 2023

Make notes on how the Fprime sequencer internals work, including how and where its associated scheduled commands are stored.

July 18th update: Not much done, continued playing around and experimenting with timing and lag, looked for more resources on the topic, etc. Won't be able to make the teamwide tonight as something has come up at work

@ijoffe
Copy link

ijoffe commented Jul 31, 2023

Notes to self:

More tests today with nothing else running:
Image
Image
Image
Image

Would need to run on a minimal Linux machine or something to test thoroughly, but I'm not sure if it will have high enough resolution

@dheadrick1618
Copy link
Member Author

Great work! Seems like there is around 2 seconds of delay from when the command is time stamped to when the activity is actually called ... Could you post your system please? We should try this test on a pi or zybo running nothing else but the OS as well and compare.

@ijoffe
Copy link

ijoffe commented Aug 1, 2023

Yeah I think testing like that would be a good idea.

Not sure exactly what info is needed but it's on my asus zenbook laptop, intel i7 cpu @ 1.8GHz, 16GB RAM, x64-based processor running 64-bit windows 11, but run inside the docker container you made through VScode. I think doing something like Ron said of using this to wake up the general task but then having a higher resolution timer inside the F Prime command invoked may be the way to go.

@dheadrick1618
Copy link
Member Author

Yea good call. We could maybe tell every time sensitive Fprime command to execute on the sequencer like 10ish seconds before the time sensitive one is supposed to, and then use that to trigger a higher resolution task in the OS using system time.... The question then becomes what the typical latency is for an OS to spawn a task, how to prioritise this task (if that's possible).

@ijoffe
Copy link

ijoffe commented Aug 15, 2023

Been playing around with the Hello World command and got it to always send timed on a round second (see log - command sent earlier but only executed at round times). Now I'm going to try to dive in and alter the actual command sequencer code to implement so any type of command can be run at the exact precision written (this will mean making the command wake up earlier and then sleeping to the exact millisecond).

Image

@dheadrick1618
Copy link
Member Author

Awesome! I would love to see your modifications. Do you think maybe you could create a separate repo and share that with those mods?

@dheadrick1618 dheadrick1618 changed the title Determine where the Fprime sequencer stores its 'log' or associated sequence table. Explore Fprime sequencer (scheduler) and if possible modify to enforce accuracy to the second Aug 16, 2023
@ijoffe
Copy link

ijoffe commented Aug 16, 2023

Here is doc link:
https://docs.google.com/document/d/15c9CwnjXDVmeEy6xu2YgG_R5dMyu7SBsA1Eykuu3enk/edit?usp=sharing

And that's a good idea, I'll share a repo once I am able

@dheadrick1618 dheadrick1618 moved this from In Progress to Canclelled / Abandoned in (OLD) ExAlta3 Project Management for Software Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Cancelled / Abandoned
Development

No branches or pull requests

2 participants