Conversation
| }; | ||
|
|
||
| void VirtualBarometer::process(double deltatime) { | ||
| std::cout << "PROCESSING NEW POSITION" << '\n'; |
There was a problem hiding this comment.
Consider removing debug std::cout prints and instead either:
- Print to file
- Write function that prints state of barometer every simulation tick, and call that in simulate loop
|
|
||
| void VirtualBarometer::process(double deltatime) { | ||
| std::cout << "PROCESSING NEW POSITION" << '\n'; | ||
| position_provider.process(deltatime); |
There was a problem hiding this comment.
Not sure if you folks are changing the architecture, but you probably want to call position_provider.process(deltatime) in the main simulation loop as a first step, then call VirtualBarometer::process() after it. This prevents coupling that is present here.
| VirtualBarometer(unsigned int rs, double alt, double ns); | ||
| double get_reported_altitude(); | ||
| void process(double); | ||
| PhoenixPositionProvider position_provider; |
There was a problem hiding this comment.
This should probably be a pointer to position_provider. Currently, it is declared as a unique instance that is a member of this class. Consider change to PhoenixPositionProvider* position_provider.
| }else { | ||
| fs.process(solenoid_timer, target); | ||
| } | ||
| }()); // make sure to actually call lambda function immediately lolz |
| CHECK_THROWS_AS(fs.process(solenoid_timer, target), std::runtime_error); | ||
| } | ||
|
|
||
| TEST_CASE("Process Loop Run Explode", "Engine explodes cuz someone closed solenoid while it was running") { |
There was a problem hiding this comment.
Engine will probably not explode if this happens, it will probably just sputter out. Check w/ Fluid Systems and/or Prop.
There was a problem hiding this comment.
Great tests, especially checking for determinism!
There was a problem hiding this comment.
These look good, but check with someone more familiar with the vehicle, I have been retired for a while.
Resolves #6. Finished virtual altimeter initial tests