Board index FlightGear Development Scenery

NZKI mis-aligned terrain and airfield runway co-ordinates

Questions and discussion about enhancing and populating the FlightGear world.

NZKI mis-aligned terrain and airfield runway co-ordinates

Postby phlash » Sat Aug 27, 2022 12:39 pm

Hi all, during recent sessions, I have noticed that the terrain at NZKI (Kaikoura) seems to be misaligned with the airfield co-ordinates, resulting in ones aircraft starting in a swamp, not on the runway... screenshots taken with the UFO from each runway direction after going directly upwards, showing the terrain location & aircraft position in the HUD, runway co-ordinates according to SkyVector (https://skyvector.com/airport/NZKI/Kaikoura-Airport):

RWAY 23 (SkyVector: S42°25.43' / E173°36.47'):
Image

RWAY 05 (SkyVector: S42°25.58' / E173°36.00'):
Image

Putting in the SkyVector co-ordinates, I arrive pretty close to the correct position in the UFO, so it appears FG has invalid co-ordinates for the airfield?

FG version: 2020.3.13, fgdata/Airports/apt.dat.gz dated Jan 31st 2022 (containing co-ordinates for NZKI runways that very closely match thos in my screenshots - as expected!)

Cheers,
Phil.
phlash
 
Posts: 31
Joined: Thu Aug 04, 2022 8:54 pm
Location: Suffolk, UK
Version: 2020.3.19
OS: Debian 12

Re: NZKI mis-aligned terrain and airfield runway co-ordinate

Postby phlash » Tue Aug 30, 2022 10:41 am

I took a look at all the other NZ airfields, and a significant number seem to have similar issues. Is this simply an out-of-date FGDB I'm using, or a magnetic co-ordinate shift, or have the runway co-ordinates come from somewhere inaccurate?
Location errors so far..

NZRC (Ryans Creek)
- Runways reversed

NZMF (Milford Sound)
- Offset South ~6"

NZWF (Wanaka)
- Rway 11: Offset East ~2"

NZTI (Taieri)
- Offset South ~6"

NZOU (Oamaru)
- Rway 18: Offset North ~6"
- Rway 36: Offset West ~2"

NZLX (Alexandra)
- Offset NE ~2"

NZBA (Balclutha)
- Offset South ~5"

NZWS (Westport)
- Offset South ~6"

NZHK (Hokitika)
- Offset NW ~2"

NZGM (Greymouth)
- Offset South ~8"

NZTU (Timaru)
- No terrain

NZKI (Kaikoura)
- Offset NE ~7"

NZGT (Glentanner)
- Offset NW ~4"

NZAS (Ashburton)
- Offset SW ~3"

-NZTK (Takaka)
- Offset South ~7.5"

NZNS (Nelson)
- Offset NW ~3"

NZWB (Woodbourne)
- No terrain

NZPN (Picton)
- Offset North 35" (!)

NZPP (Paraparaumu)
- Rway 34L: Offset East ~4"
- Rway 16R: Offset North ~2"

NZWU (Waiouru)
- Offset NE ~3"

NZPM (Palmerston)
- Offset South ~4"

NZFI (Feilding)
- No airport in FGDB

NZHS (Hastings)
- Offset West ~1.5"

NZRR (Ruatoria)
- No airport in FGDB

NZGS (Gisbourne)
- Offset NE ~1.5"

NZWK (Whakatane)
- No terrain

NZWT (Whitanga)
- No terrain

NZUN (Pauanui Beach)
- no terrain

NZTO (Tokoroa)
- No terrain

NZTH (Thames)
- Offset South ~6"

NZAP (Taupo)
- No terrain

NZWP (Whenuapai)
- No terrain

NZOF (Omaha Flats)
- No airport in FGDB

NZGB (Great Barrier)
- Offset SE ~12"

NZWR (Whangarei)
- No terrain

NZKT (Kaitaia)
- Offset North ~2"

NZKK (Kerikeri)
- No terrain
phlash
 
Posts: 31
Joined: Thu Aug 04, 2022 8:54 pm
Location: Suffolk, UK
Version: 2020.3.19
OS: Debian 12

Re: NZKI mis-aligned terrain and airfield runway co-ordinate

Postby merspieler » Tue Aug 30, 2022 11:04 am

since no one replied so far... there are two issues:
misaligned terrain at the airport boundary, see the gap, and wrong startup locations. iirc are the startup locations defined in an .xml file so could be fixed rather easily, quite some effort due to the number of affected airports tho.
misaligned terrain can't be fixed that easily as it needs a scenery rebuild.

If I'm not mistaken, there was a request to integrate some updated nz scenery into terrasync, I'm just not sure rn, if it has been merged (answer is probably somewhere in the mailinglist archive).
If it has been merged I'd assume that they didn't correct the startup locations for the improved scenery.
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2243
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: NZKI mis-aligned terrain and airfield runway co-ordinate

Postby phlash » Wed Aug 31, 2022 9:37 pm

@merspieler Thanks for responding :)

I found airport co-ordinates in the apt.dat.gz file (as mentioned), and these match the location displayed in the HUD pretty well, if there is an override file that I could adjust that would be easier than fixing and repackaging (especially after a data update), I'll put grep to work! FWIW I'm on 2020.3.13 (not .12) specifically because it has newer NZ scenery (.12 often just dumps you in the sea - no land visible!). I was using a 3rd party scenery pack, which appears to be integrated now.

From what I can tell, the current scenery is fine and matches reality quite closely, it's the runway co-ordinates that are wrong. Does anyone know where these come from officially?
phlash
 
Posts: 31
Joined: Thu Aug 04, 2022 8:54 pm
Location: Suffolk, UK
Version: 2020.3.19
OS: Debian 12

Re: NZKI mis-aligned terrain and airfield runway co-ordinate

Postby merspieler » Thu Sep 01, 2022 12:05 am

I can send you and updated apt.dat file... tho that contains all airports... would certainly be enough for testing, integrating that into the official repos would require more work to merge the files...
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2243
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: NZKI mis-aligned terrain and airfield runway co-ordinate

Postby phlash » Mon Sep 05, 2022 9:35 am

I can send you and updated apt.dat file... tho that contains all airports...


I'm happy to edit & test with my local file, where would I find the source and build tooling that I could issue patches against please?
phlash
 
Posts: 31
Joined: Thu Aug 04, 2022 8:54 pm
Location: Suffolk, UK
Version: 2020.3.19
OS: Debian 12

Re: NZKI mis-aligned terrain and airfield runway co-ordinate

Postby merspieler » Mon Sep 05, 2022 11:38 am

I'm going to send you the apt.dat file once I'm home, remind me if I forget.
Not sure which code you wanna patch tho.
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2243
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: NZKI mis-aligned terrain and airfield runway co-ordinate

Postby TheEagle » Mon Sep 05, 2022 11:58 am

I think you have a bit of a misunderstanding right now, @phlash - but no worries, we'll clear that up ! :)
phlash wrote in Wed Aug 31, 2022 9:37 pm:From what I can tell, the current scenery is fine and matches reality quite closely, it's the runway co-ordinates that are wrong.

Which runway coordinates ? Is the scenery runway in the right place, and the HUD / map (Menu -> Equipment -> Map) shows the wrong coordinates, or the other way round ?

For the former, all you need to do is replace $FGDATA/Airports/apt.dat.gz with the file @merspieler is going to send you (make a backup copy first, of course). In the latter case (that your coordinates right after spawning onto a runway are right, but you are not actually on a runway) TerraGear has to be used to rebuild the terrain for that tile - that can be done either by you (but be warned - don't expect to be done after 10 minutes ! Using TerraGear can be tricky sometimes !), or if that's too complex for you, you might be lucky that, if you ask really kindly, someone might do it for you ! ;)
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3414
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: NZKI mis-aligned terrain and airfield runway co-ordinate

Postby merspieler » Mon Sep 05, 2022 9:51 pm

You can download my file here
You can either replace the original one or create the following directory structure:
<somedir>/NavData/apt/ and place the apt.dat.gz in there, then add <somedir> as addon scenery (if you use the launcher, ignore the warning, that the dir doesn't contain any scenery)
This file contains all global airports, so to not mess up other places you either want to merge the original and new file if you go the replace route or to remove all non-NZ airports from the new file if you go the addon route.
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2243
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: NZKI mis-aligned terrain and airfield runway co-ordinate

Postby TheEagle » Mon Sep 05, 2022 10:15 pm

BTW at https://merspieler.alwaysdata.net/fg-server-status.php the title says "FLightGear - […]" - is the uppercase L intentional ? Just wondering … :mrgreen:
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3414
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: NZKI mis-aligned terrain and airfield runway co-ordinate

Postby merspieler » Mon Sep 05, 2022 10:46 pm

if you find grammar issues, you may keep them :P

thanks
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2243
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: NZKI mis-aligned terrain and airfield runway co-ordinate

Postby phlash » Tue Sep 06, 2022 8:11 am

TheEagle wrote in Mon Sep 05, 2022 11:58 am:I think you have a bit of a misunderstanding right now, @phlash - but no worries, we'll clear that up ! :)
phlash wrote in Wed Aug 31, 2022 9:37 pm:From what I can tell, the current scenery is fine and matches reality quite closely, it's the runway co-ordinates that are wrong.

Which runway coordinates ? Is the scenery runway in the right place, and the HUD / map (Menu -> Equipment -> Map) shows the wrong coordinates, or the other way round ?


I most likely do have a mis-understanding, especially as I was unable to find any design info or docs on how FG loads airport information (perhaps I should write that up on the wiki once I've groked it? :)) Rummaging through files in $FGDATA I found apt.dat.gz with all the airport details in. As per my first post, the co-ordinates it contains appear in the HUD right after spawning the UFO, and are wrong compared to reality (at least according to SkyVector), while the terrain itself appears to be correctly placed (ie: if I position the UFO using SkyVector co-ordinates, I spawn on the runway), so hopefully no Terragear rebuild required.

I assumed that the apt.dat.gz file is built from various sources (real world data from somewhere??), possibly also local data maintained in a repository, all put together by some tooling (also unstated..) hence me asking folks who should known how this all works for where this is so I can correct things at source. Of course it may be that apt.dat.gz is entirely manually maintained, on someone's random machine outside any form of version control, which would be unwise :wink:

(edited to add) Just found this post: viewtopic.php?p=208286 which implies that apt.dat originally came from X-Plane, and this repo: https://sourceforge.net/p/flightgear/fg ... /Airports/ that has a binary gzip file in source control with no provenance :cry:
phlash
 
Posts: 31
Joined: Thu Aug 04, 2022 8:54 pm
Location: Suffolk, UK
Version: 2020.3.19
OS: Debian 12

Re: NZKI mis-aligned terrain and airfield runway co-ordinate

Postby wkitty42 » Tue Sep 06, 2022 9:11 am

phlash wrote in Tue Sep 06, 2022 8:11 am:(edited to add) Just found this post: viewtopic.php?p=208286 which implies that apt.dat originally came from X-Plane, and this repo: https://sourceforge.net/p/flightgear/fg ... /Airports/ that has a binary gzip file in source control with no provenance :cry:

apt.dat does come from x-plane... AFAIK it is via a manually triggered automated process that pulls it from the gateway... this process has not been triggered in a long while because it also triggers(?) a required rebuilding of the world scenery... at least for WS2 which actually cuts the airports into the terrain... this scenery rebuilding takes months on modern hardware and has to be completely restarted if it crashes partway through... there is also work being done on WS3 (World Scenery 3)... WS3 will not cut the airports into the terrain so should be easier to update when necessary and shift airports if they are found to be out of position...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9148
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: NZKI mis-aligned terrain and airfield runway co-ordinate

Postby TheEagle » Tue Sep 06, 2022 11:23 am

wkitty42 wrote in Tue Sep 06, 2022 9:11 am:WS3 will not cut the airports into the terrain so should be easier to update when necessary and shift airports if they are found to be out of position...

It will, in fact. The draping approach has been dropped for now, apparently it was too complicated.

@phlash: Okay, if the scenery runway is in the right place, you're lucky and all you need to do is what merspieler said:
merspieler wrote in Mon Sep 05, 2022 9:51 pm:You can download my file here
You can either replace the original one or create the following directory structure:
<somedir>/NavData/apt/ and place the apt.dat.gz in there, then add <somedir> as addon scenery (if you use the launcher, ignore the warning, that the dir doesn't contain any scenery)
This file contains all global airports, so to not mess up other places you either want to merge the original and new file if you go the replace route or to remove all non-NZ airports from the new file if you go the addon route.
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3414
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: NZKI mis-aligned terrain and airfield runway co-ordinate

Postby phlash » Tue Sep 06, 2022 12:45 pm

OK folks, I've tried wholesale replacement of the file (apt.dat.gz), which triggered a reload of the cached nav data, but crashed out with an unknown line type, resulting in no airports at all... I've also tried cutting out just the file header and NZ airports and placing in a separate add-on folder - I can see it loading the file (as some lines produce warnings about radio frequencies), but it does not appear to change anything with regard to spawn locations (still not on scenery runways), I'll try removing any caches next, and possibly removing NZ airports from the main data file to avoid problems with data priority.... wish me luck :)
phlash
 
Posts: 31
Joined: Thu Aug 04, 2022 8:54 pm
Location: Suffolk, UK
Version: 2020.3.19
OS: Debian 12

Next

Return to Scenery

Who is online

Users browsing this forum: No registered users and 10 guests