![]() |
|
Addon Development Developers post news, updates, & discussions here about your projects in development. |
![]() |
|
Thread Tools |
![]() |
#121 |
Not funny anymore
![]() ![]() |
![]()
Illegal instruction.... is your CPU really old?
|
![]() |
![]() |
![]() |
#122 |
Addon Developer
![]() |
![]()
Does the same on the other mfd.
https://www.dropbox.com/s/w4s0szq2se...05.36.jpg?dl=0 Then sometimes a black line appears. You can see it on the hover fuel bars https://dl.dropboxusercontent.com/u/...08%2005.39.jpg ---------- Post added at 05:49 AM ---------- Previous post was at 05:47 AM ---------- The Computer is 2 years old. using visual studio 2013 for coding |
![]() |
![]() |
![]() |
#123 |
Not funny anymore
![]() ![]() |
![]() Quote:
bad_alloc suggests that you run out of memory somewhere. illegal instruction usually means that a CPU instruction is not implemented. |
![]() |
![]() |
![]() |
#124 |
Addon Developer
![]() |
![]()
Thanks. And maybe because it is out of memeory it isn't drawing the meshes correctly?
How can I see where/what is causing the issue? I got screen Hunter and got some more images of missing mesh parts. https://dl.dropboxusercontent.com/u/...08%2005.55.jpg https://www.dropbox.com/s/w3z1bnkgri...05.56.jpg?dl=0 Well I guess I can go back to the drawing board and recode this. We have alot of specialized code to deal with moving mfd,..... I guess to get it to fly better greater rcs to maintain a level flight? |
![]() |
![]() |
Thanked by: |
![]() |
#125 |
Not funny anymore
![]() ![]() |
![]() Quote:
But the bad_alloc stuff suggests something really odd, since DX9 for example does not choke on SSU and the beta even works with dozens of GB of texture data. Orbiter is most of the time a classic "garbage in - crash out" application (though it tends to garbage in-garbage out). bad alloc could also suggest a rapid memory leak in your application. You constantly request new entities, without freeing them then. Orbiter is still a 32 bit application, so you can't expect it to have more than 4GB flat memory. |
![]() |
![]() |
![]() |
#126 |
Addon Developer
![]() |
![]() Quote:
Since the Endurance works good. I might re-use that code. For now. The big part will be the animation of the seats and mfd's. Now sure if I am up to that ![]() |
![]() |
![]() |
![]() |
#127 |
Defender of Truth
![]() ![]() |
![]()
Likely means you have a buffer overrun (or similar memory access problem) somewhere in your code.
|
![]() |
![]() |
Thanked by: |
![]() |
#128 |
Addon Developer
![]() |
![]()
Thanks. not sure where though. So I think I made totally redo this
---------- Post added 06-09-16 at 05:46 AM ---------- Previous post was 06-08-16 at 03:39 PM ---------- Well I redid this. But now I get a ctd so I ran the debugger and no ctd. Nothing in the log either. Quote:
https://dl.dropboxusercontent.com/u/...ash%5B2%5D.jpg Last edited by gattispilot; 06-09-2016 at 10:57 AM. |
![]() |
![]() |
![]() |
#129 |
Addon Developer
![]() |
![]()
Well I was told a memory leak. But for now did it another way.
Not sure how to get the Lander to fly and not drop. I have looked at the Shuttle A. Code:
SetSize(11); SetEmptyMass(11000.0); SetCW(0.3, 0.3, 0.6, 0.9); SetWingAspect(1.7); SetWingEffectiveness(2.5); SetCrossSections(_V(71.59, 206.57, 50.58)); SetRotDrag(_V(3.5, 3.5, 3.5)); if (GetFlightModel() >= 1) { SetPitchMomentScale(1e-4); SetBankMomentScale(1e-4); } SetPMI(_V(32.49, 38.14, 23.67)); SetTrimScale(0.08); SetCameraOffset(_V(0, 3, 10.1)); SetTouchdownPoints(_V(0, -.003, 5.7), _V(-3.448, -.003, -5.0), _V(3.448, -.003, -5.0));; Code:
CreateAirfoil(LIFT_VERTICAL, _V(0, 0, 0), Lander_MomentCoeff, 8, 140, 0.1); Code:
void Lander_MomentCoeff(double aoa, double M, double Re, double *cl, double *cm, double *cd) { int i; const int nabsc = 7; static const double AOA[nabsc] = { -180 * RAD, -90 * RAD, -30 * RAD, 0 * RAD, 60 * RAD, 90 * RAD, 180 * RAD }; static const double CL[nabsc] = { 0, 0, -0.004, 0, 0.008, 0, 0 }; static const double CM[nabsc] = { 0, 0, 0.0014, 0, -0.0012, 0, 0 }; for (i = 0; i < nabsc - 1 && AOA[i + 1] < aoa; i++); double f = (aoa - AOA[i]) / (AOA[i + 1] - AOA[i]); *cl = CL[i] + (CL[i + 1] - CL[i]) * f; // aoa-dependent lift coefficient *cm = CM[i] + (CM[i + 1] - CM[i]) * f; // aoa-dependent moment coefficient double saoa = sin(aoa); double pd = 0.045 + 0.4*saoa*saoa; // profile drag *cd = pd + oapiGetInducedDrag(*cl, 0.1, 0.7) + oapiGetWaveDrag(M, 0.75, 1.0, 1.1, 0.04); // profile drag + (lift-)induced drag + transonic/supersonic wave (compressibility) drag } |
![]() |
![]() |
![]() |
#130 |
Addon Developer
![]() |
![]()
Here are some interior images of the Lander.
![]() CASE is our information display ![]() looking forward 0 chair motion ![]() ![]() Things working on. HUD center needs to move when switching between pilot and copilot HUD needs to turn off when chairs are animated (Not sure how to code that) View needs to follow chair motion. I have set a vector for the view I just need to change the vector to follow the animation 2 rangers ready for launch. ![]() |
![]() |
![]() |
Thanked by: |
![]() |
#131 |
Addon Developer
![]() |
![]()
Any ideas about this. The Endurance has 16 attachments for cargos. but we are getting distortion of the cargos.
![]() ![]() here is the Endurance attachment info. Code:
CARGO1 = CreateAttachment(false, _V(0, -20.2, 1.12), _V(0, -1, 0), _V(0, 0, -1), "CARGO1"); CARGO2 = CreateAttachment(false, _V(0, -21.75, 1.12), _V(0, -1, 0), _V(0, 0, -1), "CARGO2"); CARGO3 = CreateAttachment(false, _V(-17.7, -10.15, 1.12), _V(-.866, -.5, 0), _V(0, 0, -1), "CARGO3");//-17.7 -10.15 1.12 -.866 -.5 0 CARGO4 = CreateAttachment(false, _V(-19.2, -11.0, 1.12), _V(-.866, -.5, 0), _V(0, 0, -1), "CARGO4");//-19.2 -11.0 1.12 CARGO5 = CreateAttachment(false, _V(-20.3, 0, 1.12), _V(-1, 0, 0), _V(0, 0, -1), "CARGO5"); CARGO6 = CreateAttachment(false, _V(-21.8, 0, 1.12), _V(-1, 0, 0), _V(0, 0, -1), "CARGO6"); CARGO7 = CreateAttachment(false, _V(-17.7, 10.15, 1.12), _V(-.866, .5, 0), _V(0, 0, -1), "CARGO7"); CARGO8 = CreateAttachment(false, _V(-19.2, 11.0, 1.12), _V(-.866, .5, 0), _V(0, 0, -1), "CARGO8"); CARGO9 = CreateAttachment(false, _V(0, 20.2, 1.12), _V(0, 1, 0), _V(0, 0, -1), "CARGO9"); CARGO10 = CreateAttachment(false, _V(0, 21.75, 1.12), _V(0, 1, 0), _V(0, 0, -1), "CARGO10"); CARGO11 = CreateAttachment(false, _V(17.7, 10.15, 1.12), _V(.866, .5, 0), _V(0, 0, -1), "CARGO11"); CARGO12 = CreateAttachment(false, _V(19.2, 11.0, 1.12), _V(.866, .5, 0), _V(0, 0, -1), "CARGO12"); CARGO13 = CreateAttachment(false, _V(20.3, 0, 1.12), _V(1, 0, 0), _V(0, 0, -1), "CARGO13"); CARGO14 = CreateAttachment(false, _V(21.8, 0, 1.12), _V(1, 0, 0), _V(0, 0, -1), "CARGO14"); CARGO15 = CreateAttachment(false, _V(17.7, -10.15, 1.12), _V(.866, -.5, 0), _V(0, 0, -1), "CARGO15"); CARGO16 = CreateAttachment(false, _V(19.2, -11.0, 1.12), _V(.866, -.5, 0), _V(0, 0, -1), "CARGO16"); Code:
P 0 -1.67 0 0 0 -1 0 1 0 POD ---------- Post added 06-20-16 at 05:21 AM ---------- Previous post was 06-19-16 at 06:57 AM ---------- OK. I have run into an issue I hope someone can help. To save on frame rates we go to the section to change the vc. So if thrust changes refresh the data. So we have a section to show which cargopod is selected. The value is PODSel. in the void TESTVC::clbkPostStep(double simt, double simdt, double mjd) Code:
if (PODSel != PODSel_last_drawn){ PODSel_last_drawn = PODSel; oapiVCTriggerRedrawArea(0, AID_FUELSTATUS); } I can see in the debugger that PODSel=11 and PODSel_last_drawn=10 So they are not the same so it should go to retrigger thevc. But it doesn't It only triggers when I switch the view. Code:
void TESTVC::RedrawPanel_Fuelstatus(SURFHANDLE surf, int part) { //SURFHANDLE const tex3 = oapiGetTextureHandle(meshhg_VC,5 ); char cbuf[20]; HDC hDC = oapiGetDC(surf); level2 = GetPropellantMass(tank); SelectObject(hDC, g_Param.hBrush[3]);//green box level3 = ((level2 / FUELMASS)*237); Rectangle(hDC, 110, 34, (int)(110.0 + level3), 75); //fuel //THRUST level = GetThrusterLevel(th_main[0]); //double level2 = GetPropellantMass(tank); SelectObject(hDC, g_Param.hBrush[3]);//green box Rectangle(hDC, 114, 111, (int)(114 + level * (346 - 114)), 160);//thrust //POD SetTextColor(hDC, RGB(0, 153, 0)); SetTextAlign(hDC, TA_LEFT); SetBkMode(hDC, TRANSPARENT); SelectObject(hDC, g_Param.hFont[2]); if (PODSel == 1) { sprintf(cbuf, "POD 1 Selected", 14); TextOut(hDC, 144, 400, cbuf, strlen(cbuf)); } |
![]() |
![]() |
Thanked by: |
![]() |
#132 |
Not funny anymore
![]() ![]() |
![]()
Distortion usually means one of the direction vectors is not normalized to length 1.0
(x² + y² + z² = 1) This can also be happening on the POD cargo end. |
![]() |
![]() |
Thanked by: |
![]() |
#133 |
Addon Developer
![]() |
![]()
Thanks
I hate to have extra attachment points on the pods. So if on the endurance the pod attachment is : _V(-.866, -.5, 0), _V(0, 0, -1) what should the pod attachment look like? now if I can fix the retrigger vc issue ![]() Last edited by gattispilot; 06-20-2016 at 11:03 AM. |
![]() |
![]() |
![]() |
#134 |
Not funny anymore
![]() ![]() |
![]() Quote:
Code:
/** * \brief Triggers a redraw notification for a virtual cockpit area. * \param vc_id virtual cockpit identifier * \param area_id area identifier (as specified during area registration) * \note This function triggers a call to the VESSEL2::ovcVCRedrawEvent() callback function in the vessel module. * \note The redraw notification is normally only sent if vc_id is equal to the currently * active virtual cockpit position (>=0). To invoke the redraw notification * independent of the currently active position, set vc_id to -1. */ OAPIFUNC void oapiVCTriggerRedrawArea (int vc_id, int area_id); Last edited by Urwumpe; 06-20-2016 at 11:00 AM. |
![]() |
![]() |
Thanked by: |
![]() |
#135 |
Addon Developer
![]() |
![]()
THanks. I will change that. I was just looking at that
![]() Now to fix attachment distort well on the Endurance the attachment is _V(-.866, -.5, 0) and -.866^2 + -5^2 +0^2 =1 but 0, 0, -1 0^2+0^2+-1^2 =-1 so is this okay? ---------- Post added 06-21-16 at 04:49 AM ---------- Previous post was 06-20-16 at 07:10 AM ---------- vc fixed. Now i am bit confused on the attachments. the the cargoes are at 12,2,3,4,6,8,9,10 o'clock. So the cargo at 2 would be at 60 degrees, with 0 at the top. then you get the sin and cosine, right? that make it cos -.9524 and sin -.30481 Last edited by gattispilot; 06-20-2016 at 02:52 PM. |
![]() |
![]() |
![]() |
|
Thread Tools | |
|
|
Quick Links | Need Help? |