<commit_before><div class="col-sm-12">
	<div class="panel-group col-sm-6">

		<div class="panel panel-default">
			<div class="panel-heading">Hardware</div>
			<div class="panel-body">
				<div class="form-group">
					<label class="control-label col-xs-7">978 MHz</label>
					<div class="col-xs-5">
						<ui-switch ng-model='UAT_Enabled' settings-change></ui-switch>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-xs-7">1090 MHz</label>
					<div class="col-xs-5">
						<ui-switch ng-model='ES_Enabled' settings-change></ui-switch>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-xs-7">Ping ADS-B</label>
					<div class="col-xs-5">
						<ui-switch ng-model='Ping_Enabled' settings-change></ui-switch>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-xs-7">GPS</label>
					<div class="col-xs-5">
						<ui-switch ng-model='GPS_Enabled' settings-change></ui-switch>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-xs-7">Attitude Sensor</label>
					<div class="col-xs-5">
						<ui-switch ng-model='IMU_Sensor_Enabled' settings-change></ui-switch>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-xs-7">Altitude Sensor</label>
					<div class="col-xs-5">
						<ui-switch ng-model='BMP_Sensor_Enabled' settings-change></ui-switch>
					</div>
				</div>
			</div>
		</div>
	</div>

	<div class="panel-group col-sm-6">
		<div class="panel panel-default">
			<div class="panel-heading">Diagnostics</div>
			<div class="panel-body">
				<div class="form-group">
					<label class="control-label col-xs-7">Show Traffic Source in Callsign</label>
					<div class="col-xs-5">
						<ui-switch ng-model='DisplayTrafficSource' settings-change></ui-switch>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-xs-7">Verbose Message Log</label>
					<div class="col-xs-5">
						<ui-switch ng-model='DEBUG' settings-change></ui-switch>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-xs-7">Record Replay Logs</label>
					<div class="col-xs-5">
						<ui-switch ng-model='ReplayLog' settings-change></ui-switch>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-xs-7">Record AHRS Logs</label>
					<div class="col-xs-5">
						<ui-switch ng-model='AHRSLog' settings-change></ui-switch>
					</div>
				</div>
			</div>
		</div>
	</div>

	<div class="panel-group col-sm-6">
		<div class="panel panel-default">
			<div class="panel-heading">AHRS</div>
			<div class="panel-body">
				<div class="col-xs-12">
					<span style="position:relative; overflow: hidden;">
						<button class="btn btn-primary btn-block" ui-turn-on="modalCalibrateForward">
							Set AHRS Sensor Orientation
						</button>
					</span>
				</div>
				<div class="form-group reset-flow">
					<label class="control-label col-xs-5">AHRS Smoothing Constant</label>
					<form name="watchForm" ng-submit="updateAHRSSmoothingConst()" novalidate>
						<input class="col-xs-7" type="string" required ng-model="AHRSSmoothingConstant"
							   placeholder="number 0-1" ng-blur="updateAHRSSmoothingConst()" />
					</form>
				</div>
				<div class="form-group reset-flow">
					<label class="control-label col-xs-5">AHRS GPS Weight</label>
					<form name="watchForm" ng-submit="updateAHRSGPSWeight()" novalidate>
						<input class="col-xs-7" type="string" required ng-model="AHRSGPSWeight"
							   placeholder="number 0-1" ng-blur="updateAHRSGPSWeight()" />
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
	
<div class="col-sm-12">
	<div class="panel-group col-sm-6">
		<div class="panel panel-default">
			<div class="panel-heading">Configuration</div>
			<div class="panel-body">
				<div class="form-group reset-flow">
					<label class="control-label col-xs-5">Mode S Code (Hex)</label>
					<form name="modeForm" ng-submit="updatemodes()" novalidate>
						<!-- type="number" not supported except on mobile -->
						<!-- RegEx for validation: ^[A-Fa-f0-9]{6}$ -->
						<input class="col-xs-7" type="string" required ng-model="OwnshipModeS" placeholder="FAA HEX code" ng-blur="updatemodes()" />
					</form>
				</div>
				<div class="form-group reset-flow">
					<label class="control-label col-xs-5">Watch List</label>
					<form name="watchForm" ng-submit="updatewatchlist()" novalidate>
						<!-- type="number" not supported except on mobile -->
						<input class="col-xs-7" type="string" required ng-model="WatchList" placeholder="space-delimited identifiers" ng-blur="updatewatchlist()" />
					</form>
				</div>
				<div class="form-group reset-flow">
					<label class="control-label col-xs-5">PPM Correction</label>
					<form name="ppmForm" ng-submit="updateppm()" novalidate>
						<!-- type="number" not supported except on mobile -->
						<input class="col-xs-7" type="number_format" required ng-model="PPM" placeholder="integer" ng-blur="updateppm()" />
					</form>
				</div>
				<div class="form-group reset-flow" ng-class="{ 'section_invisible': (!visible_serialout)}">
					<label class="control-label col-xs-5">Serial Output Baudrate</label>
					<form name="ppmForm" ng-submit="updateBaud()" novalidate>
						<!-- type="number" not supported except on mobile -->
						<input class="col-xs-7" type="number_format" required ng-model="Baud" placeholder="integer" ng-blur="updateBaud()" />
					</form>
				</div>
			</div>
		</div>
	</div>
	
	<div class="panel-group col-sm-6">
		<div class="panel panel-default">
			<div class="panel-heading">Commands</div>
			<div class="panel-body">
				<!-- Upload. Temporary. -->
				<div class="col-xs-12">
					<span ng-show="update_files == ''">
						<span style="position:relative; overflow: hidden;">
							<span class="fake-btn fake-btn-block">Click to select System Update file</span>
							<input style="opacity:0.0; position: absolute; top: 0; right: 0;" class="col-xs-12" type="file" name="update_file" onchange="angular.element(this).scope().setUploadFile(this.files)"/>
						</span>
					</span>
					<span ng-hide="update_files == ''">
						<button class="btn btn-block" onclick="angular.element(this).scope().uploadFile()">Install {{update_files[0].name}}</button>
					</span>
				</div>
				<div class="form-group reset-flow">
					<div class="col-xs-12">
	  				  <button class="btn btn-primary btn-block" ui-turn-on="modalReboot">Reboot</button> 				
	  				 </div>
				</div>
				<div class="form-group reset-flow">
					<div class="col-xs-12">
						<button class="btn btn-primary btn-block"ui-turn-on="modalShutdown">Shutdown</button>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

    <!-- Developer mode area -->
<div class="col-sm-12">
	<div ng-show="DeveloperMode" class="panel-group col-sm-6">
		<div class="panel panel-default">
			<div class="panel-heading">Developer Options</div>
			<div class="panel-body">
				<div class="col-xs-12">
					<div class="form-group reset-flow">
						<label class="control-label col-xs-5">Static IPs</label>
						<form name="staticipForm" ng-submit="updatestaticips()" novalidate>
							<input class="col-xs-7" type="string" required ng-model="StaticIps" ng-list=" " ng-trim="false" placeholder="space-delimited ip's to send network data" ng-blur="updatestaticips()" />
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>


<div class="col-sm-12" ng-show="DeveloperMode" >
	<div class="panel panel-default">
		<div class="panel-heading">Raw Configuration</div>
		<div class="panel-body">
			<p>stratux.conf:</p>
			<pre>{{rawSettings}}</pre>
		</div>
	</div>
</div>
 
<div class="col-sm-12">
 	<h3 ui-if="rebooting" ui-state="rebooting">Stratux is rebooting.  You may need to reconnect WiFi once it reboots.</h3>
   	<h3 ui-if="shuttingdown" ui-state="shuttingdown">Stratux is shutting down.  You may disconnect power.</h3>
</div>

<div ui-content-for="modals">
  <div class="modal" ui-if="modalReboot" ui-state="modalReboot">
    <div class="modal-overlay "></div>
       	<div class="vertical-alignment-helper center-block">
        	<div class="modal-dialog vertical-align-center">
     
      <div class="modal-content">
        <div class="modal-header">
          <button class="close" 
                  ui-turn-off="modalReboot"></button>
          <h4 class="modal-title">Are you really sure?</h4>
        </div>
        <div class="modal-body">
          <p>Do you wish to reboot the Stratux?</p>
          <p>Note that the system will reboot immediately and it will stop responding during the reboot</p>
        </div>
        <div class="modal-footer">
          <a ui-turn-off="modalReboot" class="btn btn-default">Cancel</a>
          <a ng-click="postReboot()" ui-turn-off="modalReboot" ui-turn-on="rebooting" class="btn btn-primary">Reboot</a>
        </div>
      </div>
    	  </div>
    </div>
  </div>
  
  <div class="modal" ui-if="modalShutdown" ui-state="modalShutdown">
    <div class="modal-overlay "></div>
       	<div class="vertical-alignment-helper center-block">
        	<div class="modal-dialog vertical-align-center">
     
      <div class="modal-content">
        <div class="modal-header">
          <button class="close" 
                  ui-turn-off="modalShutdown"></button>
          <h4 class="modal-title">Are you really sure?</h4>
        </div>
        <div class="modal-body">
          <p>Do you wish to shutdown the Stratux?</p>
          <p>Note that the system will shutdown immediately. Please disconnect the power after the shutdown.</p>
        </div>
        <div class="modal-footer">
          <a ui-turn-off="modalShutdown" class="btn btn-default">Cancel</a>
          <a ng-click="postShutdown()" ui-turn-off="modalShutdown" ui-turn-on="shuttingdown" class="btn btn-primary">Shutdown</a>
        </div>
      </div>
    	  </div>
    </div>
  </div>

	<div class="modal" ui-if="modalCalibrateForward" ui-state="modalCalibrateForward">
		<div class="modal-overlay "></div>
		<div class="vertical-alignment-helper center-block">
			<div class="modal-dialog vertical-align-center">
				<div class="modal-content">
					<div class="modal-header">
						<button class="close" ui-turn-off="modalCalibrateForward"></button>
						<h4 class="modal-title">Set AHRS Sensor Orientation: Forward Direction</h4>
					</div>
					<div class="modal-body">
						<p>Point the Stratux/sensor box so that the end that will be pointing toward the <strong>nose</strong> of the airplane is pointing toward the sky and press the <strong>Set Forward Direction</strong> button.</p>
					</div>
					<div class="modal-footer">
						<a ui-turn-off="modalCalibrateForward" ui-turn-on="modalCalibrateCanceled" class="btn btn-default">Cancel</a>
						<a ng-click="setOrientation('forward')" ui-turn-off="modalCalibrateForward" ui-turn-on="modalCalibrateUp" class="btn btn-default btn-primary">Set Forward Direction</a>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="modal" ui-if="modalCalibrateUp" ui-state="modalCalibrateUp">
		<div class="modal-overlay "></div>
		<div class="vertical-alignment-helper center-block">
			<div class="modal-dialog vertical-align-center">
				<div class="modal-content">
					<div class="modal-header">
						<button class="close" ui-turn-off="modalCalibrateUp"></button>
						<h4 class="modal-title">Set AHRS Sensor Orientation: Up Direction</h4>
					</div>
					<div class="modal-body">
						<p>Place the Stratux/sensor box in the orientation it will be in during flight and press the <strong>Set Up Direction</strong> button.</p>
					</div>
					<div class="modal-footer">
						<a ui-turn-off="modalCalibrateUp" ui-turn-on="modalCalibrateCanceled" class="btn btn-default">Cancel</a>
						<a ng-click="setOrientation('up')" ui-turn-off="modalCalibrateUp" ui-turn-on="modalCalibrateDone" class="btn btn-default btn-primary">Set Up Direction</a>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="modal" ui-if="modalCalibrateDone" ui-state="modalCalibrateDone">
		<div class="modal-overlay "></div>
		<div class="vertical-alignment-helper center-block">
			<div class="modal-dialog vertical-align-center">
				<div class="modal-content">
					<div class="modal-header">
						<button class="close" ui-turn-off="modalCalibrateDone"></button>
						<h4 class="modal-title">Set AHRS Sensor Orientation: Finished</h4>
					</div>
					<div class="modal-body">
						<p>The sensors are calibrated.  These settings will be saved for future flights.</p>
					</div>
					<div class="modal-footer">
						<a ui-turn-off="modalCalibrateDone" class="btn btn-default btn-primary">OK</a>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="modal" ui-if="modalCalibrateFailed" ui-state="modalCalibrateFailed">
		<div class="modal-overlay "></div>
		<div class="vertical-alignment-helper center-block">
			<div class="modal-dialog vertical-align-center">
				<div class="modal-content">
					<div class="modal-header">
						<button class="close" ui-turn-off="modalCalibrateFailed"></button>
						<h4 class="modal-title">Set AHRS Sensor Orientation: Failed!</h4>
					</div>
					<div class="modal-body">
						<p>There was an error: {{Orientation_Failure_Message}}</p>
						<p><div id="orientationFailureMessage"></div></p>
						<p>The calibration failed.</p>
					</div>
					<div class="modal-footer">
						<a ui-turn-off="modalCalibrateFailed" class="btn btn-default btn-primary">OK</a>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="modal" ui-if="modalCalibrateCanceled" ui-state="modalCalibrateCanceled">
		<div class="modal-overlay "></div>
		<div class="vertical-alignment-helper center-block">
			<div class="modal-dialog vertical-align-center">
				<div class="modal-content">
					<div class="modal-header">
						<button class="close" ui-turn-off="modalCalibrateCanceled"></button>
						<h4 class="modal-title">Set AHRS Sensor Orientation: Canceled</h4>
					</div>
					<div class="modal-body">
						<p>Calibration canceled.</p>
					</div>
					<div class="modal-footer">
						<a ui-turn-off="modalCalibrateCanceled" class="btn btn-default btn-primary">OK</a>
					</div>
				</div>
			</div>
		</div>
	</div>

</div>

<commit_msg>Move AHRS Settings into Developer section.<commit_after><div class="col-sm-12">
	<div class="panel-group col-sm-6">

		<div class="panel panel-default">
			<div class="panel-heading">Hardware</div>
			<div class="panel-body">
				<div class="form-group">
					<label class="control-label col-xs-7">978 MHz</label>
					<div class="col-xs-5">
						<ui-switch ng-model='UAT_Enabled' settings-change></ui-switch>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-xs-7">1090 MHz</label>
					<div class="col-xs-5">
						<ui-switch ng-model='ES_Enabled' settings-change></ui-switch>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-xs-7">Ping ADS-B</label>
					<div class="col-xs-5">
						<ui-switch ng-model='Ping_Enabled' settings-change></ui-switch>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-xs-7">GPS</label>
					<div class="col-xs-5">
						<ui-switch ng-model='GPS_Enabled' settings-change></ui-switch>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-xs-7">Attitude Sensor</label>
					<div class="col-xs-5">
						<ui-switch ng-model='IMU_Sensor_Enabled' settings-change></ui-switch>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-xs-7">Altitude Sensor</label>
					<div class="col-xs-5">
						<ui-switch ng-model='BMP_Sensor_Enabled' settings-change></ui-switch>
					</div>
				</div>
			</div>
		</div>
	</div>

	<div class="panel-group col-sm-6">
		<div class="panel panel-default">
			<div class="panel-heading">Diagnostics</div>
			<div class="panel-body">
				<div class="form-group">
					<label class="control-label col-xs-7">Show Traffic Source in Callsign</label>
					<div class="col-xs-5">
						<ui-switch ng-model='DisplayTrafficSource' settings-change></ui-switch>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-xs-7">Verbose Message Log</label>
					<div class="col-xs-5">
						<ui-switch ng-model='DEBUG' settings-change></ui-switch>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-xs-7">Record Replay Logs</label>
					<div class="col-xs-5">
						<ui-switch ng-model='ReplayLog' settings-change></ui-switch>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-xs-7">Record AHRS Logs</label>
					<div class="col-xs-5">
						<ui-switch ng-model='AHRSLog' settings-change></ui-switch>
					</div>
				</div>
			</div>
		</div>
	</div>

	<div class="panel-group col-sm-6">
		<div class="panel panel-default">
			<div class="panel-heading">AHRS</div>
			<div class="panel-body">
				<div class="col-xs-12">
					<span style="position:relative; overflow: hidden;">
						<button class="btn btn-primary btn-block" ui-turn-on="modalCalibrateForward">
							Set AHRS Sensor Orientation
						</button>
					</span>
				</div>
			</div>
		</div>
	</div>
</div>
	
<div class="col-sm-12">
	<div class="panel-group col-sm-6">
		<div class="panel panel-default">
			<div class="panel-heading">Configuration</div>
			<div class="panel-body">
				<div class="form-group reset-flow">
					<label class="control-label col-xs-5">Mode S Code (Hex)</label>
					<form name="modeForm" ng-submit="updatemodes()" novalidate>
						<!-- type="number" not supported except on mobile -->
						<!-- RegEx for validation: ^[A-Fa-f0-9]{6}$ -->
						<input class="col-xs-7" type="string" required ng-model="OwnshipModeS" placeholder="FAA HEX code" ng-blur="updatemodes()" />
					</form>
				</div>
				<div class="form-group reset-flow">
					<label class="control-label col-xs-5">Watch List</label>
					<form name="watchForm" ng-submit="updatewatchlist()" novalidate>
						<!-- type="number" not supported except on mobile -->
						<input class="col-xs-7" type="string" required ng-model="WatchList" placeholder="space-delimited identifiers" ng-blur="updatewatchlist()" />
					</form>
				</div>
				<div class="form-group reset-flow">
					<label class="control-label col-xs-5">PPM Correction</label>
					<form name="ppmForm" ng-submit="updateppm()" novalidate>
						<!-- type="number" not supported except on mobile -->
						<input class="col-xs-7" type="number_format" required ng-model="PPM" placeholder="integer" ng-blur="updateppm()" />
					</form>
				</div>
				<div class="form-group reset-flow" ng-class="{ 'section_invisible': (!visible_serialout)}">
					<label class="control-label col-xs-5">Serial Output Baudrate</label>
					<form name="ppmForm" ng-submit="updateBaud()" novalidate>
						<!-- type="number" not supported except on mobile -->
						<input class="col-xs-7" type="number_format" required ng-model="Baud" placeholder="integer" ng-blur="updateBaud()" />
					</form>
				</div>
			</div>
		</div>
	</div>
	
	<div class="panel-group col-sm-6">
		<div class="panel panel-default">
			<div class="panel-heading">Commands</div>
			<div class="panel-body">
				<!-- Upload. Temporary. -->
				<div class="col-xs-12">
					<span ng-show="update_files == ''">
						<span style="position:relative; overflow: hidden;">
							<span class="fake-btn fake-btn-block">Click to select System Update file</span>
							<input style="opacity:0.0; position: absolute; top: 0; right: 0;" class="col-xs-12" type="file" name="update_file" onchange="angular.element(this).scope().setUploadFile(this.files)"/>
						</span>
					</span>
					<span ng-hide="update_files == ''">
						<button class="btn btn-block" onclick="angular.element(this).scope().uploadFile()">Install {{update_files[0].name}}</button>
					</span>
				</div>
				<div class="form-group reset-flow">
					<div class="col-xs-12">
	  				  <button class="btn btn-primary btn-block" ui-turn-on="modalReboot">Reboot</button> 				
	  				 </div>
				</div>
				<div class="form-group reset-flow">
					<div class="col-xs-12">
						<button class="btn btn-primary btn-block"ui-turn-on="modalShutdown">Shutdown</button>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

    <!-- Developer mode area -->
<div class="col-sm-12">
	<div ng-show="DeveloperMode" class="panel-group col-sm-6">
		<div class="panel panel-default">
			<div class="panel-heading">Developer Options</div>
			<div class="panel-body">
				<div class="col-xs-12">
					<div class="form-group reset-flow">
						<label class="control-label col-xs-5">Static IPs</label>
						<form name="staticipForm" ng-submit="updatestaticips()" novalidate>
							<input class="col-xs-7" type="string" required ng-model="StaticIps" ng-list=" " ng-trim="false" placeholder="space-delimited ip's to send network data" ng-blur="updatestaticips()" />
						</form>
					</div>
					<div class="form-group reset-flow">
						<label class="control-label col-xs-5">AHRS Smoothing Constant</label>
						<form name="watchForm" ng-submit="updateAHRSSmoothingConst()" novalidate>
							<input class="col-xs-7" type="string" required ng-model="AHRSSmoothingConstant"
								   placeholder="0-1, lower is smoother" ng-blur="updateAHRSSmoothingConst()" />
						</form>
					</div>
					<div class="form-group reset-flow">
						<label class="control-label col-xs-5">AHRS GPS Weight</label>
						<form name="watchForm" ng-submit="updateAHRSGPSWeight()" novalidate>
							<input class="col-xs-7" type="string" required ng-model="AHRSGPSWeight"
								   placeholder="0-1, lower uses more gyro" ng-blur="updateAHRSGPSWeight()" />
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>


<div class="col-sm-12" ng-show="DeveloperMode" >
	<div class="panel panel-default">
		<div class="panel-heading">Raw Configuration</div>
		<div class="panel-body">
			<p>stratux.conf:</p>
			<pre>{{rawSettings}}</pre>
		</div>
	</div>
</div>
 
<div class="col-sm-12">
 	<h3 ui-if="rebooting" ui-state="rebooting">Stratux is rebooting.  You may need to reconnect WiFi once it reboots.</h3>
   	<h3 ui-if="shuttingdown" ui-state="shuttingdown">Stratux is shutting down.  You may disconnect power.</h3>
</div>

<div ui-content-for="modals">
  <div class="modal" ui-if="modalReboot" ui-state="modalReboot">
    <div class="modal-overlay "></div>
       	<div class="vertical-alignment-helper center-block">
        	<div class="modal-dialog vertical-align-center">
     
      <div class="modal-content">
        <div class="modal-header">
          <button class="close" 
                  ui-turn-off="modalReboot"></button>
          <h4 class="modal-title">Are you really sure?</h4>
        </div>
        <div class="modal-body">
          <p>Do you wish to reboot the Stratux?</p>
          <p>Note that the system will reboot immediately and it will stop responding during the reboot</p>
        </div>
        <div class="modal-footer">
          <a ui-turn-off="modalReboot" class="btn btn-default">Cancel</a>
          <a ng-click="postReboot()" ui-turn-off="modalReboot" ui-turn-on="rebooting" class="btn btn-primary">Reboot</a>
        </div>
      </div>
    	  </div>
    </div>
  </div>
  
  <div class="modal" ui-if="modalShutdown" ui-state="modalShutdown">
    <div class="modal-overlay "></div>
       	<div class="vertical-alignment-helper center-block">
        	<div class="modal-dialog vertical-align-center">
     
      <div class="modal-content">
        <div class="modal-header">
          <button class="close" 
                  ui-turn-off="modalShutdown"></button>
          <h4 class="modal-title">Are you really sure?</h4>
        </div>
        <div class="modal-body">
          <p>Do you wish to shutdown the Stratux?</p>
          <p>Note that the system will shutdown immediately. Please disconnect the power after the shutdown.</p>
        </div>
        <div class="modal-footer">
          <a ui-turn-off="modalShutdown" class="btn btn-default">Cancel</a>
          <a ng-click="postShutdown()" ui-turn-off="modalShutdown" ui-turn-on="shuttingdown" class="btn btn-primary">Shutdown</a>
        </div>
      </div>
    	  </div>
    </div>
  </div>

	<div class="modal" ui-if="modalCalibrateForward" ui-state="modalCalibrateForward">
		<div class="modal-overlay "></div>
		<div class="vertical-alignment-helper center-block">
			<div class="modal-dialog vertical-align-center">
				<div class="modal-content">
					<div class="modal-header">
						<button class="close" ui-turn-off="modalCalibrateForward"></button>
						<h4 class="modal-title">Set AHRS Sensor Orientation: Forward Direction</h4>
					</div>
					<div class="modal-body">
						<p>Point the Stratux/sensor box so that the end that will be pointing toward the <strong>nose</strong> of the airplane is pointing toward the sky and press the <strong>Set Forward Direction</strong> button.</p>
					</div>
					<div class="modal-footer">
						<a ui-turn-off="modalCalibrateForward" ui-turn-on="modalCalibrateCanceled" class="btn btn-default">Cancel</a>
						<a ng-click="setOrientation('forward')" ui-turn-off="modalCalibrateForward" ui-turn-on="modalCalibrateUp" class="btn btn-default btn-primary">Set Forward Direction</a>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="modal" ui-if="modalCalibrateUp" ui-state="modalCalibrateUp">
		<div class="modal-overlay "></div>
		<div class="vertical-alignment-helper center-block">
			<div class="modal-dialog vertical-align-center">
				<div class="modal-content">
					<div class="modal-header">
						<button class="close" ui-turn-off="modalCalibrateUp"></button>
						<h4 class="modal-title">Set AHRS Sensor Orientation: Up Direction</h4>
					</div>
					<div class="modal-body">
						<p>Place the Stratux/sensor box in the orientation it will be in during flight and press the <strong>Set Up Direction</strong> button.</p>
					</div>
					<div class="modal-footer">
						<a ui-turn-off="modalCalibrateUp" ui-turn-on="modalCalibrateCanceled" class="btn btn-default">Cancel</a>
						<a ng-click="setOrientation('up')" ui-turn-off="modalCalibrateUp" ui-turn-on="modalCalibrateDone" class="btn btn-default btn-primary">Set Up Direction</a>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="modal" ui-if="modalCalibrateDone" ui-state="modalCalibrateDone">
		<div class="modal-overlay "></div>
		<div class="vertical-alignment-helper center-block">
			<div class="modal-dialog vertical-align-center">
				<div class="modal-content">
					<div class="modal-header">
						<button class="close" ui-turn-off="modalCalibrateDone"></button>
						<h4 class="modal-title">Set AHRS Sensor Orientation: Finished</h4>
					</div>
					<div class="modal-body">
						<p>The sensors are calibrated.  These settings will be saved for future flights.</p>
					</div>
					<div class="modal-footer">
						<a ui-turn-off="modalCalibrateDone" class="btn btn-default btn-primary">OK</a>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="modal" ui-if="modalCalibrateFailed" ui-state="modalCalibrateFailed">
		<div class="modal-overlay "></div>
		<div class="vertical-alignment-helper center-block">
			<div class="modal-dialog vertical-align-center">
				<div class="modal-content">
					<div class="modal-header">
						<button class="close" ui-turn-off="modalCalibrateFailed"></button>
						<h4 class="modal-title">Set AHRS Sensor Orientation: Failed!</h4>
					</div>
					<div class="modal-body">
						<p>There was an error: {{Orientation_Failure_Message}}</p>
						<p><div id="orientationFailureMessage"></div></p>
						<p>The calibration failed.</p>
					</div>
					<div class="modal-footer">
						<a ui-turn-off="modalCalibrateFailed" class="btn btn-default btn-primary">OK</a>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="modal" ui-if="modalCalibrateCanceled" ui-state="modalCalibrateCanceled">
		<div class="modal-overlay "></div>
		<div class="vertical-alignment-helper center-block">
			<div class="modal-dialog vertical-align-center">
				<div class="modal-content">
					<div class="modal-header">
						<button class="close" ui-turn-off="modalCalibrateCanceled"></button>
						<h4 class="modal-title">Set AHRS Sensor Orientation: Canceled</h4>
					</div>
					<div class="modal-body">
						<p>Calibration canceled.</p>
					</div>
					<div class="modal-footer">
						<a ui-turn-off="modalCalibrateCanceled" class="btn btn-default btn-primary">OK</a>
					</div>
				</div>
			</div>
		</div>
	</div>

</div>


{'fraction_non_alphanumeric': 0.18140360648889509, 'fraction_numerical': 0.006892710436538328, 'mean_word_length': 3.2824985092426955, 'pattern_counts': {'":': 0, '<': 873, '<?xml version=': 0, '>': 873, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4592800', 'n_tokens_mistral': 11725, 'n_tokens_neox': 9582, 'n_words': 1980}