Jump to content

How can latitude and longitude be determined without the use of mods?


Recommended Posts

How can I determine the latitude and longitude of a position in orbit or on the ground, without the use of plug-ins and mods?

I know that Mechjeb and some of the telemetry mods use positional data, so if the data isn't directly accessible for users within the game, where does positional data come from and how do the mods read it?

Edited by Porspeler
Link to comment
Share on other sites

On the ground you can see coordinates in the map screen (hover over the landed craft's icon). In orbit, you'd have to have a known reference to compare against - for example if you knew all the orbital elements and the time to a reference point like periapsis, you could calculate lat/lon. Would require opening up a persistence file and crunching several numbers.

There's an API for mods to read this information, then display it through whatever readouts the mod includes.

Link to comment
Share on other sites

As Tavert says, the game tracks it internally but only displays it in game if you're on the ground. Mod makers can access this information and display it in the GUI. If you're looking for a scientific answer then there isn't one. You'd need a known reference point, your height and angle to 'target' and other nerdy things like that - which aren't available without mods.

Link to comment
Share on other sites

...There's an API for mods to read this information, then display it through whatever readouts the mod includes.

How is the API accessed? What tools and skills do I need, and where do I find them?

I'd like to learn to Mod, but I can't seem to find anything on these forums (or anywhere else online) that explains the various elements of what's involved. Everything that I've found is either extremely basic, or assumes that the reader has previous experience in intermediate and advanced mods.

I'd like to eventually acquire the skills so that I can create a mod that deals with using different rocket fuels, complete with differently textured fuel tanks for distinguishing between the fuels. What I have in mind is fairly involved, but what I lack are the skills. I can already do simple mods like rescaling parts by editing the "part" file, but beyond that, I'm clueless.

Anyway, thanks for the responses. :)

EDIT: I just found the source code for Kerbal Alarm Clock. That will give me a starting point for seeing what's under the hood of a good mod. :)

Edited by Porspeler
Update
Link to comment
Share on other sites

You access the API by writing a C# plugin and including Assembly-CSharp.dll and UnityEngine.dll as references.

There are some tutorials to get you started here and here. If you need help with anything specific, here is a good place to ask. The user-made XML-documentation will give you some extra information in autocomplete to help you out too.

Link to comment
Share on other sites

Thanks, Pizzaoverhead! You've given me exactly what I was searching for, but was unable to find.

I hope I can return the favor, someday.

One final question for anyone who knows: how do I change this thread's category from "Unanswered" to "Answered"?

Link to comment
Share on other sites

Thanks, Pizzaoverhead! You've given me exactly what I was searching for, but was unable to find.

I hope I can return the favor, someday.

One final question for anyone who knows: how do I change this thread's category from "Unanswered" to "Answered"?

Edit the original post.

Why do you NEED to know the numbers, anyway? I find I can generally eyeball things pretty well.

Link to comment
Share on other sites

... Why do you NEED to know the numbers, anyway? I find I can generally eyeball things pretty well.

I'm a veteran of the US Army Infantry, which gave me an appreciation for precision and attention to detail; and my profession is Land Surveying, which deals with spatial relationships. There's also the aspect of the nature of the game: it's rocket science! :)

Truth be told, in most cases I eyeball stuff. But it's nice to know how to be precise, when you feel like challenging yourself. It's gratifying, at least to me, to be able to work something out mathematically, and then have it turn out just like the number crunching predicted it would.

Thanks for the editing tip.

Link to comment
Share on other sites

In theory, if you know the math involved (which I don't myself, not exactly) and wanted to do it "the hard way," you could take three points on the surface whose coordinates and sea-level altitude are already known, find your distance from each of them at a given moment, then plug those measurements into a formula to find the point where spheres described by radii of those distances all intersect. It's the way the GPS system works in reverse (from satellite to ground), and I think they also used something similar to track the original Mercury flights' orbits.

In practice you're probably going much too fast in space to make much use of any data you'd get from crunching the calculations by hand, although if you also know your orbit's characteristics and the rate of the planet's rotation, you could use that data to predict your vessel's ground track as well.

Also, nice to see another East Tennessee native, as well as an Army veteran. I tried enlisting myself, but they had to get rid of me in Basic Training with a medical discharge, sadly.

Link to comment
Share on other sites

This is excellent! Thanks, Tavert. This will undoubtedly be one of the first mods that I implement, after I'm comfortable with my understanding of the vanilla game.

This is a pretty good tutorial for mod-making. It's a couple versions old, but should still be good info:

Wow, this just keeps getting better and better! The tutorial videos look like just the thing to give me "the big picture" on creating a plug-in. I greatly appreciate the link, Mr Shifty.

***

To all: I have to say that I'm impressed by how responsive and helpful the members of these forums are. I expected perhaps one or two responses to my requests, and hoped that they'd at least point me in the right direction. The comments and links which have been posted have far exceeded my expectations. Thanks so much, gentlemen.

Link to comment
Share on other sites

You're quite welcome - in both senses of the word. KSP has a rather awesome community. Who knew a silly little game about rocket science would attract so many really bright people who happen to love learning and teaching one another about said rocket science. Technical arguments do flare up once in a while, but even most arguments around here end up with both sides learning something new.

Link to comment
Share on other sites

  • 6 years later...
1 hour ago, Gaba_Kerman said:

Does this still work?

If you want to use the stock game, you can get this info from using KerbNet, a Surface Scanner device, or from the Debug Menu.

Some of these old mods still work, and some do not.

 

Link to comment
Share on other sites

  • 3 weeks later...
On 12/18/2019 at 11:52 PM, bewing said:

If you want to use the stock game, you can get this info from using KerbNet, a Surface Scanner device, or from the Debug Menu.

Some of these old mods still work, and some do not.

 

Thanks man- now I can find 69n 42s

 

Link to comment
Share on other sites

2 hours ago, Gaba_Kerman said:

Thanks man- now I can find 69n 42s

 

That coordinate is impossible, but that's most easily done with KerbNet. Open the KerbNet screen, zoom out as far as you can (to see one entire side of the CB), and start clicking around on it. It'll give you the coordinates of the spot that you click. If you understand what you are doing, you should be able to locate your destination and set a waypoint on it.

Link to comment
Share on other sites

Just a side note that this entire discussion is now well over six years old, and KSP has changed a lot in the meantime.  The OP, and other folks involved in the original discussion, have presumably long since moved on.  Accordingly, locking the thread to prevent further confusion.

If anyone has any related concerns that they still want to ask about, feel free to spin up a new thread!  :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...