Jump to content

[1.12.x] KerbalGPS Revived


linuxgurugamer

Recommended Posts

Forum user @PakledHostage write this neat little mod to add GPS ability to the game.  Original thread is here: https://forum.kerbalspaceprogram.com/index.php?/topic/22673-10-figaro-global-navigation-satellite-system-launch-a-working-gps-system/What if Kerbals couldn't just reach into the fabric of their universe to determine their position? What if, like us, they needed to develop technology to measure their position with any certainty?

 

Full Release

The Kerbal Space Program forum KARPA GPS Challenge thread gave me the idea to develop an actual working GPS plugin for the game. The result is a plugin that works the same way that the real global navigation satellite systems do! It calculates your vessel's position by measuring distance to GPS satellites in known positions in orbit.

Now you can Launch your own Global Navigation Satellite System (GNSS) constellation, and then start using your own working GPS network by adding the GPS receiver module to any part in your spacecraft!

INSTALLATION

  1. Download the module from Github
  2. The download file contains one folder.
  3. Copy this folder to your GameData directory.
  4. Install the dependencies

Dependencies

Recommended

HOW TO USE

Launch a constellation of satellites. They should be well distributed around the globe. Ideally, there should be a minimum of four satellites visible from any point on the entire surface of Kerbin at all times. The higher you place your satellites in orbit, the fewer satellites you'll need to launch and maintain.

Each of the satellites in your GNSS constellation must have a GNSS transmitter part installed or they won't be detected by the Figaro receiver. Mount the transmitter part on single purpose, or on multi-purpose satellites.

Destinations can be saved and loaded using the Destination screen

If you use Contract Configurator, then contracts will be offered (one per orbited planet) to set up GPS constellations around each one. My thanks to @nightingale for providing an initial set of contracts

Availability

Kottabos review

QUESTIONS & ANSWERS

Q: Can I use/display the latitude and longitude data calculated by my Figaro Receiver in other mods?

A: The short answer is: Only if the other mod's developer implements it in their mod. The plugin exposes Lat, Lon, number of visible satellites and DOP for other plugins to access. Those other plugins must be coded to use that information in some way, however. An example of a mod that has been adapted to work together with Figaro receivers is SirJodelstein's Persistent Trails mod.

Q: What orbits should I use for my GNSS satellite constellation?

A: The geometry of your constellation doesn't need to be super precise. You just want your satellites to be well distributed around the globe. Real world GPS satellites are in circular orbits with an orbital period of 12 hours (half the Earth's mean solar day). They are located in 6 orbital planes, spaced 60º apart and inclined at 55º from the equator. The Kerbin equivalent orbital period would be 3 hours and 25 seconds (because Kerbin's solar day is 6 hours and 50 seconds long). A 1588 km high circular orbit has about the right orbital period. You can achieve the 60 degree spacing between orbits by launching at 1 hour intervals.

Wikipedia's Global Positioning System article has a cool gif showing how the number of GPS satellites that are visible from a given point on the Earth's surface changes with time:

ConstellationGPS.gif

Q: I've launched a satellite network but I still don't get any fixes. Why not?

A: You need a minimum of 4 satellites to be visible above the horizon to get a fix, and all satellites must have the Figaro Transmitter part installed. You could get a fix with just three satellites if the solver were to make an assumption about your vessel's altitude, but I haven't implemented this because I want the system to work at a range of elevations, from sea level to orbit. And while it is true that I could use the altitude information from the game's UI to make a good guess about your vessel's altitude when solving for position with only three visible satellites, I have chosen not to do so.

Q: I've launched a satellite constellation and I have confirmed from the map view that more than 4 satellites are visible to my receiver, but I still don't get a GPS fix. Why not?

A: Every satellite in your GNSS constellation must have a Figaro Transmitter part installed.

Q: I have a slow computer, and I find that the plugin bogs my computer down since you added the new Figaro Transmitter part. Can I revert to using the old method of giving satellites in my network a unique acronym?

A: The plugin maintains a list of spacecraft in your GNSS network that is only updated whenever the number of vessels changes. The module should not add much computational overhead over previous versions of the plugin.

If you do have problems with computer speed, you can try reverting to the old method of identifying satellites in your constellation by means of a unique acronym. Just edit the FigaroReceiver part's Part.cfg file. You will find a  parameter there. By default, it is set to "NONE". You can change it to anything you like. The plugin will then search for satellites with that name, rather than satellites that contain the Figaro Transmitter part.

Q: How do I know how many satellites are visible to my receiver?

A: The number of visible satellites is shown on the Figaro receiver's "Status" UI.

Q: Can I close the Figaro Receiver's UI window when I am not using it?

A: Yes. You can use the game's right-click menu or action groups to turn the UI on and off. Right-click on the Figaro receiver part to display the action menu.

odL6Ppd.png

Q: I am having some trouble getting my satellites into the same orbital plane and evenly spaced around the same orbit. Do you have any tips for how to do this?

A: One option may be to emulate the ESA's method of launching their Galileo GNSS satellites. The Galileo system's In-Orbit validation (IOV) satellites were launched two at a time. If you do this, all satellites on any given booster will start out in the same orbital plane. You'll need only to space them out evenly. I launched three satellites at a time aboard my PEZ launch system. The video below shows the PEZ-C launch.

 

 

Q: Why are my position fixes erratic sometimes?

A: The module calculates your Figaro receiver's position using a method called trilateration. Like with real GNSS systems, the accuracy of the fix is dependent on the geometry of the visible constellation of satellites. The accuracy of your fix may change quickly if satellites are close together or if they are moving quickly in low orbits.

Q: Why do you seem to use the acronyms "GPS" and "GNSS" interchangeably?

A: I recognise that the American GPS system, like the Russian GLONASS system and the proposed European Galileo system, are specific examples of global navigation satellite systems. I use the terms somewhat interchangeably however, because I believe that most people are more familiar with the acronym GPS than they are with GNSS.

Q: Accurate navigation requires accurate position measurements. What methods are available for measuring position if you can't "reach into the fabric of your universe" to establish an accurate position?

A: One option is an Inertial measurement unit (IMU). IMUs "add up" the entire history of accelerations and rotations to estimate position. These tend to accumulate error over time. The accumulation of error is aggravated by things like vibration. Accumulated IMU error can be corrected with external references, such as celestial navigation, ground radar measurements, etc.

NASA has provided an interesting description of how flight controllers navigate the Cassini probe, on their Cassini Mission Overview web page.

Edited by linuxgurugamer
Link to comment
Share on other sites

This is pretty cool, I recently built a GPS constellation around kerbin just for fun to see what kind of planning it would take to put one around Duna.  It would be cool if something like the mechjeb land at target feature didn't work without something like this.  

Link to comment
Share on other sites

1 hour ago, eberkain said:

This is pretty cool, I recently built a GPS constellation around kerbin just for fun to see what kind of planning it would take to put one around Duna.  It would be cool if something like the mechjeb land at target feature didn't work without something like this.  

That would be a @sarbian thing, not mine.

Link to comment
Share on other sites

I'm going to be adding a range value to the GPS transmitter, so different transmitters will have different ranges.  Right now there is only one GPS transmitter, but I'm hoping to get one or two more.

I'm adding this because I found that if you placed several GPS satellites in solar orbit, a gps receiver in solar orbit would work no matter how far you were from the transmitter.

Link to comment
Share on other sites

5 hours ago, johnkeale said:

Thanks for keeping this mod up to date! Are there plans to support KIS? (i.e. make it possible for the Kerbals to hold the Figaro Receiver) If none it's okay I'm just asking :)

Not at the present time.  I’m not sure how to make the receiver active if it is equipped

Edited by linuxgurugamer
Link to comment
Share on other sites

21 hours ago, linuxgurugamer said:

Not at the present time.  I’m not sure how to make the receiver active if it is equipped

Yeah, making it a KIS Item seems easy, but making it usable as a KIS Item seems hard. 

BTW, I am at KSP 1.3.1 so when I tried it there I wasn't expecting it to work, but somehow it works? Is this expected? :)

Link to comment
Share on other sites

  • 2 weeks later...

Does this mod work with the Real Solar System mod  (on KSP 1.45 )?

If so, then something is "off" with  either KerbalGPS or  Kerbal Engineer or RSS   with the coordinates ... or (the most likely ?)with my satellite positioning :)

Specifically,  I have added runways at where CYYZ   and CYTZ should be, with Kerbal Konstruct using Kerbal Engineer as the reference for the coords.

After launching 4 sats with the GNSS transmitters,  I moved them around with Hyper Edit until the GPS receiver stat indicated 4 sats, and was displaying a gps position.

I then "set a destination" at the CYYZ runway and "flew" to CYTZ.

The distance displayed was ~4km when it should be ~19 Km.

The sats are all at about 2,000 KM

 

 

 

Link to comment
Share on other sites

On 9/24/2018 at 3:48 PM, mstram said:

Does this mod work with the Real Solar System mod  (on KSP 1.45 )?

If so, then something is "off" with  either KerbalGPS or  Kerbal Engineer or RSS   with the coordinates ... or (the most likely ?)with my satellite positioning :)

Specifically,  I have added runways at where CYYZ   and CYTZ should be, with Kerbal Konstruct using Kerbal Engineer as the reference for the coords.

After launching 4 sats with the GNSS transmitters,  I moved them around with Hyper Edit until the GPS receiver stat indicated 4 sats, and was displaying a gps position.

I then "set a destination" at the CYYZ runway and "flew" to CYTZ.

The distance displayed was ~4km when it should be ~19 Km.

The sats are all at about 2,000 KM

I have never installed RSS, so have no idea about it.  If I had to guess, I'd say it was off by the ratio of the RSS to stock sizes

On 9/24/2018 at 4:26 PM, GodFear said:

Is this currently working? When I try to use the receiver doesn't have any of the menus... 

Make sure you installed the dependencies

Edited by linuxgurugamer
Link to comment
Share on other sites

First Post so please have mercy. I hope this is the right place because I couldn't find anything elsewhere. I'm trying to finish the "Create a KerbinGlobal Navigation Satellite System" contract and everything works fine until I complete the second satellite. After I return to my Launcher and have to wait two orbits before releasing the third one the 5 hour timer restarts every time I stop time warping. Which makes finishing this contract impossible. It only happens with the third satellite I was able to time warp when releasing the second one. Am I doing something wrong or has that happened to anyone else before?

Thank you!

Edited by Anis Ben Amor
Added question
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...