Zeenobit Posted June 1, 2015 Share Posted June 1, 2015 I'm using the following chunk of code to try and get the "landing zone" for the active vessel:var vessel = FlightGlobals.ActiveVessel;var value = vessel.landedAt;if (string.IsNullOrEmpty(value)){ value = ScienceUtil.GetExperimentBiome(vessel.mainBody, vessel.latitude, vessel.longitude);}value = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(value.ToLower());This gives me the current results ... most of the time. In some cases, however, especially the areas around KSC, it gives odd values. For example, on the runway, it gives me "Ksc_runway_09".There must be a way to get the proper names of all these places, because the experiments use them. For example, you can have "Temperature scan while landed on the Runway" or "Surface sample from the Launchpad".Does anyone know how to get the proper title of these landing sites? Link to comment Share on other sites More sharing options...
xEvilReeperx Posted June 1, 2015 Share Posted June 1, 2015 Use Vessel.GetLandedAtString with vessel.landedAt if it's not null or empty Link to comment Share on other sites More sharing options...
Zeenobit Posted June 2, 2015 Author Share Posted June 2, 2015 That worked! Thanks a lot! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now