Project

General

Profile

Download (2.95 KB) Statistics
| Branch: | Tag: | Revision:
1

    
2

    
3

    
4
node AutoPilot ( HeadMode  : real ; ailStick  : real ; elevStick  : real ; AltMode_Out1_41  : real ; FPAMode_Out1_51  : real ; ATMode_Out1_61  : real ; AltCmd_Out1_71  : real ; Altitude_Out1_81  : real ; CAS_Out1_91  : real ; CASCmdMCP_Out1_101  : real  ) 
5
   returns ( HeadEng  : bool ; AltEng  : bool ; FPAEng_In1_1051  : bool ; ATEng_In1_1063  : bool ; CASCmd_In1_1075  : real  ) ;
6
  
7
let
8
  -- GUIDE-180
9
  assert (FPAMode_Out1_51 = 0.0) or (not (ailStick = 0.0)) or (not (elevStick = 0.0)) or (FPAEng_In1_1051 = true);
10

    
11
  -- ALT-1
12
  assert (not (AltMode_Out1_41 = 0.0)) or (AltEng = false);
13
tel 
14

    
15

    
16

    
17
node AltitudeControl ( AntEng  : bool ; AltCmd_Out1_29  : real ; Alt_Out1_39  : real ; GsKts_Out1_49  : real ; hdot_Out1_59  : real ; hdotChgRate_Out1_69  : real  ) 
18
   returns ( altgammacmd_In1_661  : real  ) ;  
19
let
20

    
21
  -- ALT-2
22
  assert (AntEng = true) or (altgammacmd_In1_661 = 0.0);
23
tel 
24

    
25
node FPAControl ( engage  : bool ; gamcmd_Out1_25  : real ; gamma_Out1_35  : real ; thetadeg_Out1_45  : real ; VT_Out1_55  : real  ) 
26
   returns ( PitchCmd_In1_487  : real ; prePitch : real) ;  
27
let
28

    
29
  assert true -> (engage = false) or (gamcmd_Out1_25 =  gamma_Out1_35) 
30
             or ((gamcmd_Out1_25 > gamma_Out1_35) and  (PitchCmd_In1_487 >  pre(prePitch)))
31
             or  ((gamcmd_Out1_25 < gamma_Out1_35) and  (PitchCmd_In1_487 < pre(prePitch)));
32

    
33
 tel 
34

    
35

    
36

    
37
node top (HeadMode  : real ; ailStick  : real ; elevStick  : real ; AltMode  : real ; FPAMode  : real ; ATMode_Out1_61  : real ; AltCmd_Out1_71  : real ; Altitude_Out1_81  : real ; CAS_Out1_91  : real ; CASCmdMCP_Out1_101  : real ; AltCmd : real ; Altitude : real ; gskts  : real ; hdot  : real;  hdot_change_rate  : real ; gamcmd_Out1_25  : real ; gamma_Out1_35  : real ; thetadeg_Out1_45  : real ; VT_Out1_55  : real ) 
38
   returns ( obs: bool) ;
39
  var 
40
    altgammaCmd  : real;
41
    fpain : real;
42
    tempAlt : real;
43
    tempFPA : real;
44
    HeadEng : bool;
45
    AltEng : bool;
46
    FPAEng : bool;
47
    ATEng : bool;
48
    CasCmd : real;
49
    PitchCmd : real;
50
    prePitch : real;
51
let
52

    
53
  HeadEng, AltEng, FPAEng, ATEng, CasCmd = AutoPilot(HeadMode, ailStick, elevStick, AltMode, FPAMode, ATMode_Out1_61, AltCmd_Out1_71, Altitude_Out1_81, CAS_Out1_91, CASCmdMCP_Out1_101);
54
     
55
  altgammaCmd =  AltitudeControl (AltEng, AltCmd,  Altitude, gskts, hdot, hdot_change_rate );
56
  
57
  -- FIXME: if we write this as code and not as assertion, the property cannot be proven, why??
58
  assert fpain = (altgammaCmd + gamcmd_Out1_25);
59

    
60
  PitchCmd, prePitch = FPAControl(FPAEng ,fpain ,gamma_Out1_35 , thetadeg_Out1_45, VT_Out1_55);
61
  
62
  assert (AltMode = 0.0);
63
  assert (not (FPAMode = 0.0));
64
  assert (elevStick = 0.0);
65
  assert (ailStick = 0.0);
66

    
67
  assert (gamcmd_Out1_25 < -1.0 and gamcmd_Out1_25 > -10.0);
68

    
69
  obs = true -> (gamcmd_Out1_25 =  gamma_Out1_35) 
70
             or ((gamcmd_Out1_25 > gamma_Out1_35) and  (PitchCmd >  pre(prePitch)))
71
             or  ((gamcmd_Out1_25 < gamma_Out1_35) and  (PitchCmd < pre(prePitch)));
72

    
73
 --!MAIN : true;
74
--!PROPERTY: obs = true;
75

    
76
tel
(12-12/28)