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 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
| unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, OoMisc, AdPort, TeEngine, Series, TeeProcs,
Chart, AdPacket, Math, TeeGalleryPanel, ComCtrls, TeePolar, TeeRose, Unit2,
TeeEdit;
CONST nbCells = 20;
CONST nbMesureMax = 288;
type
ArrayOfArrayOfReal = array[0..nbCells-1] of array[0..288] of real;
type
TForm1 = class(TForm)
PageControl1: TPageControl;
TabSheet1: TTabSheet;
GroupBox1: TGroupBox;
Label1: TLabel;
GroupBox2: TGroupBox;
Label2: TLabel;
GroupBox5: TGroupBox;
Label12: TLabel;
GroupBox9: TGroupBox;
Label3: TLabel;
Label4: TLabel;
Label8: TLabel;
Label9: TLabel;
Chart5: TChart;
Series5: TWindRoseSeries;
GroupBox10: TGroupBox;
Label18: TLabel;
Label19: TLabel;
Label20: TLabel;
Label21: TLabel;
Chart6: TChart;
Series6: TWindRoseSeries;
GroupBox11: TGroupBox;
Label5: TLabel;
Label10: TLabel;
Label6: TLabel;
Label11: TLabel;
Chart7: TChart;
Series7: TWindRoseSeries;
GroupBox12: TGroupBox;
Label22: TLabel;
Label23: TLabel;
Label24: TLabel;
Label25: TLabel;
Chart8: TChart;
Series8: TWindRoseSeries;
GroupBox3: TGroupBox;
Label14: TLabel;
Label15: TLabel;
Label16: TLabel;
Label17: TLabel;
Chart9: TChart;
Series9: TWindRoseSeries;
TabSheet2: TTabSheet;
Label13: TLabel;
GroupBox7: TGroupBox;
Chart1: TChart;
Series1: TLineSeries;
Chart3: TChart;
Series2: TLineSeries;
GroupBox8: TGroupBox;
Chart2: TChart;
Series3: TLineSeries;
Chart4: TChart;
Series4: TLineSeries;
ComboBox2: TComboBox;
TabSheet3: TTabSheet;
Memo1: TMemo;
CheckBox2: TCheckBox;
CheckBox1: TCheckBox;
CheckBox3: TCheckBox;
GroupBox4: TGroupBox;
Label26: TLabel;
GroupBox6: TGroupBox;
Label27: TLabel;
GroupBox13: TGroupBox;
Label28: TLabel;
ApdComPort1: TApdComPort;
ApdDataPacket1: TApdDataPacket;
GroupBox14: TGroupBox;
Label29: TLabel;
GroupBox15: TGroupBox;
Label30: TLabel;
Timer1: TTimer;
ChartEditor1: TChartEditor;
Timer2: TTimer;
procedure Timer2Timer(Sender: TObject);
procedure ComboBox2Change(Sender: TObject);
procedure Chart5Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure ApdDataPacket1Packet(Sender: TObject; Data: Pointer;
Size: Integer);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure ScrollingTableaux(var Tab: Array of real); Overload;
procedure trace_courbes();
private
Procedure ScrollingTableaux(var Tab: Array of TDateTime); Overload;
procedure ScrollingTableaux(var Tab: ArrayOfArrayOfReal); Overload;
public
//stockage des données pour les graphiques 6, 12, 24H
// Interval 5 min => 12 relevés par heures => 288 relevés par 24 H
courant_vit: ArrayOfArrayOfReal;
courant_dir: ArrayOfArrayOfReal;
vent_vit: array[0..288] of real;
vent_dir: array[0..288] of real;
heure_mesure: array[0..288] of Tdatetime;
nbMesure, Echelle: integer;
donneeManquantes: boolean;
end;
Type
TAquaProPlusMTO = record
Bof: array[0..4] of byte;
sync: byte;
id: byte;
Taille: Word;
//Taille: array[0..1] of byte;
Date: array[1..6] of byte;
error: word;
AnaIn1: word;
battery: smallint;
SndSpeed: word;
heading: word;
Pitch: smallint;
Roll: smallint;
PressureMSB: byte;
Status: byte;
PressureLSW: word;
Temperature: word;
spd: array[0..2] of array[0..nbCells-1] of smallint;
Amp: array[0..2] of array[0..nbCells-1] of byte;
// bof3: byte;
CheckSum: smallint;
syncMTO: byte;
idMTO: byte;
WdMoy: word;
WsMoy: word;
WdMax: word;
WsMax: word;
TemperatureMTO: word;
PressionMTO: word;
Humidite: word;
CheckSumMOT: smallint;
end;
var
Form1: TForm1;
implementation
{$R *.dfm} |
Partager