Project Universal Astronaut and Cargo System (UACS)

Abdullah Radwan

Addon Developer
Addon Developer
Joined
Aug 20, 2017
Messages
322
Reaction score
303
Points
78
Location
Cairo
So I found an issue. I added this cargo. and you see it is a bit high. but then exit and restart now it is good?

Left ALt +A add the cargo. what key deploys the cargo and can you set the location?
ALT +R releases. But it just releases where it was attached. Can you make a release point?
Can you send the vessel and cargo files and code so I can investigate further? I suspect you didn't set the attachment points properly.

To unpack a cargo, release the cargo then unpack it (Alt + R -> Alt + U). You can set the release position by manipulating the slot info ground info struct. The cargo is unpacked at its current position.
Not sure how to fix this. Your cargo using attachments. BUT in the eagle freighter. You can't see the cargo from the inside view. I have the mesh at meshVIS_Always. if I give it MESHVIS_EXTPASS I can see the cargo from inside. but then the eagle is seen thru the walls also.
If you send the files I can investigate this as well.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,853
Reaction score
2,822
Points
203
Location
Dallas, TX
Here is the skid/pallet with the nuclearwaste can
 

Attachments

  • EAGLESKIDTESTCODE.zip
    366.4 KB · Views: 4

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,853
Reaction score
2,822
Points
203
Location
Dallas, TX
And here is the Eagle freighter and a cargo that would go in it.
For the Eagles and the modules. We are using old UMMU key layout. 9/0 selects the airlock and D then opens the airlock/door.
This does the same as the Eagle skid. where when the cargo is loaded is different then when you reload.

How's the re release so that sound can be used?
 

Attachments

  • eaglefreighter.zip
    874.7 KB · Views: 3

Abdullah Radwan

Addon Developer
Addon Developer
Joined
Aug 20, 2017
Messages
322
Reaction score
303
Points
78
Location
Cairo
Here is the skid/pallet with the nuclearwaste can
There are several issues with your code:
1. The API clbkPostCreation method is not called in the vessel clbkPostCreation. That's why the attachment point position differs when you add a cargo vs when you reload the scenario.
2. The attachment points position height is set higher than the floor. The Y value should be set to -0.9982 instead of -0.956.
3. The packed cargo mesh size is not according to the specifications (1.3m x 1.3m x 1.3m) nor is it symmetrical at the center (0 0 0), which will cause multiple issues, including elevation when grappled. This is because UACS shifts the attachment point position by 0.65m in the holding direction (as defined by slotInfo.holdDir), since the vessel attachment point position is set to the floor while the cargo attachment point position is set at the cargo middle. Therefore, if the cargo is held from below for example, UACS shifts the vessel attachment point position up by 0.65m so that the cargo bottom is at the floor when the cargo is attached.
And here is the Eagle freighter and a cargo that would go in it.
For the Eagles and the modules. We are using old UMMU key layout. 9/0 selects the airlock and D then opens the airlock/door.
This does the same as the Eagle skid. where when the cargo is loaded is different then when you reload.

How's the re release so that sound can be used?
There is no source code included so I couldn't investigate the mesh issue. As for a soundset for the astronaut, I don't think it will be in the first release. For XRSound compatibality, I will change the runtime library to /MT in the next release to be compitable with it.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,853
Reaction score
2,822
Points
203
Location
Dallas, TX
Now it is this.
Code:
void EAGLESKID::clbkPostCreation(void)

{

    mdlAPI.clbkPostCreation();
    for (size_t idx{}; idx < vslAstrInfo.stations.size(); ++idx)
    {
        if (!vslAstrInfo.stations.at(idx).astrInfo) continue;

        const auto& astrInfo = *vslAstrInfo.stations.at(idx).astrInfo;

        SetEmptyMass(GetEmptyMass() + astrInfo.mass);

        SetStationMesh(idx, astrInfo.role, true);
    }
    



}
So it sounds like the bottom should be at -.65 is i used odd shaped things.

what about release points?
I will need to adjust the attachments in the freighter. But release points.
Thanks
 

Attachments

  • eaglefreightercode.zip
    8.6 KB · Views: 3

Abdullah Radwan

Addon Developer
Addon Developer
Joined
Aug 20, 2017
Messages
322
Reaction score
303
Points
78
Location
Cairo
Now it is this.
Code:
void EAGLESKID::clbkPostCreation(void)

{

    mdlAPI.clbkPostCreation();
    for (size_t idx{}; idx < vslAstrInfo.stations.size(); ++idx)
    {
        if (!vslAstrInfo.stations.at(idx).astrInfo) continue;

        const auto& astrInfo = *vslAstrInfo.stations.at(idx).astrInfo;

        SetEmptyMass(GetEmptyMass() + astrInfo.mass);

        SetStationMesh(idx, astrInfo.role, true);
    }
   



}
So it sounds like the bottom should be at -.65 is i used odd shaped things.

what about release points?
I will need to adjust the attachments in the freighter. But release points.
Thanks
Not only the bottom should be at -0.65m. All sides should be at 0.65m (whether left, right, top, or bottom) as some vessels may attach the cargo from the top instead of the bottom, and some may attach it from the side. If you want your cargo to be compatible will all vessels, make it a box 1.3m x 1.3m x 1.3m with its center at (0 0 0).

I am not sure what you mean by release points. Do you mean the ground release position? If so, you can adjust them as you want. What's the issue you are facing?

As for the code you attached, I have very limited experience in dealing with meshes in Orbiter, but from the documents it appears that you must have the MESHVIS_EXTPAS flag if you want the cargo to appear inside the vessel, but with this flag, objects in the external render pass are clipped at a camera distance of 2.5m. Meshes that are rendered during the internal pass always cover all other objects, and have a smaller clipping distance. This explains why you can see through the walls. Usually this is used for a payload bay which is far from the POV so the issue isn't noticeable, but since you have cargoes in the center of the mesh, I don't think there is a solution.

The code also has the first 2 issues noted above: the API clbkPostCreation isn't called and the attachment points poision is set higher than the floor.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,853
Reaction score
2,822
Points
203
Location
Dallas, TX
Thanks. I really wasn't thinking of using these cargo on other vessels. I think we had to make them smaller as to match the show

figured how to set the ground release points.
Code:
slotInfo.hAttach = CreateAttachment(false, { 1.62,.552,-2 }, { 0,1,0 }, { 0,0,1 },
        "UACS");
    slotInfo.holdDir = { 0, -1, 0 };
    slotInfo.relVel = 0.05;
    slotInfo.gndInfo.pos = { -4,0,-1.3 };
    vslCargoInfo.slots.push_back(slotInfo);
[\code]


on the freighter.  it has this:
[code]
void EAGLEFREIGHTTRANSPORT::clbkPostCreation(void)

{
    mdlAPI.clbkPostCreation();

    for (size_t idx{}; idx < vslAstrInfo.stations.size(); ++idx)
    {
        if (!vslAstrInfo.stations.at(idx).astrInfo) continue;

        const auto& astrInfo = *vslAstrInfo.stations.at(idx).astrInfo;

        SetEmptyMass(GetEmptyMass() + astrInfo.mass);

        SetStationMesh(idx, astrInfo.role, true);
    }
    vslAstrInfo.airlocks.at(0).open = DOOR0_proc >= 1;//right
    vslAstrInfo.airlocks.at(1).open = DOOR1_proc >= 1;//left
    vslAstrInfo.airlocks.at(2).open = DOOR2_proc >= 1;//front
    vslAstrInfo.airlocks.at(3).open = DOOR3_proc >= 1;//aft

  
}
the carrier has this:
Code:
void Carrier::clbkPostCreation()
        {
            mdlAPI.clbkPostCreation();

            SetEmptyMass(GetEmptyMass() + mdlAPI.GetTotalAstrMass());
        }
 
Last edited:
Top