Recent

Author Topic: DataProblems Maybe  (Read 29552 times)

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: DataProblems Maybe
« Reply #90 on: May 05, 2019, 04:49:06 am »
@lucmar

I don't know. Not getting a apt.bak file


That should mean your apt.dat and apt.txt don't have the UTF8 BOM. My program is as lazy as myself: if there's nothing to do it does nothing :D

It only does something (and so creates the .bak) if the original file had a UTF8 BOM. But  if not it should tell you so: the message, IIRC, is something like: "That file doesn't need me: doesn't have a BOM."

I downloaded the apt.dat, will test it when (if!) I have a little time.

ETA: Oh, Thausand tested already. OK, then.

EATA
I not know program lucamar cleanbom but when have not BOM then why write file ? Then maybe program cleanbom read no BOM and then no write file new and no need file "apt.bak" ?

Yes, that's exactly how it works :)
« Last Edit: May 05, 2019, 05:03:14 am by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: DataProblems Maybe
« Reply #91 on: May 05, 2019, 06:56:16 am »
Here is where I'm at:

Went back and copied from:
C:\X-Plane 11\Resources\default scenery\default apt dat\Earth nav data\apt.dat
TO:
 c:\userfiles\apt.dat

Ran CleanBom

Ran MstAirports and generated a new byAirports.txt 34,680 records generated.

Ran Extractwordtext (Nice test) and tested the first record.

7 fields -everything OK

ran MstRegions and clicked on the first record which is always
[00C][28944][Nil][Nil][K2][37.203177778][-107.869194444]

Everything is Ok so I don't have a UTF8 BOM problem

Now to run down Thausand findings

FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

Thausand

  • Sr. Member
  • ****
  • Posts: 292
Re: DataProblems Maybe
« Reply #92 on: May 05, 2019, 09:23:52 am »
Hi hello JLWest,

I make new test (have fix 1 line miss error, was wrong count  :-[ ) and not can make same count like you program.

Alone when count airport ID 1, 16 and 17 then my program have almost same count you "ByAirport.txt". I have you "ByAirport.txt" size 2383401 and have ICAO 34680.

Then my program have many more ICAO  (have 35242) :o

I write list ICAO have my program and no have you "ByAirport.txt".

Then can see is no there normal ID "1" also in "ByAirport.txt" (have example EDUY) and also miss other ID airport "16" and "17". Then i think maybe error is in program you ?

Is 562 count list ICAO:
Code: [Select]
01MN
03M
05B
08MN
09Y
0FD6
0G5
0MI5
0MN0
0MN2
0MN4
0O0
0TN1
0W0
0W7
0Z3
10MA
11MN
12MN
13S
13Z
14MN
16MN
16WI
16Z
17MN
19Y
1AL9
1FD1
1IS9
1MI0
1MN4
1MN9
1MU1
1O0
1WI5
1Z9
21H
21MN
22MN
28MN
2MA6
2MA7
2MN5
2N7
2OG3
2Q4
2R3
2Y3
2Z1
2Z6
30W
34MN
3FD9
3LA2
3MD9
3MI9
3TN2
3Z8
3Z9
42FL
43FD
44NJ
45D
48B
4FD4
4FD5
4LA9
4MN1
4NC9
4NJ2
4NY2
4Z7
50MI
51MI
51Y
52B
52Z
53LA
54NJ
58NJ
5BL
5CA9
5J2
5KE
5L6
5LA6
5MA8
5N6
5N9
5X3
5Z1
5Z9
60B
61FD
62FD
63A
68A
6FL5
6MA0
6MA8
6MA9
6MD6
6MN4
6N6
6N7
6NJ7
6NY6
70B
70MY
71C
75B
75PN
78B
78U
78Z
7K2
7N3
7VA7
7W8
7WI1
7Y6
80B
81W
83B
83FD
83Q
85B
85VA
87B
89FD
8AK4
8IL7
8IL9
8K9
8MN0
8NA1
8X0
91FL
94D
96WI
96Z
98FD
98FL
99Z
9C0
9FD0
9M0
9MN3
9MN8
9N2
9X6
9Y5
9Y6
9Z3
9Z4
AK16
AK19
AK27
AK29
AK34
AK36
AK43
AK56
AK57
AK58
AK62
AK81
AK84
AL46
ALZ
AQS
B18
BNF
BQV
BXL
C39
C54
CA2E
CA2S
CAA9
CAML
CAN6
CAN8
CAU6
CGA
CJB7
CJD9
CJX8
CJY9
CJZ6
CJZ9
CKB4
CKB5
CKC2
CKE4
CKG6
CKP5
CKU3
CKW5
CML1
CN20
CNC8
CND9
CNH7
CNQ7
CNS2
CPB6
CPT7
CSKC
CT16
CT30
CT78
CT82
CT87
CTM2
CWB1
CXBB
CYBH
CYDX
CYHC
CYIG
CZSW
DE13
E20
EDUY
ES05
ES06
ES07
EXI
F57
FA05
FA17
FA23
FD12
FD79
FD80
FD98
FL04
FL26
FL42
H11
H63
HWI
HYL
I04
ID28
IN59
IS79
K40
K45
KAE
KBE
KCC
KCDD
KCN
KIB
KKB
KKI
KKL
KKPB
KMY
KOY
KPH
KPR
KPY
KQA
KTB
KVU
KWF
KWK
KWP
KXA
L85
LA16
LA64
LEGO
M00
M14
M49
M57
M69
MA01
MA06
MA12
MA25
MA36
MA65
MA74
MA78
MA82
MA87
MD80
ME01
ME04
ME09
ME11
ME12
ME27
ME30
ME43
ME50
ME51
ME63
ME67
ME80
ME90
MI03
MN03
MN05
MN09
MN21
MN29
MN30
MN35
MN72
MN73
MN78
MN80
MO07
MY21
MY22
MY23
MY31
MY32
MY33
MY34
MY36
MY38
MY48
MY73
MY74
MY83
MY96
NFCS
NH36
NH37
NH64
NH71
NJ07
NK13
NK30
NK59
NK60
NY47
NY61
O06
O12
OOH
ORV
PA90
PAAP
PAEL
PAFK
PAHY
PAMM
PANR
PAQC
PEC
PN19
PN24
PN65
PR03
PS88
PWR
PYL
Q83
Q86
Q87
QAHO
QEVG
QFFS
QHNA
QILO
QJON
QKKI
QKRE
QLAN
QLEH
QLHA
QLTO
QMDY
QOHE
QONA
QPLM
QPUU
QPYM
QPYN
QULA
QWLK
QXMS
QZFJ
RI06
S60
SCGR
SP00
SP01
SP02
SP03
SP04
SP05
SP06
SP07
SP08
SP09
SP10
SP11
SP12
SP13
SP14
SP15
SP16
SP17
SP18
SP19
SP20
SP21
SP22
SP23
SP24
SP25
SP26
SP27
SPRH
SYBD
SYPW
SYRI
T38
TKL
TLG1
TTL
VA48
VT57
VT58
W26
W36
W37
W49
W55
WA39
WA83
WI27
WI35
WN19
WN66
WS01
WS24
WSB
WSJ
WV35
WV37
WV38
WV39
WV40
WV41
WV42
WV43
WV44
WV46
WWT
X66
X67
X96
XCKC5
XSA
XXEI
YAIN
YAIS
YARF
YBAT
YBDA
YBEX
YBVR
YBWK
YBWS
YCGP
YCON
YCRE
YDDI
YDHM
YDLR
YDOL
YDRY
YEST
YFLF
YFLY
YFRA
YGN
YGNI
YGUU
YHC
YHED
YHOW
YHPB
YHRN
YHSR
YHYN
YJEB
YKRI
YKT
YLMI
YMBS
YMCY
YMID
YMIE
YMKH
YMRR
YMSD
YNBY
YNOI
YNOM
YOPH
YOPY
YOSI
YOYS
YPAU
YPAW
YPBM
YPBY
YPLB
YPSB
YPTD
YRAP
YRAY
YRMA
YROD
YRPT
YSAY
YSEI
YSEZ
YSHS
YSML
YSMP
YSND
YSTI
YSUD
YSYY
YTB
YTBY
YTFR
YTG
YTHO
YTND
YTRI
YUPC
YVAN
YVND
YWHN
YWLD
YWTE
YWTI
YYDY
Z20
Z33
Z43
Z58
Z59
Z71
Z78
Z87
ZNU
ZOF

Maybe list have help find what wrong my or you program ?

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: DataProblems Maybe
« Reply #93 on: May 05, 2019, 06:14:53 pm »
@Thausand

I'm working on it.

I think my number of 34,680 is pretty close.

X-Plane claims they have over 35,000 Airports.

I need the following info in ByAirports.txt:

All Land base airports.
All Sea plane bases.
Some Heliports (Those that are not located at an airport but like at a Hospital or on top of a building)

The ByAirports.txt file has 34,680 records. It is suppose to have one record for each airport in the apt.dat file with the following information:

[ICAO]    The ICAO airport code or location indicator is a four-letter code designating
              aerodromes around the world.

[Hash]   Hash number of the record location of the ICAO in Apt.dat.

[City]   City where the airport is located.  Might not have a city. Some airports are in the
           brush. Above the arctic circle, in the middle of no where, no city assigned.

[Country]   All airports as far as I can determine have a country.
[Region]    Should have a Region, However those without a Region are grandfathered in as
                valid data by X-Plane. Some are without Regions as far as X-Plane. The
                International Civil Aviation Organization has the rights to assigned all airports a
                region, but some don't have a region.

[Latitude]     All are suppose to have a Latitude of the airport. Some don't and you have to
                   use  either the Tower or runway center-line.

[Longitude] All are suppose to have a Longitude of the airport. Some don't and you have to
                 use  either the Tower or runway center-line.

Currently I'm showing in the ByAirports.txt  the following:

34,680 Airports
8,194 Cities,    I  think this is about 4 or 5 cities to many.
9,721 City,Region,ICAO  AbileneK4Kabi.


Unique record of City Region is not possible  (AbileneK4) as there is a Abilene K4 8T2S an Abilene K4 KABI, and a Abiline K4 KDYS. Many cities have more than 1 airport and they would all be in the same Region. 

I copied your list of 562.

You are missing ZYYY,ZYYJ 
[ZYYY][7105929][Shenyang][China][Nil][41.77619293][123.48947822] and quite a few more.
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

Thausand

  • Sr. Member
  • ****
  • Posts: 292
Re: DataProblems Maybe
« Reply #94 on: May 05, 2019, 07:19:30 pm »
Thanksy for more information JLWest.

X-Plane claims they have over 35,000 Airports.
Yes. have 35242 airport  :)

Quote
I need the following info in ByAirports.txt:
All Land base airports.
All Sea plane bases.
My program have make read from apt.dat and have any ID "1" and have any ID "16"

Quote
Some Heliports (Those that are not located at an airport but like at a Hospital or on top of a building)
My Airport.dat have count any heliport apt.dat. Have program check ID "17". My program not have 'remove'. I not know how decide remove. Specificate write Heliport unique and not combine land/sea port. Make sure i write my program not count helipads.

Quote
[City]   City where the airport is located.  Might not have a city. Some airports are in the brush. Above the arctic circle, in the middle of no where, no city assigned.
Yes, my program have same. Many no city name.

Quote
[Country]   All airports as far as I can determine have a country.
My program airport.dat write there have airport no ID 1302 or have ID 1302 and then no have item "country" then no have name country (=nil)

Have example ZMGT and have example ZMHG.

Quote
[Region]    Should have a Region, However those without a Region are grandfathered in as valid data by X-Plane. Some are without Regions as far as X-Plane. The International Civil Aviation Organization has the rights to assigned all airports a                 region, but some don't have a region.
Yes.  I can see my program to.

Quote
[Latitude]     All are suppose to have a Latitude of the airport. Some don't and you have to  use  either the Tower or runway center-line.

[Longitude] All are suppose to have a Longitude of the airport. Some don't and you have to  use  either the Tower or runway center-line.
This my program big error. I have many no lat/lon and if make then many different you ByAirport.txt. I try work my program make better. I have make read how read "runway center-line" because is have Airport many runway.

Quote
Unique record of City Region is not possible  (AbileneK4) as there is a Abilene K4 8T2S an Abilene K4 KABI, and a Abiline K4 KDYS. Many cities have more than 1 airport and they would all be in the same Region. 
Yes i have read. That is why my program flyby have error. If have London city England and have London city America. Now my program write is same "London" (i know is error my) and no unique city. I not have make hurry and make fix. I think is no many important now (maybe later is more important).

Quote
I copied your list of 562.
I make sure and write: List 562 is list ICAO that my program make and you ByAirports.txt file no have find.

Quote
You are missing ZYYY,ZYYJ 
[ZYYY][7105929][Shenyang][China][Nil][41.77619293][123.48947822] and quite a few more.
No, my program have  :D

Code: [Select]
...
[ZYHB][6945797][Harbin][China][ZY][45.625][126.251666667]
[ZYJM][6678872][Jiamusi][China][ZY][46.841666667][130.465]
[ZYMD][7599597][Mudanjiang][China][ZY][44.523333333][129.57]
[ZYQQ][6750484][Qiqihar][China][ZY][47.238333333][123.916666667]
[ZYTL][2667556][Dalian][China][ZY][38.966666667][121.54]
[ZYTX][7274750][Shenyang][China][ZY][41.641666667][123.485]
[ZYYJ][7134994][Yanji][China][ZY][42.881666667][129.45]
[ZYYY][7105929][Shenyang][China][Nil][Nil][Nil]
ZYYY ICAO is most below line my program have write  :)

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: DataProblems Maybe
« Reply #95 on: May 05, 2019, 08:12:35 pm »
Z20
Z33
Z43
Z58
Z59
Z71
Z78
Z87
ZNU
ZOF

I don't see these in the posting above.

FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

Thausand

  • Sr. Member
  • ****
  • Posts: 292
Re: DataProblems Maybe
« Reply #96 on: May 06, 2019, 02:35:08 am »
I'm trying to work with your programs but I'm not very good with DOS programs and can't make it work. Built a GUI test program but can't get it to compile.
Then have two option
1) make learn use dos  ;D
2) make learn how write freepascal command program then write for Lazarus

Have 2 and can maybe me help you show.

I attach zip two. 1 is program flyby fpc command 2 is program flybylaz and make small terminal emulate. program 2 have many more lazarus part but no need for flyby program and is many same program (i have document and maybe can help you better understand how can make. Is not difficult copy-paste).

And i make attach picture for see.

If start program Lazarus then have make type "flyby name_of_airport.txt_file" (no quote) for edit then press button run for execute and if ok then show flyby write memo. If no ok then i hope print error for me read  :)

I hope maybe can help you little. If no then i sorry.
« Last Edit: May 06, 2019, 02:36:56 am by Thausand »

Thausand

  • Sr. Member
  • ****
  • Posts: 292
Re: DataProblems Maybe
« Reply #97 on: May 06, 2019, 02:54:23 am »
Z20 Z33 Z43 Z58 Z59 Z71 Z78 Z87 ZNU ZOF

I don't see these in the posting above.
I have 35242 more for look then take time :)

Code: [Select]
...
[Z01][7723708][Nil][Nil][Nil][Nil][Nil]
[Z04][7829328][Nil][Nil][Nil][Nil][Nil]
[Z10][7829293][Nil][Nil][Nil][Nil][Nil]
[Z13][7937010][Akiachak][United States][Nil][Nil][Nil]
[Z14][7700680][Tazlina][United States][Nil][Nil][Nil]
[Z17][7626587][Ophir][United States][Nil][Nil][Nil]
[Z20][6737744][Tuntutuliak][United States][Nil][Nil][Nil]
[Z25][6831289][Aleknagik][United States][Nil][Nil][Nil]
[Z33][6891092][Aleknagik][United States][Nil][Nil][Nil]
[Z35][6702164][Nil][Nil][Nil][Nil][Nil]
[Z38][7830993][Nil][Nil][Nil][Nil][Nil]
[Z40][1808506][Goose Bay][United States][Nil][Nil][Nil]
[Z43][7091267][Annette][United States][Nil][Nil][Nil]
[Z47][7150686][Basin Creek][United States][Nil][Nil][Nil]
[Z48][7317757][Bear Creek][United States][Nil][Nil][Nil]
[Z52][7172078][Bear Lake][United States][Nil][Nil][Nil]
[Z53][7150799][Nil][Nil][Nil][Nil][Nil]
[Z55][6977748][Lake Louise][United States][Nil][Nil][Nil]
[Z58][7577491][Bethel][United States][Nil][Nil][Nil]
[Z59][7559661][Bethel][United States][Nil][Nil][Nil]
[Z61][7343303][Nil][Nil][Nil][Nil][Nil]
[Z70][7576598][Nil][Nil][Nil][Nil][Nil]
[Z71][7560738][Cape Pole][United States][Nil][Nil][Nil]
[Z78][7231204][Chignik][United States][Nil][Nil][Nil]
[Z81][7057352][Salmon Lake][United States][Nil][Nil][Nil]
[Z86][7261409][Clearwater][United States][Nil][Nil][Nil]
[Z87][7228969][Cold Bay][United States][Nil][Nil][Nil]
[Z90][7146505][Kantishna][United States][Nil][Nil][Nil]
[Z91][7174526][Birch Creek][United States][Nil][Nil][Nil]
[Z92][7262712][Harsens Island][United States][Nil][Nil][Nil]
[Z93][7228512][Copper Center][United States][Nil][Nil][Nil]
[Z98][4191570][Zeeland][United States][K5][42.817247222][-85.928091667]
...

then

Code: [Select]
...
[ZMUL][5990567][Nil][Mongolia][ZM][48.994166667][89.923333333]
[ZNC][6975729][Nyac][United States][Nil][Nil][Nil]
[ZNU][7007874][Nil][Nil][Nil][51.84477329][-127.87740632]
[ZOF][7010682][Nil][Nil][Nil][52.34806244][-127.69314139]
[ZPDL][1971430][Xiaguan][China][Nil][Nil][Nil]
..
I have try, i no can make file attach to big. And then file me have many error (see paste this post many no have city, country and lat/lon). If want i can make ICAO list complete but is no magica. They all ICAO that have apt.dat. That why i write that you no have 562 ICAO and can look in program you why no find ?. I think that is logica. Is maybe possible i have make very wrong error. (i no admit and deny  :-X:D

If i have fix my program error lat/lon and city/country name then if good fix i post (maybe can split attach). If i diff you ByAirports.txt and me Airports.txt then diff too many and no usage compare  :-\

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: DataProblems Maybe
« Reply #98 on: May 06, 2019, 07:14:53 am »
Copied both zip to subdirectory.
Unziped them both.
Have 6 files.

Flyby_main.lfm    Form?
Flyby_Main.pas   pascal code
Flybylaz.ico        program ICON
flyblaz.lpi
flybylas.lpr
flyblaz.res

When I click on flublaz.lpr I get the following message:

"flybylaz.lpr(10,10) Fatal: Cannot find flyby_main used by flybylaz of the Project Inspector."

It's there but the Project Inspector can't see it and I'm unable to add it.

got something loaded and compiler gives me this:


Compile Project, Target: flybylaz.exe: Exit code 1, Errors: 1, Hints: 5
Hint: Start of reading config file C:\FPC\3.0.4\bin\i386-Win32\fpc.cfg
Hint: End of reading config file C:\FPC\3.0.4\bin\i386-Win32\fpc.cfg
flyby_main.pas(139,3) Note: Local variable "s" not used
flyby_main.pas(288,4) Hint: "array of const" not yet supported inside inline procedure/function
flyby_main.pas(288,4) Hint: Inlining disabled
Error: Can't open resource file "C:\Users\Jerry\AppData\Local\Temp\Temp1_flybylaz_publish.zip\flybylaz_publish\flyby_main.lfm"

I have it running but I don't know how or why.

I get  "E:\Files\Airports\ByAirport.txt : command not found"

Do I need to do this in a DOS Box you know CMD Line
 
« Last Edit: May 06, 2019, 07:33:10 am by JLWest »
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

Thausand

  • Sr. Member
  • ****
  • Posts: 292
Re: DataProblems Maybe
« Reply #99 on: May 06, 2019, 02:53:30 pm »
Copied both zip to subdirectory.
Unziped them both.
Have 6 files.
Lazarus project directory have 6 file:
Code: [Select]
ls -l
total 300
-rw-r--r-- 1 pi pi 137040 May  5 19:59 flybylaz.ico
-rw-r--r-- 1 pi pi   2948 May  6 01:38 flybylaz.lpi
-rw-r--r-- 1 pi pi    400 May  5 20:00 flybylaz.lpr
-rw-r--r-- 1 pi pi 139052 May  6 01:38 flybylaz.res
-rw-r--r-- 1 pi pi   1123 May  6 01:37 flyby_main.lfm
-rw-r--r-- 1 pi pi  15260 May  6 01:37 flyby_main.pas

Free pascal 'project' (is alone one file) directory have:
Code: [Select]
ls -l
total 12
-rw-r--r-- 1 pi pi 11528 May  6 01:53 flyby.pas

They separate project (one lazarus one fpc). Only have common that have source-lines that read exact same. That maybe can make show how can make project freepascal then make to project lazarus. Simple copy-paste  :)

Lazarus project make with Lazarus 2.0.0 release (use fpc 3.0.4) official and use publish project lazarus.

If some thing not work if load project lazarus then i not know why no work  :-[.

Quote
When I click on flublaz.lpr I get the following message:
Is small suggest: maybe start lazarus and load project "flybylaz.lpi" ? (that is how i do)

Quote
"flybylaz.lpr(10,10) Fatal: Cannot find flyby_main used by flybylaz of the Project Inspector."
That is problem and big error. flyby_main is project main form (have form, panel, memo, button and edit).

Quote
Compile Project, Target: flybylaz.exe: Exit code 1, Errors: 1, Hints: 5
Hint: Start of reading config file C:\FPC\3.0.4\bin\i386-Win32\fpc.cfg
Hint: End of reading config file C:\FPC\3.0.4\bin\i386-Win32\fpc.cfg
flyby_main.pas(139,3) Note: Local variable "s" not used
flyby_main.pas(288,4) Hint: "array of const" not yet supported inside inline procedure/function
flyby_main.pas(288,4) Hint: Inlining disabled
Error: Can't open resource file "C:\Users\Jerry\AppData\Local\Temp\Temp1_flybylaz_publish.zip\flybylaz_publish\flyby_main.lfm"
As write more before. Not load project main form is error and problem. I not know why. What is version/platform  you Lazarus ? (i know you have tag-line but is not always use same lazarus and tag some time expire)

Quote
I have it running but I don't know how or why.
I not know to. If have error write above then in theory impossible ... maybe you wizard ?  :)

Quote
I get  "E:\Files\Airports\ByAirport.txt : command not found"
If run project then have main form open then make edit in editbox "flyby E:\Files\Airports\ByAirport.txt" (no quote) then push button that next editbox (is to right).

"command not found" mean you not have type flyby before  :)

Quote
Do I need to do this in a DOS Box you know CMD Line
lazarus project is run windows/desktop. That why i write because you write not know terminal. Now can have windows run small simulate terminal  ;)

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: DataProblems Maybe
« Reply #100 on: May 06, 2019, 06:59:08 pm »
If run project then have main form open then make edit in editbox "flyby E:\Files\Airports\ByAirport.txt" (no quote) then push button that next editbox (is to right).

"command not found" mean you not have type flyby before

Yes: I typed : E:\Files\Airports\ByAirport.txt and pushed the execute button.

I copied the ByAirports.txt file to the directory where the flyfy is and get the same results.

Looking at the code your suggesting that I copy part of the code out to a GUI New windows program and it.

That will take me a bit of time.

FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

Thausand

  • Sr. Member
  • ****
  • Posts: 292
Re: DataProblems Maybe
« Reply #101 on: May 06, 2019, 07:54:27 pm »
Yes: I typed : E:\Files\Airports\ByAirport.txt and pushed the execute button.
And is wrong  ;D

Look picture: i type many wrong purpose for see. In picture final is good
Code: [Select]
flyby E:\Files\Airports\ByAirport.txt
And press button.

i write important: see "ByAirport.txt" is not have "s" letter and you copy have name "s" letter "ByAirports.txt" ?

I write many wrong english and not write all word and can maybe understand my write. Computer not so very smart and no understand if name no have match. If no have letter then not can find.

Quote
I copied the ByAirports.txt file to the directory where the flyfy is and get the same results.
if copy same directory "ByAirports.txt" then can type editbox:

Code: [Select]
flyby ByAirports.txt

Quote
Looking at the code your suggesting that I copy part of the code out to a GUI New windows program and it.
Yes. My program show and comment how can do.

Quote
That will take me a bit of time.
For now not you have do (i have make for you in zip)  :).

Is alone show you how can do.

You no like terminal (is ok) and i no like Lazarus (for me is slow, have many bug and i many fight code-tool). I like more work terminal have vim, can make remote many and fast. Have example browse if use desktop browse then many MB/GB take website memory and in terminal have many website and more small 50-100 MB take memory for any.

Have other example "apt.dat" have 250 MB then doublecommand (or any) open and take more 5 minute for edit and then can look. Use terminal can make fast look (is make < 5 second):
Code: [Select]
sed -n '4797454,+20p' apt.dat
1   5511 1 0 ZMHG Khatgal
1302 city
1302 country
1302 datum_lat 50.441388889
1302 datum_lon 100.134166667
1302 faa_code
1302 iata_code
1302 icao_code ZMHG
1302 region_code ZM
1302 state
1302 transition_alt 10499
1302 transition_level
100 35.00 2 0 0.50 0 1 1 15  50.44968173  100.12729071    0  110 2 0 0 0 33  50.43036657  100.14203570    0   38 2 0 0 0
100 25.00 5 0 0.75 0 0 1 16  50.44324210  100.13571124    0    0 2 0 0 0 34  50.43055660  100.14265402    0    0 2 0 0 0
110 2 0.50 302.8900 New Taxiway 1
111  50.44418478  100.13549750
111  50.44662872  100.12959735
111  50.44615845  100.13004682
111  50.44399104  100.13524242
111  50.44335146  100.13637160
111  50.44396626  100.13726546

For me desktop no efficient  :)

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: DataProblems Maybe
« Reply #102 on: May 07, 2019, 09:43:44 am »
Yea I think there is something wrong with the data.

Not sure how to fix it.
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: DataProblems Maybe
« Reply #103 on: May 07, 2019, 05:16:27 pm »
@Thausand

Attached 3 Screen Shots.

1. Listing of dir where your program along with byAirports.txt
2. What I entered.
3. Error Message.
In procedure RunCommandLine it goes from Line 13 to 23 no matter what I enter.

I can't figure out what the line is doing.

Code: Pascal  [Select][+][-]
  1. procedure TTermiForm.RunCommandLine(CommandLine: string);
  2. var
  3.   index : SizeInt;
  4.   s : string;
  5. begin
  6.   // have command print
  7.   PrintLine(' $ ' + CommandLine);
  8.   ParameterList := nil;
  9.   ParameterList := CommandLine.Split([' ',#8,#9,#10,#13], '"');
  10.   if Length(ParameterList) > 0 then
  11.   begin
  12.     // have command find in list
  13.     index := CommandList.IndexOf(ParameterList[0]);
  14.     // is find ?
  15.     if (index >= 0) then
  16.     begin
  17.       // have execute command
  18.       TProcedure(CommandList.Objects[index])();
  19.     end
  20.     else PrintLine(ParameterList[0] + ' : command not found');
  21.   end
  22.   else PrintLine('Empty command');
  23. end;      
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: DataProblems Maybe
« Reply #104 on: May 07, 2019, 06:22:26 pm »
I can't figure out what the line is doing.

This line?
Code: Pascal  [Select][+][-]
  1. index := CommandList.IndexOf(ParameterList[0]);

It tries to find in CommandList (some kind of TStrings?) the string in ParameterList[0]. The if following it checks if it has found it and, if so, apparently executes a procedure whose pointer was saved in the "object" part of the string in CommandList.

I would have to see more code to explain better.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

 

TinyPortal © 2005-2018