-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathltauav.cfr
98 lines (93 loc) · 2.81 KB
/
ltauav.cfr
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
// Example SWaP-C Analysis for a LTA UAV in Clafer
// See https://www.clafer.org/
// Features considered for this analysis need to have
// annotations for SWaP-C
abstract SwapcFeature
weight -> integer
power -> integer
price -> integer
abstract LtaUav
// xor means that only one gets selected
// so, choose a type of hull
xor hull
// partBalloon leaks quicker--add to feature model?
partyBalloon: SwapcFeature
[weight = -50]
[power = 0]
[price = 1]
// e.g., something on amazon
cheapHull: SwapcFeature
[weight = -75]
[power = 0]
[price = 20]
// e.g., an expensive hobbyist hull
niceHull: SwapcFeature
[weight = -110]
[power = 0]
[price = 50]
// the chassis and airframe
frame: SwapcFeature
[weight = 25]
[power = 0]
[price = 15]
// main control board (e.g., a Pixhawk)
mainBoard: SwapcFeature
[weight = 5]
[power = 5]
[price = 65]
// motor + propeller assembly
// you can consider this also negative weight because
// propulsion (but NOT neutral bouyancy)
motorAssembly: SwapcFeature 3..5
[weight = 15]
[power = 8]
[price = 25]
// we can add application possibilites as a feature
// note the or, meaning we can have more than one
or payload
visionModule
camera: SwapcFeature
[weight = 4]
[power = 1]
[price = 30]
visionBoard: SwapcFeature
[weight = 7]
[power = 5]
[price = 40]
advertisement
led: SwapcFeature
[weight = 1]
[power = 2]
[price = 5]
autonomy
camera: SwapcFeature
[weight = 4]
[power = 1]
[price = 30]
lidar: SwapcFeature
[weight = 10]
[power = 10]
[price = 80]
autopilot: SwapcFeature
[weight = 7]
[power = 25]
[price = 70]
battery: SwapcFeature 1..3
[weight = 25]
// maybe make this negative?
[power = 0]
[price = 15]
totalWeight -> integer = sum SwapcFeature.weight
totalPower -> integer = sum SwapcFeature.power
exampleUav: LtaUav
// additional constraints
// neutral bouyancy is a must
[totalWeight <= 0]
// spend less than 40 watts
[totalPower <= 40]
// require at least vision or autonomy
[visionModule || autonomy]
// TODO: we can do stuff life specify duration
// by taking the battery watt hours against the totalPower
// minimize weight in this case
<<minimize exampleUav.totalWeight>>