-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
92 lines (54 loc) · 1.93 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
include('header.php');
#Retrieve single line from DB
#Convert NMEA string
#Add to plots
if(isset($_GET['cruise']) &&isset($_GET['haul'])){
$cruise = $_GET['cruise'];
$haul = $_GET['haul'];
echo '<h2>Now logging '.$cruise.' Haul: '.$haul.'</h2>';
echo '<div style="float:left; padding:0px;">';
chartme('warp','Warp out ','http://localhost/wkinvited/livedata.php', 3000,0,150,'warps',400,100, "#154696", 15);
echo '</div>';
echo '<div style="float:right; padding:0px;">';
chartme('Doors','Door Spread','http://localhost/wkinvited/livedata.php', 3000,0,150,'doors',400,100, "#baff3a", 15);
echo '</div>';
?>
<div>
<form action="index.php" method = "GET">
<input type="hidden" name="cruise" value="<?php echo $cruise;?>">
<input type="hidden" name="haul" value="<?php echo $haul;?>">
<input type="hidden" name="event" value="event">
<input type="text" name="note">
<input type="submit" value="Mark Event">
</form>
</div>
<div>
<form action="index.php" method = "GET">
<input type="hidden" name="event" value="stop">
<input type="submit" value="Stop">
</form>
</div>
<?php
} else {
echo '<div style="float:left; padding:0px;">';
chartme('warp','Warp out ','http://localhost/wkinvited/livedata.php', 1000,0,150,'warps',400,100, "#154696");
echo '</div>';
echo '<div style="float:right; padding:0px;">';
chartme('Doors','Door Spread','http://localhost/wkinvited/livedata.php', 3000,0,150,'doors',400,100, "#baff3a");
echo '</div>';
?>
<div>
<form action="index.php" method = "GET">
<input type="hidden" name="event" value="start">
<input type="text" name="cruise">
<input type="text" name="haul">
<input type="submit" value="start">
</form>
</div>
<?php
}
$mydata = new NMEAParser();
$output = $mydata -> parseLine('$PSCMSM2,091626.00,A,DST,1,,4.69,15*');
print_r($output);
?>