space_is_hard

lib_SATarray.md

May 16th, 2015
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. // This file is distributed under the terms of the MIT license, (c) the KSLib team
  2.  
  3. ## lib_SATarray.ks
  4.  
  5. ``lib_SATarray.ks`` provides a user with a periapsis altitude for implementing a launch that provides an entire satellite array in one launch. The user sets the transfer vehicle's orbit apoapsis to the desired array altitude (i.e. geostationary orbit altitude) and its periapsis to the value outputted by the function (this orbit is referred to as the phasing orbit). The script assumes that multiple satellites will be delivered to the phasing orbit and a single satellite will be dropped off each time the transfer vehicle reaches apoapsis. Each satellite is assumed to circularize to the circular array orbit using its own propellant. Once the last satellite is dropped off and circularized, the array should be complete and each satellite should be spaced evenly around the array orbit.
  6.  
  7. **Note:** If the phasing orbit periapsis value is inside the parent body's atmosphere or below 10 kilometers in altitude, the script will instead output the phasing orbit's apoapsis. The user is warned of this change via HUDTEXT and is expected to instead set the transfer vehicle's orbit *periapsis* to the desired array altitude and use the funtion's output as the transfer vehicle's orbit *apoapsis*.
  8.  
  9. ## SATarray()
  10.  
  11. args:
  12. * Number of satellites in the array
  13. * Desired circular array orbit altitude *in kilometers*
  14.  
  15. returns:
  16. * A number.
  17.  
  18. description:
  19. * Returns the periapsis (or apoapsis, if the periapsis is too low) of the phasing orbit *in kilometers*, where the apoapsis (or periapsis) is the desired array altitude.
Advertisement
Add Comment
Please, Sign In to add comment