Files
apt-nl-map/static/Magic4/Flight_Display/Heading.html
2024-12-04 10:21:04 +08:00

49 lines
1.5 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/default.css">
<!-- Syntax coloration -->
<link rel="stylesheet" type="text/css" href="_examples_data/prism/prism.css" />
<link rel="stylesheet" type="text/css" href="_examples_data/style.css" />
<link rel="stylesheet" type="text/css" href="css/flightindicators.css" />
</head>
<body>
<div class="examples">
<!-- The block where we want to place an indicator -->
<span id="first_attitude"></span>
</div>
<div class="examples">
<span id="heading"></span>
</div>
</div>
<!-- Syntax color -->
<script src="_examples_data/prism/prism.js"></script>
<!-- Importing jQuery library -->
<script src="js/jquery-2.1.0.min.js"></script>
<script src="js/jquery.cookie.js"></script>
<!-- Importing the FlightIndicators library -->
<script src="js/jquery.flightindicators.js"></script>
<script type="text/javascript">
var heading = $.flightIndicator('#heading', 'heading', {heading:150, showBox:false});
// Update at 20Hz
setInterval(function() {
// Heading update
var Car_Global_Theta= $.cookie('Car_Global_Theta');
console.log("cookie"+Car_Global_Theta);
heading.setHeading(0-Car_Global_Theta);
}, 50);
</script>
</body>
</html>