Advertisement
Guest User

Untitled

a guest
May 8th, 2018
555
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. Clearscreen.
  2. //ER = Error
  3. //PT = Previous time
  4. //TS = Time step
  5. //VP = vessel position (in a global vector mode)
  6. //TL = Terrain level = geolocation under predicted vessel position
  7. If SHIP:PERIAPSIS < 100 {
  8.  
  9. Set ER to 1000.
  10. Set PT to Time:Seconds.
  11. Set TS to 1.
  12.  
  13. Until ER < 100 {
  14. //Set VP to vessel position at PT + TS.
  15. Set VP to POSITIONAT(SHIP,(PT + TS)).
  16.  
  17. //Set TL to VP:geolocation.
  18. set TL to BODY:GEOPOSITIONOF(VP):TerrainHeight.
  19. Set ER to ((VP - BODY:POSITION):MAG - BODY:RADIUS - TL).
  20. Set PT to PT + TS.
  21. Print ER. //For testing
  22. Print PT + TS.
  23. Clearscreen.
  24. }.
  25. Print (PT + TS) - time:Seconds.
  26. }.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement