Source code: jflight/flightbook/Glider.java
1
2 /*
3 Project name: JFlight
4 Hosted at: www.sourceforge.net
5 Homepage: jflight.sourceforge.net
6 Licence: GNU public licence (GPL)
7 Filename: Glider.java
8 Package: jflight
9 */
10 package jflight.flightbook;
11
12 import jflight.db.*;
13
14 // import
15
16 /**
17 Glider class
18
19
20 Glider class OLC-class (?)
21 0
22 1 1
23 2 1
24 3 2
25 4 2
26 5
27 6
28
29 @since JDK1.1.x
30 @author Rüdiger Bien
31
32 CVS-section:
33 @file_version $Revision: 1.9 $
34
35 */
36
37 public class Glider extends PersistentObject{
38
39 public final static int UD = 0; // Undefined type
40 public final static int HG = 1; // Hangglider, standard (with kingpost)
41 public final static int HG_TL = 2; // Hangglider, topless
42 public final static int RW = 3; // Rigid Wing, unfaired
43 public final static int RW_FAIRED = 4; // Rigid Wing, faired
44 public final static int PG_OPEN = 5; // Paraglider, open class
45 public final static int PG_SPORT = 6; // Paraglider, sport class
46 public final static int PG_TANDEM = 7; // Paraglider, tandem
47 public final static int PG = 8; // Paraglider, any
48
49 private String gliderName; // Atos, Stealth, ...
50 private int gliderType; // HG, PG, RW
51 public double vh1, // hor. speed 1
52 vv1, // vert. speed 1
53 vh2, // ...
54 vv2;
55
56 public void setVh1(double vh1)
57 {
58 this.vh1 = vh1;
59 }
60
61 public double getVh1()
62 {
63 return vh1;
64 }
65
66 public void setVv1(double vv1)
67 {
68 this.vv1 = vv1;
69 }
70
71 public double getVv1()
72 {
73 return vv1;
74 }
75
76 public void setVh2(double vh2)
77 {
78 this.vh2 = vh2;
79 }
80
81 public double getVh2()
82 {
83 return vh2;
84 }
85
86 public void setVv2(double vv2)
87 {
88 this.vv2 = vv2;
89 }
90
91 public double getVv2()
92 {
93 return vv2;
94 }
95
96 /**
97 * Constructor Glider
98 *
99 *
100 * @param name glider name
101 * @param GliderType glider type
102 * @param Vh1 polar values
103 * @param Vv1
104 * @param Vh2
105 * @param Vv2
106 *
107 */
108 public Glider(String name, int gliderType, double vh1, double vv1,
109 double vh2, double vv2) {
110
111 this(name,gliderType);
112 this.vh1 = vh1;
113 this.vv1 = vv1;
114 this.vh2 = vh2;
115 this.vv2 = vv2;
116 }
117
118 public Glider(String name, int gliderType)
119 {
120 this.gliderName = name;
121 this.gliderType = gliderType;
122 this.changed = true;
123 }
124
125 public Glider(String name)
126 {
127 this.gliderName = name;
128 this.changed = true;
129 }
130
131 /**
132 * Method getGliderName
133 *
134 *
135 * @return name of the glider
136 *
137 */
138 public String getGliderName() {
139 if( gliderName == "" ) return new String("UnknownGliderName");
140 return gliderName;
141 }
142
143 public void setGliderName(String aName) {
144 this.gliderName = aName;
145 this.changed = true;
146 }
147 /**
148 * Method getGliderType
149 *
150 *
151 * @return glider type: HG / PG / RW
152 *
153 */
154 public int getGliderType() {
155 return gliderType;
156 }
157
158 public void setGliderType(int aType) {
159 this.gliderType = aType;
160 this.changed = true;
161 }
162
163 public String toString()
164 {
165 return gliderName;
166 }
167
168 }