Board index FlightGear Development AI Traffic

Polar Coordinates to decimal conversion  Topic is solved

Intelligent, computer controlled vehicles that drive/fly over the planet!

Polar Coordinates to decimal conversion  

Postby jtprophet » Wed Mar 28, 2018 12:49 pm

Good morning guys,

In my attempt to correct the parking spots at PHNL I am finding that the xml that controls the makeup of the airport is based on polar coordinates. When I go to either Google maps or Bing maps to re justify those positions I am faced with decimal format instead of the polar notations so my question is two fold. Will the program understand the decimal notation or do I need to comply with the polar coordinates, and secondly does anyone know of a conversion utility or web site that will do this conversion for me?

Thank-you,

John.
jtprophet
 
Posts: 205
Joined: Mon Apr 04, 2016 3:21 pm
Callsign: DAL1464

Re: Polar Coordinates to decimal conversion

Postby BecOzIcan » Wed Mar 28, 2018 3:07 pm

jtprophet wrote in Wed Mar 28, 2018 12:49 pm:the xml that controls the makeup of the airport is based on polar coordinates. .


Hi John,

Very confused with your post, what are you trying to achieve when saying "attempt to correct the parking spots at PHNL" ?

IF the issue is with the location of stop bars (Ramp Start) and/or the design of the airport layout and its graphic elements like taxi lines this is done in WED. As far as I can see the lat/lon of WED elements in the APT.DAT use the WGS84 projection (Like Google map),see below

IF the issue is with the position of aircrafts (flyable selected by you or AI models) not parking at the spot/stop bar (Parking Position) this is stored in the groundnet file PHNL.groundnet.xml which is pat of terrasync (unless you use a custom one) : Two options here
If the groundnet has been created with Taxidraw is also uses WGS84 projection (shown on my custom skeleton groundnet below)
If the groundnet has been auto generated then the change in coordinate comes from the conversion because the source data (WED) is WGS84 BUT I never saw that problem with any autogenerated groundnet.

What am I missing here ?

Cheers
Ian

Image

Image
Current Projects: AI Traffic, Models & Liveries
User avatar
BecOzIcan
 
Posts: 1302
Joined: Tue Oct 04, 2011 11:43 pm
Location: Sydney, NSW, Australia
Version: 2020.4.0
OS: Win10

Re: Polar Coordinates to decimal conversion

Postby jtprophet » Wed Mar 28, 2018 4:41 pm

Hi Ian,

With all that being said I believe I am going about the wrong way of accomplishing this let me lay out my process here so that you can understand what I thought was a proper thought process. I am playing around with the PHNL.groundnet.xml file, here is some code for example of the polar coordinates that are shown as the starting point for the first gate.

Code: Select all
<?xml version="1.0"?>
<groundnet>
  <frequencies>
    <AWOS>12790</AWOS>
    <UNICOM>12330</UNICOM>
    <CLEARANCE>12140</CLEARANCE>
    <TOWER>12390</TOWER>
    <APPROACH>11910</APPROACH>
    <DEPARTURE>12480</DEPARTURE>
  </frequencies>
  <parkingList>
    <Parking index="0"
             type="gate"
             name="Custom Starting Location1"
             number="1"
             lat="N21 19.823"
             lon="W157 55.415"
             heading="20"
             radius="54"
             airlineCodes="" />

If I put those gate coordinates in using Google maps or Bing maps they dont match up so my thought process was to pushpin the right point on the map and then change the coordinates above to reflect the new position however in doing so the online coords are in decimal format.

Can we still use taxidraw with modifying ramp starts and taxi segments?

I also wanted to add that I am only fixing the ramp starts so that the ai can start off at an actual gate position and be facing the right direction according to the real airport layout.

Lol....nm Ian just realized GM has both polar and decimal shown; been working too hard need to fly more..; )

Thank-you

John.
Last edited by Johan G on Sat Mar 31, 2018 12:34 pm, edited 1 time in total.
Reason: Replacing the [color] tags with [code] tags. The can be added manually or with the [>_ ] button above the text edit box.
jtprophet
 
Posts: 205
Joined: Mon Apr 04, 2016 3:21 pm
Callsign: DAL1464

Re: Polar Coordinates to decimal conversion

Postby wkitty42 » Wed Mar 28, 2018 7:58 pm

polar coordinates? oh! you mean "Degrees & Decimal Minutes"... in this case using N and E for positive direction from UTC and the equator... and using S and W for negative direction from UTC and the equator...

Code: Select all
lat="N21 19.823"    North 21 degrees, 19.823 minutes
lon="W157 55.415"   West 157 degrees, 55.415 minutes
"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: Polar Coordinates to decimal conversion

Postby BecOzIcan » Wed Mar 28, 2018 10:12 pm

Yep these are in degrees, not polar.

To convert 40º 05.3’ N to decimal degrees do the following
We are converting the minutes to a decimal part of a degree
Divide the minutes (5.3) by the number of minutes in a degree (60) this will give the decimal part of a degree that 5.3 minutes represents
5.3/60 = 0.08833
Add the decimal degrees to the degrees and discard the minutes
40 + 0.08833 = 40.08833
So the answer is 40.08833º

STILL

I would advise against updating coordinates directly in the XML because as shown on the above Taxidraw screenshot, the entire groundnet is made of a nework of nodes and links mapping the centrlines; If you change the LAT/LON of the parking position only, yes your aircrafts will park at the right spot BUT because you have not relocated the other nodes they will not taxi/pushback along the correct centrelines.

The solution to your problem is to
1. Download taxidraw
2. Import the existing groundnet
3. Download WED and the PHNL layout
4. Remap in Taxidraw the nodes position based on the LAT.LON of the taxilines intersections showed in WED (both source and destinations are in decimal)
5. Validate and re-generate the groundnet XML from taxidraw

Cheers
Ian
Current Projects: AI Traffic, Models & Liveries
User avatar
BecOzIcan
 
Posts: 1302
Joined: Tue Oct 04, 2011 11:43 pm
Location: Sydney, NSW, Australia
Version: 2020.4.0
OS: Win10

Re: Polar Coordinates to decimal conversion

Postby jtprophet » Thu Mar 29, 2018 3:30 am

Ok I see now with only one question upon opening WED it asks for the X-Plane folder do I have to have x-plane installed?
jtprophet
 
Posts: 205
Joined: Mon Apr 04, 2016 3:21 pm
Callsign: DAL1464

Re: Polar Coordinates to decimal conversion

Postby BecOzIcan » Thu Mar 29, 2018 5:45 am

jtprophet wrote in Thu Mar 29, 2018 3:30 am:Ok I see now with only one question upon opening WED it asks for the X-Plane folder do I have to have x-plane installed?


Nope. Search the forums for that. I think It's only a matter of having a subfolder named "sceneries" from what I remember

Cheers
Ian
Current Projects: AI Traffic, Models & Liveries
User avatar
BecOzIcan
 
Posts: 1302
Joined: Tue Oct 04, 2011 11:43 pm
Location: Sydney, NSW, Australia
Version: 2020.4.0
OS: Win10

Re: Polar Coordinates to decimal conversion

Postby Gijs » Thu Mar 29, 2018 6:48 am

Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9544
Joined: Tue Jul 03, 2007 3:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Polar Coordinates to decimal conversion

Postby BecOzIcan » Thu Mar 29, 2018 12:10 pm

@jprophet, please mark topic as resolved (green tick n header) so we can keep the board clean and track outstanding topic easier

Cheers
Ian
Current Projects: AI Traffic, Models & Liveries
User avatar
BecOzIcan
 
Posts: 1302
Joined: Tue Oct 04, 2011 11:43 pm
Location: Sydney, NSW, Australia
Version: 2020.4.0
OS: Win10

Re: Polar Coordinates to decimal conversion

Postby Alant » Thu Mar 29, 2018 7:31 pm

On my first Fortran programming course when I was a student, for homework, we were asked to write a program that could add two amounts of money. In those days we had Pounds, Shillings and Pence (£ s d ). For those not familiar with the old British money system, 12 Pence made 1 Shilling, and 20 Shillings made one Pound. The Penny could be divided into halfpence (1/2 d) and farthings (1/4 d). The d is the Roman name for a penny - denarious. We would write an amout as £10 12/6. This meant 10 pounds, 12 shillings and 6 pence, or £10 62.5p in modern British coinage.
The next day the homework was to calculate interest accrued over a period and add it to the principal, rounding to the nearest penny. The banks would of course usually arrange these rounding errors to work in their favour, and then compound this advantage by doing the sums every day.
This year would have been about 1964.

Alan
Alant
 
Posts: 1219
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: Polar Coordinates to decimal conversion

Postby Hooray » Thu Mar 29, 2018 7:35 pm

Alant wrote in Thu Mar 29, 2018 7:31 pm:[...] In those days we had Pounds, Shillings and Pence (£ s d ). For those not familiar with the old British money system, 12 Pence made 1 Shilling, and 20 Shillings made one Pound. The Penny could be divided into halfpence (1/2 d) and farthings (1/4 d). The d is the Roman name for a penny - denarious. We would write an amout as £10 12/6. This meant 10 pounds, 12 shillings and 6 pence, or £10 62.5p in modern British coinage.
The next day the homework was to calculate interest accrued over a period and add it to the principal, rounding to the nearest penny. The banks would of course usually arrange these rounding errors to work in their favour, and then compound this advantage by doing the sums every day.
This year would have been about 1964.


And all of a sudden, the whole Brexit thing is beginning to make sense to me :mrgreen:
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU


Return to AI Traffic

Who is online

Users browsing this forum: No registered users and 3 guests