Jump to content

jcd

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by jcd

  1. Thanks for the help. It makes sense that I was rotating based on a coordinate system that didn't stay aligned to the ship. I was also unaware of the difference between topvector and upvector. But the code here still varies with heading: the angle between topvector and prograde increases as I turn to the right after takeoff. Are the vectors ship:facing:topvector and ship:prograde not in the same reference frame? CLEARSCREEN. until false { SET rightVec TO ship:facing:starvector. SET upVec TO ship:facing:topvector. set frontVec to SHIP:FACING:VECTOR. //SET bankAngle to VANG(rightVec,upVec). // does this work on the opposite side of the planet? set rightA to (rightVec * SHIP:PROGRADE:VECTOR). set upA to (upVec * SHIP:PROGRADE:VECTOR). // this is nose relative to horizon SET someAngle to VANG(upVec,SHIP:PROGRADE:VECTOR). // this is directly correlated with AOA? print " " at (1,1). print rightA at (1,1). print " " at (10,3). //print upA at (10,3). print someAngle at (10,3). }
  2. I'm trying to detect the AOA and sideslip of my ship. I am taking the dot product of the prograde vector with other vectors based on SHIP:FACING: CLEARSCREEN. until false { SET rightRotation TO SHIP:FACING * R(0,90,0). SET rightVec to rightRotation:VECTOR. SET otherUpVec to SHIP:UP:VECTOR. SET upRotation TO SHIP:FACING * R(90,0,0). SET upVec TO upRotation:VECTOR. set frontVec to SHIP:FACING:VECTOR. //SET bankAngle to VANG(rightVec,upVec). // does this work on the opposite side of the planet? set rightA to (rightVec * SHIP:PROGRADE:VECTOR). set upA to (otherUpVec * SHIP:PROGRADE:VECTOR). // this corresponds to prograde relative to the horizon set upB to (upVec * SHIP:PROGRADE:VECTOR). // this is nose relative to horizon print " " at (1,1). print rightA at (1,1). print " " at (10,3). print upB-upA at (10,3). } It seems to work okay when flying a 90 degree heading from KSC, but it breaks when I turn around. Also, I don't understand why upVec * prograde doesn't correlate to AOA by itself. I am trying to take the direction the ship is facing, rotate it so it's vertical, and get the projection of the prograde vector on that vector.
  3. Recently the exterior camera's behavior was changed so it zooms in to avoid clipping inside buildings, etc. It looks more professional, but unfortunately this makes the camera temporarily unusable when flying through tunnels, into hangars, and near structures. It would be cool to have a checkbox option to revert to the previous behavior. Thanks!
  4. I tried it with one pair of wings and no control surfaces and it looked the same, but I think it may just be an issue with the indicator because it seems to fly properly. BTW the stall behavior seems to have improved a lot since previous versions for me. Now I can stall and recover a plane with only control surfaces and in general things seem to behave more like flight simulators.
×
×
  • Create New...