Здравствуйте!! В VB 6.0 я пока новичок и практически каждое мое действие сопровождается длительным и утомительным поиском решения проблем. С самыми простейшими вещами вроде разобрался, а вот графики...ну никак!! Явно хромает синтаксис...(((
Вот то что у меня пока получилось, вернее получилось только отчасти (Н - высота в метрах над уровнем моря; р - атмосферное давление на высоте; Т - температура воздуха на высоте), этот график так и показывает у меня прямую линию, не могу понять в чем дело:
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13.
Dim H As Single, p As Single, T As Single
Private Sub ISA_Click()
H = Combo1.Text
PicGraph.Scale (-12000, 12000)-(12000, -12000) 'Сделал масштаб для PictureBox'
For H = 0 To 11000 Step 10
PicGraph.PSet (H, p), vbRed
Next H
For T = 288.15 To 0 Step 1
T = 288.15 - 6.5 * Combo1.Text / 1000
PicGraph.PSet (H, T), vbBlue
Next T
End Sub
Помогите пожалуйста составить график МСА на основании ниже представленных данных и подскажите возможные пути упрощения этого нагромождения данных, если это возможно!!! Заранее благодарен!
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. 161. 162. 163. 164. 165. 166. 167. 168. 169. 170. 171. 172. 173. 174. 175. 176. 177. 178. 179. 180. 181. 182. 183. 184. 185. 186. 187. 188. 189. 190. 191. 192. 193. 194. 195. 196. 197. 198. 199. 200. 201. 202. 203. 204. 205. 206. 207. 208. 209. 210. 211. 212. 213. 214. 215. 216. 217. 218. 219. 220. 221. 222. 223. 224. 225. 226. 227. 228. 229. 230. 231. 232. 233. 234. 235. 236. 237. 238. 239. 240. 241. 242. 243. 244. 245. 246. 247. 248. 249. 250. 251. 252. 253. 254. 255. 256. 257. 258. 259. 260. 261. 262. 263. 264. 265. 266. 267. 268. 269. 270. 271. 272. 273. 274. 275. 276. 277. 278. 279. 280. 281. 282. 283. 284. 285. 286. 287. 288. 289. 290. 291. 292. 293. 294. 295. 296. 297. 298. 299. 300. 301. 302. 303. 304. 305. 306. 307. 308. 309. 310. 311. 312. 313. 314. 315. 316. 317. 318. 319. 320. 321. 322. 323. 324. 325. 326. 327. 328. 329. 330. 331. 332. 333. 334. 335. 336. 337. 338. 339. 340. 341. 342. 343. 344. 345. 346. 347. 348. 349. 350. 351. 352. 353. 354. 355. 356. 357. 358. 359. 360. 361. 362. 363. 364. 365. 366. 367. 368. 369. 370. 371. 372. 373. 374. 375. 376. 377. 378. 379. 380. 381. 382. 383. 384. 385. 386. 387. 388. 389. 390. 391. 392. 393. 394. 395. 396. 397. 398. 399. 400. 401. 402. 403. 404. 405. 406. 407. 408. 409. 410. 411. 412. 413. 414. 415. 416. 417. 418. 419. 420. 421. 422. 423. 424. 425. 426. 427. 428. 429. 430. 431. 432. 433. 434. 435. 436. 437. 438. 439. 440. 441. 442. 443. 444. 445. 446. 447. 448. 449. 450. 451.
'Высота в метрах над уровнем моря'
Private Sub Form_Load()
Combo1.AddItem 0, 0
Combo1.AddItem 100, 1
Combo1.AddItem 200, 2
Combo1.AddItem 300, 3
Combo1.AddItem 400, 4
Combo1.AddItem 500, 5
Combo1.AddItem 600, 6
Combo1.AddItem 700, 7
Combo1.AddItem 800, 8
Combo1.AddItem 900, 9
Combo1.AddItem 1000, 10
Combo1.AddItem 1100, 11
Combo1.AddItem 1200, 12
Combo1.AddItem 1300, 13
Combo1.AddItem 1400, 14
Combo1.AddItem 1500, 15
Combo1.AddItem 1600, 16
Combo1.AddItem 1700, 17
Combo1.AddItem 1800, 18
Combo1.AddItem 1900, 19
Combo1.AddItem 2000, 20
Combo1.AddItem 2100, 21
Combo1.AddItem 2200, 22
Combo1.AddItem 2300, 23
Combo1.AddItem 2400, 24
Combo1.AddItem 2500, 25
Combo1.AddItem 2600, 26
Combo1.AddItem 2700, 27
Combo1.AddItem 2800, 28
Combo1.AddItem 2900, 29
Combo1.AddItem 3000, 30
Combo1.AddItem 3100, 31
Combo1.AddItem 3200, 32
Combo1.AddItem 3300, 33
Combo1.AddItem 3400, 34
Combo1.AddItem 3500, 35
Combo1.AddItem 3700, 36
Combo1.AddItem 3800, 37
Combo1.AddItem 3900, 38
Combo1.AddItem 4000, 39
Combo1.AddItem 4100, 40
Combo1.AddItem 4200, 41
Combo1.AddItem 4300, 42
Combo1.AddItem 4400, 43
Combo1.AddItem 4500, 44
Combo1.AddItem 4600, 45
Combo1.AddItem 4700, 46
Combo1.AddItem 4800, 47
Combo1.AddItem 4900, 48
Combo1.AddItem 5000, 49
Combo1.AddItem 5100, 50
Combo1.AddItem 5200, 51
Combo1.AddItem 5300, 52
Combo1.AddItem 5400, 53
Combo1.AddItem 5500, 54
Combo1.AddItem 5600, 55
Combo1.AddItem 5700, 56
Combo1.AddItem 5800, 57
Combo1.AddItem 5900, 58
Combo1.AddItem 6000, 59
Combo1.AddItem 6100, 60
Combo1.AddItem 6200, 61
Combo1.AddItem 6300, 62
Combo1.AddItem 6400, 63
Combo1.AddItem 6500, 64
Combo1.AddItem 6600, 65
Combo1.AddItem 6700, 66
Combo1.AddItem 6800, 67
Combo1.AddItem 6900, 68
Combo1.AddItem 7000, 69
Combo1.AddItem 7100, 70
Combo1.AddItem 7200, 71
Combo1.AddItem 7300, 72
Combo1.AddItem 7400, 73
Combo1.AddItem 7500, 74
Combo1.AddItem 7600, 75
Combo1.AddItem 7700, 76
Combo1.AddItem 7800, 77
Combo1.AddItem 7900, 78
Combo1.AddItem 8000, 79
Combo1.AddItem 8100, 80
Combo1.AddItem 8200, 81
Combo1.AddItem 8300, 82
Combo1.AddItem 8400, 83
Combo1.AddItem 8500, 84
Combo1.AddItem 8600, 85
Combo1.AddItem 8700, 86
Combo1.AddItem 8800, 87
Combo1.AddItem 8900, 88
Combo1.AddItem 9000, 89
Combo1.AddItem 9100, 90
Combo1.AddItem 9200, 91
Combo1.AddItem 9300, 92
Combo1.AddItem 9400, 93
Combo1.AddItem 9500, 94
Combo1.AddItem 9600, 95
Combo1.AddItem 9700, 96
Combo1.AddItem 9800, 97
Combo1.AddItem 9900, 98
Combo1.AddItem 10000, 99
Combo1.AddItem 10100, 100
Combo1.AddItem 10200, 101
Combo1.AddItem 10300, 102
Combo1.AddItem 10400, 103
Combo1.AddItem 10500, 104
Combo1.AddItem 10600, 105
Combo1.AddItem 10700, 106
Combo1.AddItem 10800, 107
Combo1.AddItem 10900, 108
Combo1.AddItem 11000, 109
End Sub
Dim p As Single
'Атмосферное давление на высоте'
If Combo1.Text = 0 Then
T = 288.15
p = 101325
End If
If Combo1.Text = 100 Then
p = 100129
End If
If Combo1.Text = 200 Then
p = 98945.4
End If
If Combo1.Text = 300 Then
p = 97772.7
End If
If Combo1.Text = 400 Then
p = 96611.4
End If
If Combo1.Text = 500 Then
p = 95461.3
End If
If Combo1.Text = 600 Then
p = 94322.3
End If
If Combo1.Text = 700 Then
p = 93194.4
End If
If Combo1.Text = 800 Then
p = 92077.5
End If
If Combo1.Text = 900 Then
p = 90971.5
End If
If Combo1.Text = 1000 Then
p = 89876.3
End If
If Combo1.Text = 1100 Then
p = 88791.8
End If
If Combo1.Text = 1200 Then
p = 87718#
End If
If Combo1.Text = 1300 Then
p = 86654.8
End If
If Combo1.Text = 1400 Then
p = 85602#
End If
If Combo1.Text = 1500 Then
p = 84559.7
End If
If Combo1.Text = 1600 Then
p = 83527.7
End If
If Combo1.Text = 1700 Then
p = 82505.9
End If
If Combo1.Text = 1800 Then
p = 81494.3
End If
If Combo1.Text = 1900 Then
p = 80492.9
End If
If Combo1.Text = 2000 Then
p = 79501.4
End If
If Combo1.Text = 2100 Then
p = 78519.9
End If
If Combo1.Text = 2200 Then
p = 77548.3
End If
If Combo1.Text = 2300 Then
p = 76586.4
End If
If Combo1.Text = 2400 Then
p = 756342
End If
If Combo1.Text = 2500 Then
p = 74691.7
End If
If Combo1.Text = 2600 Then
p = 73758.8
End If
If Combo1.Text = 2700 Then
p = 72835.3
End If
If Combo1.Text = 2800 Then
p = 71921.3
End If
If Combo1.Text = 2900 Then
p = 71016.6
End If
If Combo1.Text = 3000 Then
p = 70121.2
End If
If Combo1.Text = 3100 Then
p = 69234.9
End If
If Combo1.Text = 3200 Then
p = 68357.8
End If
If Combo1.Text = 3300 Then
p = 67489.7
End If
If Combo1.Text = 3400 Then
p = 66630.6
End If
If Combo1.Text = 3500 Then
p = 65780.4
End If
If Combo1.Text = 3600 Then
p = 64939#
End If
If Combo1.Text = 3700 Then
p = 64105.4
End If
If Combo1.Text = 3800 Then
p = 63282.5
End If
If Combo1.Text = 3900 Then
p = 62467.2
End If
If Combo1.Text = 4000 Then
p = 61660.4
End If
If Combo1.Text = 4100 Then
p = 60852.2
End If
If Combo1.Text = 4200 Then
p = 60072.3
End If
If Combo1.Text = 4300 Then
p = 59290.8
End If
If Combo1.Text = 4400 Then
p = 58517.6
End If
If Combo1.Text = 4500 Then
p = 57752.6
End If
If Combo1.Text = 4600 Then
p = 56995.7
End If
If Combo1.Text = 4700 Then
p = 56246.9
End If
If Combo1.Text = 4800 Then
p = 55506.1
End If
If Combo1.Text = 4900 Then
p = 54773.2
End If
If Combo1.Text = 5000 Then
p = 54048.3
End If
If Combo1.Text = 5100 Then
p = 53331.1
End If
If Combo1.Text = 5200 Then
p = 52621.7
End If
If Combo1.Text = 5300 Then
p = 51920#
End If
If Combo1.Text = 5400 Then
p = 51225.9
End If
If Combo1.Text = 5500 Then
p = 50539.3
End If
If Combo1.Text = 5600 Then
p = 49860.2
End If
If Combo1.Text = 5700 Then
p = 49188.6
End If
If Combo1.Text = 5800 Then
p = 48524.3
End If
If Combo1.Text = 5900 Then
p = 47867.3
End If
If Combo1.Text = 6000 Then
p = 47217.6
End If
If Combo1.Text = 6100 Then
p = 46575.1
End If
If Combo1.Text = 6200 Then
p = 45939.6
End If
If Combo1.Text = 6300 Then
p = 45311.3
End If
If Combo1.Text = 6400 Then
p = 44689.9
End If
If Combo1.Text = 6500 Then
p = 44075.5
End If
If Combo1.Text = 6600 Then
p = 43467.9
End If
If Combo1.Text = 6700 Then
p = 42867.2
End If
If Combo1.Text = 6800 Then
p = 42273.2
End If
If Combo1.Text = 6900 Then
p = 41685.9
End If
If Combo1.Text = 7000 Then
p = 41105.3
End If
If Combo1.Text = 7100 Then
p = 40531.2
End If
If Combo1.Text = 7200 Then
p = 39963.7
End If
If Combo1.Text = 7300 Then
p = 39402.6
End If
If Combo1.Text = 7400 Then
p = 38848#
End If
If Combo1.Text = 7500 Then
p = 38299.7
End If
If Combo1.Text = 7600 Then
p = 37757.7
End If
If Combo1.Text = 7700 Then
p = 37221.9
End If
If Combo1.Text = 7800 Then
p = 36692.4
End If
If Combo1.Text = 7900 Then
p = 36169#
End If
If Combo1.Text = 8000 Then
p = 35651.6
End If
If Combo1.Text = 8100 Then
p = 35140.3
End If
If Combo1.Text = 8200 Then
p = 34634.9
End If
If Combo1.Text = 8300 Then
p = 34135.5
End If
If Combo1.Text = 8400 Then
p = 33641.9
End If
If Combo1.Text = 8500 Then
p = 33154.2
End If
If Combo1.Text = 8600 Then
p = 32672.2
End If
If Combo1.Text = 8700 Then
p = 32193.9
End If
If Combo1.Text = 8800 Then
p = 31725.2
End If
If Combo1.Text = 8900 Then
p = 31260.2
End If
If Combo1.Text = 9000 Then
p = 30800.7
End If
If Combo1.Text = 9100 Then
p = 30346.1
End If
If Combo1.Text = 9200 Then
p = 29898.1
End If
If Combo1.Text = 9300 Then
p = 29455#
End If
If Combo1.Text = 9400 Then
p = 29017.2
End If
If Combo1.Text = 9500 Then
p = 28584.7
End If
If Combo1.Text = 9600 Then
p = 28157.4
End If
If Combo1.Text = 9700 Then
p = 27735.3
End If
If Combo1.Text = 9800 Then
p = 27318.4
End If
If Combo1.Text = 9900 Then
p = 26906.6
End If
If Combo1.Text = 10000 Then
p = 26499.9
End If
If Combo1.Text = 10100 Then
p = 26098.1
End If
If Combo1.Text = 10200 Then
p = 25701.3
End If
If Combo1.Text = 10300 Then
p = 25309.5
End If
If Combo1.Text = 10400 Then
p = 24922.5
End If
If Combo1.Text = 10500 Then
p = 24540.2
End If
If Combo1.Text = 10600 Then
p = 24162.8
End If
If Combo1.Text = 10700 Then
p = 23790.1
End If
If Combo1.Text = 10800 Then
p = 23422.1
End If
If Combo1.Text = 10900 Then
p = 23058.7
End If
If Combo1.Text = 11000 Then
p = 22699.9
End If
End Sub
|