<?php require_once "atp.header.php"; ?>

<section data-heading="other-data" class="content-wrapper" id="nav">
	<!--Heading-->
	<div class="page-title">
		<h1>Navigation</h1>
		<p>
            Navigation source selection for redistribution to network displays.
		</p>
	</div>

    <!--Source Selection-->
	<div id="source-selection-container">
		<div class="box box-top">
			<div class="flex-row">
				<div class="flex-heading">
					<h2>Navigation Source:</h2>
				</div>
				<select id="nav-source-select">
                    <option value="">No Source</option>
                    <option value="expedition">Expedition</option>
                    <option value="nmea0183">NMEA0183</option>
                    <option value="canbus">CANbus</option>
				</select>
			</div>
		</div>
	</div>

    <div class="box box-bottom" id="source-select-container"></div>

    <!--Live Data-->
    <div class="box box-top nav-grid">
        <h2>Waypoint Latitude</h2>
        <div class="field-container" data-field="<?php echo fieldEnum::GPS_Waypoint_Lat;?>" id="wpt-lat">&nbsp;</div>
        <h2>Waypoint Longitude</h2>
        <div class="field-container" data-field="<?php echo fieldEnum::GPS_Waypoint_Long;?>" id="wpt-long">&nbsp;</div>

        <h2>XTE</h2>
        <div class="field-container" data-field="<?php echo fieldEnum::GPS_XTE;?>" id="xte">&nbsp;</div>
        <h2>VMC</h2>
        <div class="field-container" data-field="<?php echo fieldEnum::GPS_VMC;?>" id="vmg">&nbsp;</div>
    </div>
    <div class="box box-bottom nav-grid">
        <h2>Dist to WPT</h2>
        <h2>Bear to WPT &deg;T</h2>
        <h2>Bear to WPT &deg;M</h2>
        <h2>Time to WPT</h2>
        <div class="field-container" data-field="<?php echo fieldEnum::GPS_Dist_To_Wpt;?>" id="dist-to-wpt">&nbsp;</div>
        <div class="field-container" data-field="<?php echo fieldEnum::GPS_Bear_To_Wpt_T;?>" id="bear-to-wpt-t">&nbsp;</div>
        <div class="field-container" data-field="<?php echo fieldEnum::GPS_Bear_To_Wpt_M;?>" id="bear-to-wpt-m">&nbsp;</div>
        <div class="field-container" data-field="<?php echo fieldEnum::GPS_TimeToWayPoint;?>" id="time-to-wpt">&nbsp;</div>

        <h2>Dist to WPT (GC)</h2>
        <h2>Bear to WPT &deg;T (GC)</h2>
        <h2>Bear to WPT &deg;M (GC)</h2>
        <h2>Time to WPT</h2>
        <div class="field-container" data-field="<?php echo fieldEnum::GPS_DistToWptGC;?>" id="dist-to-wpt-gc">&nbsp;</div>
        <div class="field-container" data-field="<?php echo fieldEnum::GPS_BearToWptGC_T;?>" id="bear-to-wpt-gc-t">&nbsp;</div>
        <div class="field-container" data-field="<?php echo fieldEnum::GPS_BearToWptGC_M;?>" id="bear-to-wpt-gc-m">&nbsp;</div>
        <div class="field-container" data-field="<?php echo fieldEnum::GPS_TimeToWayPoint;?>" id="time-to-wpt-gc">&nbsp;</div>
    </div>

    <!--Buttons-->
	<div class="button-box" id="button-container">
		<div class="box">
			<a id="ok-button" class="button button-gray button-medium">OK</a>
			<a id="cancel-button" class="button button-gray button-medium">Cancel</a>
			<a id="apply-button" class="button button-gray button-medium">Apply</a>
		</div>
	</div>
</section>

<script type="text/javascript" src="js/atp.navigation.js" defer></script>
<script>
$(document).ready(function() {
    var model = new NavigationModel();
    var controller = new NavigationController(model);
    var view = new NavigationView(controller);
});
</script>

<?php require_once "footer.php"; ?>