Jump to content
Sign in to follow this  
Guest bartels

xml difficult(?) string questions

Recommended Posts

Guest bartels

Me to.It always depends how you want to write the coordinates. You need (degrees).(fractional degrees), West and South counted negative.What I assume is,that you meant North 33 degrees , 28 minutes , 43 fractional minutes or in FS standard notation N33*28.43' then it isN33*28.43' -> 33+28/60+0.43/60 or 33+28.43/60-> 33.47383If it is North 33 degrees , 28 minutes , 43 seconds or in FS with fractional seconds enabled N33*28'43.0''it would be N33*28'43.0'' -> 33+28/60+43.0/3600 or 33+(28+43.0/60)/60-> 33.47861BTW (28+43.0/60)/60 is again the recursive Horner scheme decribed in the XML FAQ for BCD conversions.It can't be the West longitude in degree* minute' second'' notation because minutes and seconds are always smaller then 60.Arne Bartels

Share this post


Link to post
Share on other sites

Arne,So i can always use:N x.y.z = x+y/60+0.z/60S x.y.z = -1*(x+y/60+0.z/60)W x.y.z = -1*(x+y/60+0.z/60)E x.y.z = x+y/60+0.z/60?Good Sunday,Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites
Guest bartels

Yes.I feel a bit uneasy about using the decimal seperator "." both for separating degrees from minutes and minutes from fractional minutes, but I might be a bit pedantic.Arne Bartels

Share this post


Link to post
Share on other sites

Arne,Now i can put the formula's in Excel,so calculating waypoints will be a piece of cake.(Btw. EHAM-KATL was uneventful)Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites
Guest

Arne,Is there any way to put text to a L: variable?

Share this post


Link to post
Share on other sites
Guest bartels

As far as I know, no. It might be possible to use the ASCII code of the string to encode it as numeric value in a L: variable and later decode it again, but I assume it is then limited to only few chars. At least four chars need the same place as one integer.Arne Bartels

Share this post


Link to post
Share on other sites

Here we are again,Is it possible to use a variable which compares(A:Nav1 (Nav2 or Adf) ident, string) with a given letter combination?Par example:...ATL = (A:Nav1 ident, string).....if{ (A:NAV1 radial, degrees) 180 + (>K:HEADING_BUG_SET) }Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites
Guest bartels

Try: (A:NAV1 IDENT,string) 'ATL ' scmp 0 == if{ (A:NAV1 radial, degrees) 180 + (>K:HEADING_BUG_SET) }scmp and scmi result 0 if the strings are equal ,-1 if the first string is smaller, 1 if the first string is greater. Also make sure you use a four-letter string (trailing spaces) to compare.Arne Bartels

Share this post


Link to post
Share on other sites

Arne,What do i owe you..It works!Again something to put in the FMC.Where is the "scmp" from?Cannot remember to have read something about it.Until..Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites
Guest bartels

Panel SDK from Microsoft. I wasn't able to get any sense out of the Extact/Find operators the other string ops work fine.Arne Bartels

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...