Full-Speed Simulator Meeting 3 March 2015 Project Labor Budget Remaining: 76% *******Last Meeting: Both Rich and I tried simulations with the event-callback synchronized tasks. For both of us, the simulation eventually hung on some kind of non-deterministic IPC error involving the event callbacks. The time server design depends on the synchronization of the three GNC tasks, so defer this until the task synchronization works. Rich will devote a day to debugging the event synchronization error. Rob will assist. If we're still stuck, we'll probably start reworking the code to have a single GNC task that includes Navigation, Layered Control, and Dynamic control as objects. Rob was able to get the QNX VMs (workstation and Mac laptop hardwired to the Bldg A network) to check code out of CVS. But there seems to be a problem compiling, probably because the VM's are lacking a library or something. Rob will debug. ********Progress: * Rich found a workaround for the event-callback bug. The simulation now runs (real-time) with Navigation, Layered Control and Dynamic Control synchronized. Rob has run several simulations without problem. * Rich will present slides on a proposed time server design. * Rob found that the compilation bug was not related to the VMs. The VMs checkout from CVS and compile correctly, but only over a cabled Ethernet connection. * Rob is investigating how to merge the CVS head into the FastSim branch. The objective is to keep the branch up to date so that the eventual merge back into the head will take minimum effort. ********Specific Tasks Now Underway: * Rich: Figure out how to have TimeIF return simulated time in the case of simulation. * Rich: Replace all clock calls with consistent calls to the TimeIF. * Rich: Rework navigation to be a periodic task when running in real-time, or to trigger on DynamicControl/Simulator task completion for simulation. * Rob: Will make a pass at merging recent development on the head down into the FastSim branch, so that FastSim is up to date with unrelated development. * Rob: Download xcode and get CVS running on the Mac. Checkout the code tree. * Rob: Get the Qnx Vm to share memory with the Mac. If this works, I can checkout the code tree from CVS on the Mac, then compile it with the Qnx vm. * Rob: Assist Rich where possible. * Kent: (If time permits) Come up to speed on the code. Rob will help. * Kent: (If time permits) Run a sim. Rob will help. * Hans: (If time permits) Provide example code showing how to link the GNC process with the simulated sensor IFs and the simulator to create a single process for simulation. The GNC code is unchanged between flight and simulation. ******Overall Objectives: 1. Qnx Vm (Rob) (DONE) -Desktop -Laptop 2. Synchronize Layered Control(Rich) (DONE) -Done using event call backs. 3. Non blocking operation (Rich, Rob, Kent, Hans) -First pass using event callbacks. -Second pass moves GNC processes into a single process. 4. TRN Integration (Rich, Rob) 5. Testing and Validation (Rob) ********Meeting Notes: What causes the IPC error? Fixed with 2 ms sleep. Discovered that the VM's run the initial full-speed version slower than on mvc-bi, even though mvc-bi logs over the network. Will try again with the simulation logging locally on mvc-bi to see how fast. Possible cause is that a signal is interrupting a "send" call. May also be related to timers ( which are signals ). Priorities are a possibility. Lowering QNX ticksize from 10 to 5 ms sped up the sim. Lowering it further slowed it down. Rich is showing his slides. timespec returnged by Time::gettime has two longs; seconds, nanoseconds clock_getime has members tv_sec tv_nsec. Use a macro that does the cast? See the slides for the plan Rob will work on learning how to merge head changes into the FastSim branch. This is to avoid a big merge at the end when we rejoin the branch. Kent may help with cvs questions.