dkavolis / Ferram-Aerospace-Research

Aerodynamics model for Kerbal Space Program
Other
80 stars 32 forks source link

FAR shows wrong Ref Area in SPH #140

Open ghost opened 2 years ago

ghost commented 2 years ago

I have a plane that had Ref Area ~13m2 with previous version of FAR and flew fine (Ok-ish, good enough for what it is).

screenshot3

After installing FAR v0.16.1.0 the same plane has Ref Area ~6m2 and other figures like Cd are also strange.

screenshot4

However, In-flight Ref Area is ~13m2 and the plane flies like before.

screenshot6

genehwung commented 2 years ago

+1, same issue here. The FAR analysis UI CoM is incorrect.

dkavolis commented 2 years ago

Can you provide KSP.log and craft files? I couldn't reproduce the issue with stock parts.

Under the hood, the reference areas both in the editor and in flight are computed the same way by summing S field values from FAR wing modules which is set only from the config. It looks like for some reason S is not being set properly in the editor.

genehwung commented 2 years ago

I have the RP1 express install through ckan, and just upgrade the FAR through ckan too. The craft file is here. I don't have access to collect the log now, but I suspect you can reproduce this by just express installing RP1. I followed the instruction here. This might be quickly rule out whether this is RO related issue.

ghost commented 2 years ago

This is my plane (RP1 required) Dart.zip

fluff-li commented 2 years ago

The only affected part mentioned in KSP-RO/RealismOverhaul#2718 is also the only one with "forceUseMeshes = true". Which makes my suspect, that in that case the issue is connected to the recent changes in GeometryPartModule.cs https://github.com/dkavolis/Ferram-Aerospace-Research/commit/2324be41cd309b4d5957eaa4dd0f52271363899d

The issue in this thread could be connected.

dkavolis commented 2 years ago

https://github.com/KSP-RO/RealismOverhaul/issues/2718 should be fixed in ba7de8b, was also an issue in stock due to broken Unity serialization which didn't actually serialize the config field.

Can you check if this affects the reference area? https://github.com/dkavolis/Ferram-Aerospace-Research/actions/runs/3002531288

fluff-li commented 2 years ago

The green curve inside SPH looks fixed and reference area number on the runway is the same as inside the Hangar. The "Mach 1 Wave Drag-Area" is now mostly identical to the initial number from 16.0.5.

Version Mach 1 Wave Drag-Area 0.16.0.5 0.328902 m^2 0.16.1.0 1.70653 m^2 ba7de8b 0.330133 m^2

genehwung commented 2 years ago

Checked the binary, the reference area and differential numbers seem to be matching now. Thanks for fixing!