Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1873 : Seems to be working. #1874

Merged
merged 2 commits into from
Nov 23, 2016

Conversation

Dunbaratu
Copy link
Member

@Dunbaratu Dunbaratu commented Nov 20, 2016

Test case examples:

// Should (if on kerbin near KSC) draw a white vector straight east
// at magnitude 174.94 m :
set vd1 to vecdraw(
  v(0,0,0),
  ship:geoposition:velocity:orbit,
  white,"velocity here",1,true).

// Should (if on kerbin near KSC) draw a nearly zero vector because
// surface-relative velocity of the ground right under me is negligable:
set vd1_s to vecdraw(
  v(0,0,0),
  ship:geoposition:velocity:surface,
  white,"srf velocity here",1,true).

// Should (if on kerbin near KSC) draw a surface vector like vd1 above,
// but longer in length because it's the rotational effect with a radius
// that's 200,000m bigger:
set vd2 to vecdraw(
  v(0,0,0),
  ship:geoposition:altitudevelocity(200000):orbit,
  green,"geoposition velocity higher up above me",1,true).

// Should (if on kerbin near KSC) draw a vector angled upward by
// 30 degreees because it's the velocity of the ground 30 longitude
// degrees west of the current position:
set vd3 to vecdraw(
  v(0,0,0),
  latlng(ship:latitude, ship:longitude-30),
  red,"velocity 30 degrees west of here",1,true).

// Should (if on kerbin near KSC) draw a vector angled upward by
// 30 degreees like above,  but this time it should be a much
// shorter vector because it's how fast the surface of the
// planet is moving much higher north, near the pole:
set vd4 to vecdraw(
  v(0,0,0),
  latlng(ship:latitude-80, ship:longitude-30),
  yellow,"velocity 30 deg west and 80 deg north of here",1,true).

Fixes #1873

Test case examples:

// Should (if on kerbin near KSC) draw a white vector straight east
// at magnitude 174.94 m :
set vd1 to vecdraw(
  v(0,0,0),
  ship:geoposition:velocity:orbit,
  white,"velocity here",1,true).

// Should (if on kerbin near KSC) draw a nearly zero vector because
// surface-relative velocity of the ground right under me is negligable:
set vd1_s to vecdraw(
  v(0,0,0),
  ship:geoposition:velocity:surface,
  white,"srf velocity here",1,true).

// Should (if on kerbin near KSC) draw a surface vector like vd1 above,
// but longer in length because it's the rotational effect with a radius
// that's 200,000m bigger:
set vd2 to vecdraw(
  v(0,0,0),
  ship:geoposition:altitudevelocity(200000):orbit,
  green,"geoposition velocity higher up above me",1,true).

// Should (if on kerbin near KSC) draw a vector angled upward by
// 30 degreees because it's the velocity of the ground 30 longitude
// degrees west of the current position:
set vd3 to vecdraw(
  v(0,0,0),
  latlng(ship:latitude, ship:longitude-30),
  red,"velocity 30 degrees west of here",1,true).

// Should (if on kerbin near KSC) draw a vector angled upward by
// 30 degreees like above,  but this time it should be a much
// shorter vector because it's how fast the surface of the
// planet is moving much higher north, near the pole:
set vd4 to vecdraw(
  v(0,0,0),
  latlng(ship:latitude-80, ship:longitude-30),
  yellow,"velocity 30 deg west and 80 deg north of here",1,true).
@Dunbaratu Dunbaratu added the enhancement Something new (not a bug fix) is being requested label Nov 20, 2016
@Dunbaratu
Copy link
Member Author

I just realized the docs were missing from the commit, and added them. It should be ready now.

@hvacengi hvacengi merged commit 1637b37 into KSP-KOS:develop Nov 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something new (not a bug fix) is being requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants