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

Simulator #14

Open
richarthurs opened this issue May 24, 2018 · 0 comments
Open

Simulator #14

richarthurs opened this issue May 24, 2018 · 0 comments

Comments

@richarthurs
Copy link
Contributor

To help speed up development of Houston when there's no OBC around, it's worth having a simple simulator that can be invoked instead of connecting the OBC.

The simulator has been hooked up and can be chosen as an input source. Here's how to set it up:

  1. At the top right of the screen, click settings
  2. In the first section, set the UART Port to Internal Simulator
  3. Close the settings tab (it takes a couple of seconds to close - this is a bug that will be fixed)
  4. Your python console is probably filled with errors. This is expected.
  5. Quit Houston ... I know it's awkward, this is another bug
  6. Open Houston again, you shouldn't see connection errors in the console
  7. In the first tab, send an ack command. If everything's good, the simulator will send back Ack!

Now that you have the simulator running, here's what needs to be done.

  1. Familiarize yourself with simulator.py and line 108-ish of houston.py - this is the simulator class itself and its connection to Houston
  2. A good starting point is to add the standard telemetry sending function (see the bottom of simulator.py for details). This will use some python basics like random, time, and class variables.
  3. Standard telemetry making it to Houston? Sweet, maybe add the ability for the simulator class to keep track of its state, just like the real OBC does. There's a comment about this near the top of simulator.py.
  4. We probably don't want to go too crazy with adding features to the simulator. It's really meant for development convenience, not as a complete model for the OBC ... yet.

The commands we can send to the OBC are set in sfusat/sfu_cmds.c and .h. Some are listed here too: https://docs.google.com/spreadsheets/d/1z9gu1rPokRtKCMoUVm__WJPZM8pS671SBS4NHn9CfbM/edit#gid=0 - I'll try to update the spreadsheet with more commands so it's actually useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant