Difference between revisions of "Advanced Topic 7"
Anna Dizack (Talk | contribs) |
Steve Cable (Talk | contribs) (→The Route Table) |
||
Line 53: | Line 53: | ||
[[File: rem.png|500px|thumb|center]] | [[File: rem.png|500px|thumb|center]] | ||
− | + | For more information, see the [[Route Table|Route Table]] page. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | [[ | + |
Revision as of 13:25, 10 January 2019
The Last Position File
When launched from the command line, the MiniSim creates a file ending with the string “.lastpos.txt” when it exits as follows:
- The file is only created when the MiniSim is launched from the command line
- The restart will only work if the scenario is set up to stop the scenario when the vehicle either leaves the roadway or has a collision. Example Expression trigger content:
Expression Name: End Drive
Expression: ReadVar('MyTime') > 54000 this ends the scenario after 54,000 frames, or 15 minutes
Actions:
Action 1, Type=Set Variable, Variable=VisualDisplaytext, Value=End of Drive, Please Come To a Stop, Delay=5s
Action 2, Type=Terminate Simulation, Delay=0s
Action 3, Type=Set Variable, Variable=FinishedDrive, Value=1, Delay=0s Action 4, Type=Log Data, Variable=Stream 2, Value=1
- The drive complete indicator is defined in scenario.
- The restart file will be named the same as the daq filename that is passed into the MiniSim but with a “.lastpos.txt” so “my.daq” would produce a restart file of “my.daq.lastpos.txt”. An example of the contents of a .lastpos.txt file is as follows:
The 1st number indicates 1 if the scenario successfully finished The 2nd number is a number reserved by scenario control for the following:
- Default Nothing specified
- Collision with vehicle 2 Car drives off road
- Operator Abort – with restart
- Operator Abort – no restart
- The DAQ has encountered an error and stopped data collection. The 3rd number is the X position [feet]
The 4th number is the Y position [feet]
The 5th number is the Z position [feet]
The 6th number is the elapsed time in 1/60 sec counts from the scenario start and the participant exceeds a speed trigger (ie 10mph).
The customer’s launch application checks to see if the MiniSim has exited, then reads the contents of the lastpos file and initiates a restart through the command line for the codes: 0, 1, 2, 4.
The X,Y,Z position is the ‘last known good’ location of the driver on the roadway and when the customer’s launch application initiates a restart through the command line, the MiniSim ‘backs’ the driver up 1000’ from this last known good location.
The second line will indicate the name of the .daq file that was recorded. This is needed in case the same name on the daq file is passed, the daq will rename the new file as not to over-write an existing file. If the customer sends the same DAQ file name twice, the MiniSim re-names the DAQ file to prevent over-writing.
[#top|TOP]]
Advanced Topic 8
The Route Table
The Route Table for the NADS MiniSim provides the functionality for forwarding cell data over UDP “datagrams” to a specified location. The datagrams are sent at 60 Hz. The route table is specified by the routetable.txt file. This file must exist in the “MiniSimDir\bin” directory; if the file does not exist the MiniSim will operate normally, although no data will be forwarded.
The following is an example of a route table:
For more information, see the Route Table page.