Jump to content

Sign in to follow this  
Swoop

FS9 [contact_points] Section - Duplicated Points

Recommended Posts

I was looking at an aircraft.cfg file and noticed that there are duplicated parameter names (point.5) in the contact_points section. I read through the "FS2004 Aircraft Container SDK" and didn't find a comment which explictly allows for the duplication.

 

What is the expected behvior of the ini parser when a duplicated parameter is incountered. Are duplicates simply ignored?

 

//GEAR 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

point.0=1, 8.00, 0.00, -4.55, 2600.0, 0, 0.7, 33.0, 0.22, 2.5, 1.50, 7.0, 9.0, 0, 160, 180

point.1=1, -1.80, -4.65, -4.60, 1900.0, 1, 0.9, 0.0, 0.40, 2.5, 0.85, 9.0, 8.0, 2, 160, 180

point.2=1, -1.80, 4.65, -4.60, 1900.0, 2, 0.9, 0.0, 0.40, 2.5, 0.85, 9.0, 8.0, 3, 160, 180

 

//SCRAPES 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

point.3=2, 1.00, -19.00, 2.00, 900.0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0 // L Wtip

point.4=2, 1.00, 19.00, 2.00, 900.0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0 // R Wtip

point.5=2,-16.50, -4.95, 0.15, 900.0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0 // Boom L

point.5=2,-16.50, 4.95, 0.15, 900.0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0 // Boom R

point.6=2, 8.50, 0.00, -2.25, 900.0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0 // Belly Fwd

point.7=2, -1.00, 0.00, -2.50, 900.0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0 // Belly Aft

point.8=5, 0.50, -0.40, 0.00, 1.1, 0, 0, 1.1, 0, 0, 1.0, 0.1, 0.1, 0, 0, 0 // Special use

point.9=5, 0.50, 0.40, 0.00, 1.1, 0, 0, 1.1, 0, 0, 1.0, 0.1, 0.1, 0, 0, 0 // Special use

 

Please advise and thanks!

 

Mark

Share this post


Link to post
Share on other sites

No idea.. Either everything after point 5 is nulled or only the last point 5 (and onward) is used. Similar to the effect if a duplicate [fltsim.X] is used for a repaint. Advise to just renumber them - point.5 thru point.10 .  Remember to verify/change  max_number_of_points = XX in the [contact_points] section to suit.


Roman_Full_combo_AVSIM_2.png?dl=1  FS RTWR   SHRS F-111   JoinFS Host/Client 

 

Yamaha CR 1000/JBL 2500, AMD 965 BE OC'd @ 3.88, RipJaw 2x4GB 1600 CL7, Gigabyte GTX-1070 OC 8GB, Asus M4A87TD EVO (AMD 870), Samsung 850 EVO 256GB & 1TB SSDs, WD 1T & 500G Black, 19" & 32" LCD, Win7 Pro 64bit, TMaster T-Flight HOTAS, FSX/FS9, FSUIPC / LUA, FSRealWX Pro, PlanG, JoinFS, LittleNavMap
Copilot - Samantha the "Hound"  RIP 😞        
       samantha.jpg?dl=1

 

Share this post


Link to post
Share on other sites

This is a simple .ini file despite the .cfg extension. It will read using GetPrivateProfileString, which will return the first one and never, ever see the second one. Everything else will work as expected.


Ed Wilson

Mindstar Aviation
My Playland - I69

Share this post


Link to post
Share on other sites

No idea.. Either everything after point 5 is nulled or only the last point 5 (and onward) is used. Similar to the effect if a duplicate [fltsim.X] is used for a repaint. Advise to just renumber them - point.5 thru point.10 . Remember to verify/change max_number_of_points = XX in the [contact_points] section to suit.

 

That sounds very reasonable. I've been working on a Sim object model and the VBA Collection object does not like duplication in the key field. It's also funny that this aircraft.cfg was from a payware model, but unfortunately, it's not the only anomaly I've run into! Suppose I've got some editing to do, that is, if I want a clean dataset.

 

Thanks again!

 

Mark

Share this post


Link to post
Share on other sites

This is a simple .ini file despite the .cfg extension. It will read using GetPrivateProfileString, which will return the first one and never, ever see the second one. Everything else will work as expected.

Thanks for the info Ed, I am certain that you would know :)

 

Interestingly, that's what I'm using with my latest object model as well. That is, all of the "PrivateProfile" functions that I need are are wrapped in an object model which is a fluent interface. The mad seach for the singleton continues...

 

Thanks and best regards,

 

Mark

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.
  • Donation Goals

    AVSIM's 2020 Fundraising Goal

    Donate to our annual general fundraising goal. This donation keeps our doors open and providing you service 24 x 7 x 365. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. We reset this goal every new year for the following year's goal.


    22%
    $5,550.00 of $25,000.00 Donate Now
×
×
  • Create New...