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
Help AVSIM continue to serve you!
Please donate today!

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.

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.

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