![]() |
|
|||||||
| MFD Questions & Help Post your questions here for help with the Multi-Function Displays. |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Addon Developer
![]() ![]() |
Hi,
I was wondering if there is a way to use the TransX bullseye to get the direction of the velocity vector when the main thruster of the ship is not Z-aligned but Y-aligned (prograde direction Y+ or _V(0,1,0) ) ? Is there an option or a config parameter that can allow to take that into account ? Any ideas welcome, ![]() (Suggestions of other MFDs count too) Last edited by N_Molson; 04-14-2012 at 10:47 AM. |
|
|
|
|
|
#3 |
|
Addon Developer
![]() ![]() |
Any chance it could be implemented in a future release ?
|
|
|
|
|
|
#4 |
|
Whovian/Star Trekker/Pinoy
|
You do it simply by manually translating yourself sideways.
That is all you'd need to do. In space you have the ability to translate sideways.What you need to do is roll yourself sideways 90 degrees then translate to the side (+ or -) that needs correction.
|
|
|
|
|
|
#5 |
|
Addon Developer
![]() ![]() |
Quote:
![]() I'm speaking of a realistic ship... |
|
|
|
|
|
#6 |
|
Whovian/Star Trekker/Pinoy
|
Quote:
That was your mistake there.
|
|
|
|
|
|
#7 |
|
Addon Developer
![]() ![]() |
Sorry, I don't get what you mean.
|
|
|
|
|
|
#8 |
|
Whovian/Star Trekker/Pinoy
|
Ok since the RCS is a smaller engine. Why not point your big engines to the opposite direction of where you should go. Instead of translating sideways. Yaw yourself 90 degrees from your pointing from prograde and point your nose to the direction you want to go to. Is that so difficult to imagine?
Or if you don't have the fuel. The reason I said the above is that the beginning of your flight is what is crucial in getting you to that higher plane. If you don't start pointing it from the start you'll never get to that higher plane. That's what I'm trying to tell you above. Last edited by ED_4; 03-14-2012 at 07:39 PM. |
|
|
|
|
|
#9 |
|
Addon Developer
![]() ![]() |
Well, I'm doing a trans-lunar off-plane transfer with very tight fuel budget, so I need to optimize everything.
Yes, the idea is to change the attitude by 90° and it's why I tried, but the problem is a lack of reference. OrbitMFD works in a very different way with a Y-axis oriented spacecraft (rather an assembly of spacecrafts, there). Also, I can't count on killrot (doesn't work with the shifted axis). So I found an approximate method using the shifted OrbitMFD, but it lacks of precision.
|
|
|
|
|
|
#10 |
|
Grounded since '09
![]() |
Quote:
|
|
|
|
| Thanked by: |
|
|
#11 |
|
Orbinaut
|
The best way would be to make the burn using IMFD. It handles Y axis burns pretty well. Here is an example of a ship with the Y axis burn direction (CEV-E-LM)
![]() Here it is oriented for the burn. ![]() If you don't want to use the AutoBurn autopilot but make the burn manually instead, you have to get the vectors centered. (Picture2 - Cross in the middle and the small arrows aligned). Hope this helps.
|
|
|
|
| Thanked by: |
|
|
#12 |
|
Addon Developer
![]() ![]() |
Quote:
Code:
double Graph::vectorpointdisplay(HDC hDC, const VECTOR3 &target, MFD *mfd, VESSEL *vessel, bool isposition)
//targetvector is a vector in the global reference plane
//isposition true
{
VECTOR3 trtarget,temp;
VESSELSTATUS status;
if (isposition)
{
vessel->GetGlobalPos(temp);
temp=target-temp;
}
else
{
temp=target;
}
vessel->GetStatus(status);
VECTOR3 arot=status.arot;
MATRIX3 rotmatrix;
getinvrotmatrix(arot,&rotmatrix);
trtarget = mul(rotmatrix, temp);
int lines=int(windowsize/10);
int edge=int(windowsize/1.5);
int centre=int(windowsize/3);
HPEN pen;
pen=mfd->SelectDefaultPen(hDC,TransXFunction::White);
Arc(hDC, ixstart,iystart+lines,ixstart+edge,iystart+edge+lines,ixstart,iystart+centre,ixstart,iystart+centre);
edge-=centre/3;
int nearedge=centre/3;
Arc(hDC,ixstart+nearedge,iystart+nearedge+lines,ixstart+edge,iystart+edge+lines,ixstart+nearedge,iystart+centre,ixstart+nearedge,iystart+centre);
edge-=centre/3;
nearedge+=centre/3;
Arc(hDC,ixstart+nearedge,iystart+nearedge+lines,ixstart+edge,iystart+edge+lines,ixstart+nearedge,iystart+centre,ixstart+nearedge,iystart+centre);
edge=int(windowsize/1.5);
MoveToEx(hDC,ixstart+centre,iystart+lines,NULL);
LineTo(hDC,ixstart+centre,iystart+edge+lines);
MoveToEx(hDC,ixstart,iystart+centre+lines,NULL);
LineTo(hDC, ixstart+edge,iystart+centre+lines);
double offsetsize=sqrt(trtarget.x*trtarget.x+trtarget.y*trtarget.y);
double scalar=sqrt(2.0) / 2;
double xang=trtarget.x/offsetsize;
double yang=-trtarget.y/offsetsize;
offsetsize=sqrt(offsetsize/trtarget.z);
if (offsetsize>scalar || trtarget.z<0) offsetsize=scalar;
offsetsize=offsetsize/scalar*windowsize/3;
int xpos=int(offsetsize*xang+centre+ixstart);
int ypos=int(offsetsize*yang+centre+lines+iystart);
pen=mfd->SelectDefaultPen(hDC,TransXFunction::Green);
MoveToEx(hDC,xpos-3,ypos-3,NULL);
LineTo(hDC,xpos+3,ypos+3);
MoveToEx(hDC,xpos-3,ypos+3,NULL);
LineTo(hDC,xpos+3,ypos-3);
return length(trtarget);
}
|
|
|
|
|
|
#14 |
|
Addon Developer
![]() ![]() |
Ok I've managed to recompile the MFD and made a modification attempt... But then the problem is my non-comprehension of the maths/physics involved there.
I think I've tracked down the vector that holds the vessel orientation (arot vector). So my idea was to crossproduct the vector (supposed to be _V(0,0,1) in a "default" orientation) with _V(1,0,0) to have _V(0,1,0), or an y-axis output. But it does not work and I still can't get the proper vector display in Orbiter. I feel that basic vector skills (that I don't have) could help to solve this, because the idea is only to feed TransX bullseye display with a modified vector. Any idea ? It would help a lot my lunar lander project ![]() Code:
double Graph::vectorpointdisplay(HDC hDC, const VECTOR3 &target, MFD *mfd, VESSEL *vessel, bool isposition)
//targetvector is a vector in the global reference plane
//isposition true
{
VECTOR3 trtarget,temp;
VESSELSTATUS status;
if (isposition)
{
vessel->GetGlobalPos(temp); // input : vessel global pos
temp=target-temp;
}
else
{
temp=target;
}
vessel->GetStatus(status);
VECTOR3 arot=status.arot; // there
arot = crossp(arot, _V(1,0,0)); // failed conversion attempt
MATRIX3 rotmatrix;
getinvrotmatrix(arot,&rotmatrix);
trtarget = mul(rotmatrix, temp);
... then more graphical stuff...
---------- Post added at 10:46 AM ---------- Previous post was at 01:42 AM ---------- In a moment of lucidity, I found out the answer. There is only one line to change, in the same section than posted above : from : Code:
double yang=-trtarget.y/offsetsize; Code:
double yang=-trtarget.z/offsetsize;
|
|
|
|
|
|
#15 |
|
Aspiring rocket scientist
![]() ![]() ![]() |
So is this an independant MFD or does transX now align all vessels along the Y axis?
Likewise, how hard would it be to apply this to an independant (vessel) autopilot or HUD. I've been struggling with off-axis thrust in my own projects and this seems like it could help a lot. |
|
|
|
![]() |
|
| Thread Tools | |
|
|
|||||
| Quick Links | Need Help? |