Project Space Transportation System 2016

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
Further ISS missions:

STS-120 (Discovery)
....
STS-129 (Atlantis)

The dates are obviously inaccurate, only the true positions of the payloads are done at this point
Some of these look quite realistic. Perhaps the best realtime graphics I've ever seen on a shuttle simulation!
Great work!
 

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
The easy way is just back the animation at 0-1. BUT then how to apply that to the surface airfoils?

Trim values don't translate direct to animation steps. You need to handle the BF animation values as asymmetric (0.5 is not the middle).

It's all a matter of using different scaling values.
Taking trim and converting to BF angle I get this:

If TRIM 0 to .5
ANGLE = TRIM * 0,354 - 0,177

If TRIM .5 to 1
ANGLE = TRIM * 0,455 – 0,23

trim.png

Notice the diferent scaling and offsets for each case.

This is just to help visualize the problem. You actually need to convert Trim to Animation steps, but this should help!
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,434
Reaction score
688
Points
203
Have you tried setting CreateAnimation(); to the correct value? This is from the API Guide about it:

A new animation is created by calling CreateAnimation. The parameter passed to CreateAnimation defines the animation state in which the mesh groups are stored in the mesh. The return value identifies the animation.

To simplify things: CreateAnimation doesn't have to initialized to zero, it can be a non-zero value and it should be for things like aerosurfaces.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,693
Reaction score
2,671
Points
203
Location
Dallas, TX
Trim values don't translate direct to animation steps. You need to handle the BF animation values as asymmetric (0.5 is not the middle).

It's all a matter of using different scaling values.
Taking trim and converting to BF angle I get this:

If TRIM 0 to .5
ANGLE = TRIM * 0,354 - 0,177

If TRIM .5 to 1
ANGLE = TRIM * 0,455 – 0,23

View attachment 25859

Notice the diferent scaling and offsets for each case.

This is just to help visualize the problem. You actually need to convert Trim to Animation steps, but this should help!
Thanks. The value that move the body flap range is -1 to 1.

I can make it 0 to 1. But then how to apply the value to the airfoil?


And then what about the elevons and ailerons?
Have you tried setting CreateAnimation(); to the correct value? This is from the API Guide about it:



To simplify things: CreateAnimation doesn't have to initialized to zero, it can be a non-zero value and it should be for things like aerosurfaces.
Not sure what you mean the correct value?

CreateControlSurface2(AIRCTRL_ELEVATORTRIM, 5, 1.75, _V(0, 0, -17), AIRCTRL_AXIS_XPOS, anim_bf);

sure I can do this and remove the anim_BF. Make the anim_bf value 0-1. but then how to make the control surface adjust according to the BF value?
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,434
Reaction score
688
Points
203
CreateAnimation(); should be whatever value you calculate is the correct one for the animation in its neutral state. For the bodyflap it should be 0.341. So for the bodyflap it should read CreateAnimation(0.341);.

This tells Orbiter that the default state of the animation is 0.341. This is assuming that the animation rotation range is 34.25.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,693
Reaction score
2,671
Points
203
Location
Dallas, TX
Thanks.

Yes. I have this.
//*******Body flap static UINT bfGrp[1] = { GRP_Group2 }; static MGROUP_ROTATE BodyFlap(midx, bfGrp, 1, _V(0, -2.199202, - 12.13037), _V(-1,0,0), (float)(34.2*RAD)); anim_bf = CreateAnimation(0.341); AddAnimationComponent(anim_bf, 0, 1, &BodyFlap); //INDICATOR static UINT bfINDGrp[1] = { GRP_INDBODYFLAP }; static MGROUP_TRANSLATE BodyFlapIND(vidx, bfINDGrp, 1, _V(0, -.0485, -.013)); anim_BODYFLAPINDICATOR = CreateAnimation(0.0); AddAnimationComponent(anim_BODYFLAPINDICATOR, 0, 1, &BodyFlapIND);

But how to tell it to make the surface change as the BF animates?
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,434
Reaction score
688
Points
203
But how to tell it to make the surface change as the BF animates?
You don't. The body flap will move as you change the the state of the aerosurface. In other words, the animation is slaved to the control surface. As its state changes, so does animation.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,693
Reaction score
2,671
Points
203
Location
Dallas, TX
Yes. But in this code the elevator trim changes the BF. the range of the trim is -1 to 0 to 1.

Not sure how to change the BF position with using the trim keys. Insert/Delete
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,434
Reaction score
688
Points
203
Yes. But in this code the elevator trim changes the BF. the range of the trim is -1 to 0 to 1.

Not sure how to change the BF position with using the trim keys. Insert/Delete
The body flap position will change as the trim changes. The body flap animation as currently set up by this line:
Code:
CreateControlSurface2(AIRCTRL_ELEVATORTRIM, 5, 1.75, _V(0, 0, -17), AIRCTRL_AXIS_XPOS, anim_bf);
will make the body flap animate as the elevator trim (controlled by the trim keys) is changed, that is what the last parameter is about, you tell it to change the animation with the identifier of anim_bf.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,693
Reaction score
2,671
Points
203
Location
Dallas, TX
Yes. So as the trim changes the BF changes.

BUT what changes the trim? I guess what I want is to use the BF switch to raise/lower the BF and not the trim keys.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,693
Reaction score
2,671
Points
203
Location
Dallas, TX
Here is a new issue. The mfd brightness. The code from the Atlantis uses x direction movement. But the mfd on the side behind the wall needs Z movement.
So I redid the code using the z difference. I do hit it but the mfd goes dim instantly. AND no getting it bright

button push area
oapiVCSetAreaClickmode_Quadrilateral(AID_MFDA_BRT, _V(1.3817, 2.2164, 13.489), _V(1.3809, 2.2164, 13.463), _V(1.3634, 2.2148, 13.489), _V(1.3634, 2.2118, 13.461));

// handle MFD brightness buttons case AID_CDR1_BRT: case AID_PLT1_BRT: case AID_MFD1_BRT: //case AID_MFDA_BRT: //case AID_MFDA_BRT: { static double t0, brt0; static bool up; int mfd = id - AID_CDR1_BRT; if (event & PANEL_MOUSE_LBDOWN) { up = (p.x >= 0.5); t0 = oapiGetSysTime(); brt0 = mfdbright[mfd]; } else if (event & PANEL_MOUSE_LBPRESSED) { double dt = oapiGetSysTime() - t0; double brt, dbrt = dt * 0.2; if (up) brt = min(1.0, brt0 + dbrt); else brt = max(0.25, brt0 - dbrt); mfdbright[mfd] = brt; if (vis) { MATERIAL mat; memset(&mat, 0, sizeof(MATERIAL)); mat.emissive.r = mat.emissive.g = mat.emissive.b = (float)brt; mat.emissive.a = 1.0f; DEVMESHHANDLE hMesh = GetDevMesh(vis, mesh_vc); oapiSetMaterial(hMesh, 20 + mfd, &mat); } } } return true; case AID_MFDA_BRT: //case AID_MFDA_BRT: { static double t0, brt0; static bool up; int mfd = 16; if (event & PANEL_MOUSE_LBDOWN) { up = (p.z >= 0.5); t0 = oapiGetSysTime(); brt0 = mfdbright[mfd]; sprintf(oapiDebugString(), "Z: %2.5f ", p.z); } else if (event & PANEL_MOUSE_LBPRESSED) { double dt = oapiGetSysTime() - t0; double brt, dbrt = dt * 0.2; if (up) brt = min(1.0, brt0 + dbrt); else brt = max(0.25, brt0 - dbrt); mfdbright[mfd] = brt; if (vis) { MATERIAL mat; memset(&mat, 0, sizeof(MATERIAL)); mat.emissive.r = mat.emissive.g = mat.emissive.b = (float)brt; mat.emissive.a = 1.0f; DEVMESHHANDLE hMesh = GetDevMesh(vis, mesh_vc); oapiSetMaterial(hMesh, 26, &mat); } } } return true;

The p.z value is also 0.00000. I put that code debug line in the other and the x value changes
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,693
Reaction score
2,671
Points
203
Location
Dallas, TX
UGH. Need to redo the mesh again. The reason is the background on the CRT is bright now. I think the aft mfd brightness works also.
 

Gargantua2024

The Desktop Orbinaut
Joined
Oct 14, 2016
Messages
1,055
Reaction score
1,264
Points
128
Location
San Jose Del Monte, Bulacan
Third batch of ISS missions:
1625490884980.png
STS-111 (Endeavour)

1625490723172.png
STS-112 (Atlantis)

1625490570826.png
STS-113 (Endeavour)

1625490159989.png
STS-114 (Discovery)

1625489835063.png
STS-121 (Discovery)

1625489658812.png
STS-115 (Atlantis)

1625489491212.png
STS-116 (Discovery)

1625489297376.png
STS-117 (Atlantis)


1625489134892.png
STS-118 (Endeavour)

I just noticed that the ODS mesh changes on every run of Orbiter (apparent on the first and second batches of screenshots), sometimes it has covers, and other times there aren't
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,693
Reaction score
2,671
Points
203
Location
Dallas, TX
Which shuttle? On the ODS it might be different meshes. I know some of the ODS/airlock structure had storage boxes in the framework
 

Gargantua2024

The Desktop Orbinaut
Joined
Oct 14, 2016
Messages
1,055
Reaction score
1,264
Points
128
Location
San Jose Del Monte, Bulacan
All shuttle orbiters (Discovery, Atlantis, and Endeavour) using both the Early and Late DLLs. But it isn't totally a big deal for me, I just thought it is a feature
 

Gargantua2024

The Desktop Orbinaut
Joined
Oct 14, 2016
Messages
1,055
Reaction score
1,264
Points
128
Location
San Jose Del Monte, Bulacan
Here are the close-ups of the ODS (I apologize for the low-quality of the photos, it was cropped from the screenshots I've sent earlier)...
Screenshot_20210705-224322-01.jpeg
No covers...

Screenshot_20210705-224331-01.jpeg
Fully covered...

Screenshot_20210705-224338-01.jpeg
Left covered....

Screenshot_20210705-224346-01.jpeg
Right covered....
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,693
Reaction score
2,671
Points
203
Location
Dallas, TX
Got a weird issue with the side mfd. I can turn it on/off. But until I touch the brightness control it is seen.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,693
Reaction score
2,671
Points
203
Location
Dallas, TX
So running debu. And I got this:
Unhandled exception at 0x7B1CB6BC (SPACESHUTTLE2016earlymet.dll) in orbiter.exe: Stack cookie instrumentation code detected a stack-based buffer overrun.
HQ3JKT2.jpg


no clue
bool Atlantis::clbkVCRedrawEvent (int id, int event, SURFHANDLE surf) { switch (id) { case AID_METTIME: RedrawPanel_metmeterstatus(surf, id - AID_METTIME); return true; } switch (id) { case AID_EVENTTIME: RedrawPanel_EVENTstatus(surf, id - AID_EVENTTIME); return true; } switch (id) { case AID_EVENT1TIME: RedrawPanel_EVENT1status(surf, id - AID_EVENT1TIME); return true; } switch (id) { case AID_EVENTAFTTIME: RedrawPanel_EVENTAFTstatus(surf, id - AID_EVENTAFTTIME); return true; } switch (id) { case AID_PANELA2: RedrawPanel_PANELA2status(surf, id - AID_PANELA2); return true; } switch (id) { case AID_RCSQTY: RedrawPanel_PANELRCSstatus(surf, id - AID_EVENTAFTTIME); return true; } switch (id) { case AID_CDR1_BUTTONS: case AID_PLT1_BUTTONS: case AID_MFD1_BUTTONS: case AID_MFDA_BUTTONS: case AID_CCTV1_BUTTONS: case AID_CCTV2_BUTTONS: { int mfd = id - AID_CDR1_BUTTONS + MFD_LEFT; RedrawPanel_MFDButton(surf, mfd); } return true; default: if (id >= AID_R13L_MIN && id <= AID_R13L_MAX) return plop->VCRedrawEvent(id, event, surf); break; } return false; }
 
Last edited:
Top