Jump to content

[0.90]NEAR: A Simpler Aerodynamics Model v1.3.1 12/16/14


ferram4

Recommended Posts

There is no interface or GUI for NEAR. User feedback suggested that it was unnecessary and confusing, so it is not available for NEAR.

Ah.. shame; I was hoping for a cut-down version of the interface as it did provide some feedback while building. People could always switch it off. Well, no biggie; looking forward to giving this a spin tonight :)

Link to comment
Share on other sites

Is NEAR throwing NREs when the centre-of-lift indicator is used on a rocket for anyone else? I can't provide output_log at the moment due to lack of time but just wondering if it's just me.

Link to comment
Share on other sites

...One thing that merits explaining in the OP.

Is this a full-blown "stock value for drag is always zero, deal with it" setup with less intricacies than FAR, or "stock value for drag is modified in real time based on shape and orientation but not mass" setup like Stock-Drag-Fix?

Edited by Mihara
typo
Link to comment
Share on other sites

Is NEAR throwing NREs when the centre-of-lift indicator is used on a rocket for anyone else? I can't provide output_log at the moment due to lack of time but just wondering if it's just me.

Is that's what's causing it? From the log is goes away as soon as you transition from the Hangar to KSC or the runway. I also noticed brining up the CoL indicator in the VAB/SPH makes the scene really laggy.

EDIT: Yes that's exactly what's throwing them. From the output log:

NullReferenceException: Object reference not set to an instance of an object
at NEAR.FARBasicDragModel.DragModel (Vector3d local_velocity) [0x00000] in <filename unknown>:0

at NEAR.FARBasicDragModel.RunDragCalculation (Vector3d velocity, Double rho) [0x00000] in <filename unknown>:0

at NEAR.FARBasicDragModel.PrecomputeCenterOfLift (Vector3d velocity, NEAR.FARCenterQuery center) [0x00000] in <filename unknown>:0

at NEAR.FARBaseAerodynamics.PrecomputeGlobalCenterOfLift () [0x00000] in <filename unknown>:0

at NEAR.FARBaseAerodynamics.OnCenterOfLiftQuery (.CenterOfLiftQuery CoLMarker) [0x00000] in <filename unknown>:0
UnityEngine.Component:SendMessage(String, Object, SendMessageOptions)
EditorMarker_CoL:recurseParts(Part, Vector3&, Vector3&, Single&)
EditorMarker_CoL:recurseParts(Part, Vector3&, Vector3&, Single&)
EditorMarker_CoL:recurseParts(Part, Vector3&, Vector3&, Single&)
EditorMarker_CoL:recurseParts(Part, Vector3&, Vector3&, Single&)
EditorMarker_CoL:recurseParts(Part, Vector3&, Vector3&, Single&)
EditorMarker_CoL:recurseParts(Part, Vector3&, Vector3&, Single&)
EditorMarker_CoL:Update()

(Filename: Line: -1)

Edited by MainSailor
Link to comment
Share on other sites

@Volt + MainSailor: This is a result of having used crafts that were built using the previous versions of FAR, caused by a change in how KSP saves PartModule data. There is a how-to fix here. If you could provide complete output_log.txts for that, it would be helpful in tracking down the exact place where it starts to break.

@panarchist: Well, it would help to say what FIDO is, since a search for it came up blank for mods.

@Mihara: No, because using the Stock Drag Fixes' method would require more calculations (in particular, ones to deal with the total mass) than necessary to apply physics, making it far more expensive to run. I dislike doing pointless things like that.

Link to comment
Share on other sites

@Volt + MainSailor: This is a result of having used crafts that were built using the previous versions of FAR, caused by a change in how KSP saves PartModule data. There is a how-to fix here. If you could provide complete output_log.txts for that, it would be helpful in tracking down the exact place where it starts to break.

This was on a fresh install of KSP .24. The only things I did were copy in my B9 folder. If those parts contained the FARBasicDragModel perhaps that's what you're referring to. EDIt: to clarify, the crafts were completely new.

I'll go back to a completely fresh install without mods and run a log for you coming up this afternoon.

Link to comment
Share on other sites

@Volt + MainSailor: This is a result of having used crafts that were built using the previous versions of FAR, caused by a change in how KSP saves PartModule data. There is a how-to fix here. If you could provide complete output_log.txts for that, it would be helpful in tracking down the exact place where it starts to break.

Cool, i was just about to mention that I've run into this bug in the FAR thread, so I'm glad to see there's a workaround. I figure I might as well contribute my output_log as well, so here it is:

https://drive.google.com/file/d/0B-WrBQvLtYTuMmpVNW1oZV8zN2M/edit?usp=sharing

Link to comment
Share on other sites

Ah.. shame; I was hoping for a cut-down version of the interface as it did provide some feedback while building. People could always switch it off. Well, no biggie; looking forward to giving this a spin tonight :)

You would think so. But in FAR. where the dialogs defaulted to off, people still complained that the mere fact they were there was confusing. Many, many people. So, removed.

Link to comment
Share on other sites

@Mihara: No, because using the Stock Drag Fixes' method would require more calculations (in particular, ones to deal with the total mass) than necessary to apply physics, making it far more expensive to run. I dislike doing pointless things like that.

Far from pointless, actually... The stumbling block with using FAR for me was always not that it's complicated (pfft) but that things that rely on stock drag produce results that are not just inaccurate by a little, or a lot, or over time, but outright insane here and now. If NEAR is just "FAR without interface or dialogs", it makes it as much of a detriment as FAR to playing nice with other plugins, but without the pretty graphs.

Which is what I would call pointless. :)

Link to comment
Share on other sites

Considering that the main issue with aerodynamics simulations ends up being performance, that gets priority over conforming to a silly, reality-contradicting system. All of the aerodynamic data in FAR and NEAR is easily accessible by any plugin that wants to look at it, and so it's perfectly possible for plugins to interface with either to make things work.

Given that both are a fair bit different than the stock drag model, I wouldn't expect anything coded up to function witht he stock drag model to even work properly. Anything that runs on that system will also assume drag is independent of orientation, making it inaccurate. Hell, I'd argue it's better to be obviously inaccurate (which can then be disregarded) than inaccurate but plausible, which leads to people taking it on faith.

In any case, given that user feedback pointed to the utilities provided with FAR being unwanted, I can't see how anyone would really demand to have NEAR function with information / autopilot plugins, as those features should be similarly unwanted.

Link to comment
Share on other sites

I tried replacing FAR with NEAR, and KSP crashes during loading.

Unity Player [version: Unity 4.5.2f1_9abb1b59b47c]

KSP_x64.exe caused an Access Violation (0xc0000005)

in module KSP_x64.exe at 0033:04ce0000.

Error occurred at 2014-07-18_214320.

C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64.exe, run by Jamie Tarn.

45% memory in use.

8192 MB physical memory [4458 MB free].

16381 MB paging file [12467 MB free].

8388608 MB user address space [8386320 MB free].

Write to location 04ce0000 caused an access violation.

Context:

RDI: 0x0b456030 RSI: 0x2f082300 RAX: 0x00000005

RBX: 0x3b365ab0 RCX: 0x2f082300 RDX: 0x5a5607f8

RIP: 0x04ce0000 RBP: 0x0015f110 SegCs: 0x00000033

EFlags: 0x00010202 RSP: 0x0015f0d0 SegSs: 0x0000002b

R8: 0x0015f4f0 R9: 0x8b560140 R10: 0x0000000f

R11: 0x8b560218 R12: 0x0015f4f0 R13: 0x04c94d48

R14: 0x0015f428 R15: 0x00000000

Bytes at CS:EIP:

?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? Module 1

C:\Windows\system32\xinput1_3.dll

Image Base: 0x00400000 Image Size: 0x0001e000

File Size: 107368 File Time: 2007-04-04_195422

Version:

Company: Microsoft Corporation

Product: Microsoft® DirectX for Windows®

FileDesc: Microsoft Common Controller API

FileVer: 9.18.944.0

ProdVer: 9.18.944.0

Module 2

C:\Program Files\Bonjour\mdnsNSP.dll

Image Base: 0x733a0000 Image Size: 0x00026000

File Size: 132968 File Time: 2011-08-30_230532

Version:

Company: Apple Inc.

Product: Bonjour

FileDesc: Bonjour Namespace Provider

FileVer: 3.0.0.10

ProdVer: 3.0.0.10

Module 3

C:\Windows\system32\ksuser.dll

Image Base: 0x747a0000 Image Size: 0x00006000

File Size: 5120 File Time: 2009-07-14_024114

Version:

Company: Microsoft Corporation

Product: Microsoft® Windows® Operating System

FileDesc: User CSA Library

FileVer: 6.1.7600.16385

ProdVer: 6.1.7600.16385

Module 4

C:\Windows\system32\USER32.dll

Image Base: 0x77590000 Image Size: 0x000fa000

File Size: 1008128 File Time: 2010-11-21_042410

Version:

Company: Microsoft Corporation

Product: Microsoft® Windows® Operating System

FileDesc: Multi-User Windows USER API Client DLL

FileVer: 6.1.7601.17514

ProdVer: 6.1.7601.17514

Module 5

C:\Windows\system32\kernel32.dll

Image Base: 0x77690000 Image Size: 0x0011f000

File Size: 1161216 File Time: 2013-08-02_031336

Version:

Company: Microsoft Corporation

Product: Microsoft® Windows® Operating System

FileDesc: Windows NT BASE API Client DLL

FileVer: 6.1.7601.18229

ProdVer: 6.1.7601.18229

Module 6

C:\Windows\SYSTEM32\ntdll.dll

Image Base: 0x777b0000 Image Size: 0x001a9000

File Size: 1732032 File Time: 2013-08-29_031636

Version:

Company: Microsoft Corporation

Product: Microsoft® Windows® Operating System

FileDesc: NT Layer DLL

FileVer: 6.1.7601.18247

ProdVer: 6.1.7601.18247

Module 7

C:\Windows\system32\psapi.dll

Image Base: 0x77970000 Image Size: 0x00007000

File Size: 9216 File Time: 2009-07-14_024154

Version:

Company: Microsoft Corporation

Product: Microsoft® Windows® Operating System

FileDesc: Process Status Helper

FileVer: 6.1.7600.16385

ProdVer: 6.1.7600.16385

== [end of error.log] ==

EDIT: Verifying the integrity of the game files on Steam seemed to fix it.

Edited by optimusjamie
Link to comment
Share on other sites

Crashes are not things that I can fix, they are the result of something breaking in the base game. I would advise you to remove all your mods and attempt to reproduce the issue without any of them and submit a bug report to Squad.

In addition, the error.log alone is useless, since it doesn't tell me what broke in the game. I need the output_log.txt.

Link to comment
Share on other sites

I think rocket builders trying out NEAR are expecting it to be easier to fly their rockets when compared to FAR. But there's really not a big difference between liftoff and re-entry in FAR vs liftoff and re-entry in NEAR.

Link to comment
Share on other sites

Ferram, here's the log: https://dl.dropboxusercontent.com/u/33654770/output_log.txt

Brand new fresh .24 install (32 bit, Windows). No mods installed except NEAR. Built a test craft and had no issues, then flew an Aeris. As soon as I added a set of canards, the CoL indicator moved to the SPH floor, and panning and moving became laggy.

Link to comment
Share on other sites

@panarchist: Well, it would help to say what FIDO is, since a search for it came up blank for mods.

:-D

It's me apparently not having coffee earlier and totally spacing - I meant KIDS: Kerbal Isp Difficulty Scaler. I dunno where the heck I got "FIDO" out of that. (Ferram Isp Difficulty?) Sorry for the confusion.

Kids -> Dogs -> FIDO? Too much time at work and not enough playing KSP.

Edit: To clarify, are the presets the same in KIDS for NEAR as they are for FAR? If not, will you update KIDS to give some sample presets?

Link to comment
Share on other sites

Ferram, here's the log: https://dl.dropboxusercontent.com/u/33654770/output_log.txt

Brand new fresh .24 install (32 bit, Windows). No mods installed except NEAR. Built a test craft and had no issues, then flew an Aeris. As soon as I added a set of canards, the CoL indicator moved to the SPH floor, and panning and moving became laggy.

Actually, I'm getting that same thing, and it happened in the same way (only with my own aircraft, adding a part, CoL hits the floor, lag, and then a lot of null references in the log from thereon out).


NullReferenceException: Object reference not set to an instance of an object
at NEAR.FARBasicDragModel.DragModel (Vector3d local_velocity) [0x00000] in <filename unknown>:0
at NEAR.FARBasicDragModel.RunDragCalculation (Vector3d velocity, Double rho) [0x00000] in <filename unknown>:0
at NEAR.FARBasicDragModel.PrecomputeCenterOfLift (Vector3d velocity, NEAR.FARCenterQuery center) [0x00000] in <filename unknown>:0
at NEAR.FARBaseAerodynamics.PrecomputeGlobalCenterOfLift () [0x00000] in <filename unknown>:0
at NEAR.FARBaseAerodynamics.OnCenterOfLiftQuery (.CenterOfLiftQuery CoLMarker) [0x00000] in <filename unknown>:0
UnityEngine.Component:SendMessage(String, Object, SendMessageOptions)
EditorMarker_CoL:recurseParts(Part, Vector3&, Vector3&, Single&)
EditorMarker_CoL:recurseParts(Part, Vector3&, Vector3&, Single&)
EditorMarker_CoL:Update()

Note that removing the part didn't seem to resolve the issue. Reloading the craft doesn't help either.

Launching a new, unaffected vessel, recovering, and then going back into the SPH can also provoke the issue it seems...

Link to comment
Share on other sites

@jmanidb: I think you expect an easier aerodynamics model that still disconnects drag from mass to protect you from the effects of disconnecting drag from mass. The simple fact is that those instabilities are inherent in removing that connection; all of the mods that remove the drag dependence on part mass add instabilities of some kind, and there is no way around that.

@panarchist: Yes, those should function properly.

@MainSailor & Renegrade: I've confirmed the issue. Seems to be related to a few changes in how PartModules are saved to work with the new contracts system, and it might take awhile to resolve the issue.

Edit: Was easier than I thought, forgot to bring some code from FAR over to fix that. Version 1.0.2 is up to fix that issue.

Edited by ferram4
Link to comment
Share on other sites

@jmanidb: I think you expect an easier aerodynamics model that still disconnects drag from mass to protect you from the effects of disconnecting drag from mass. The simple fact is that those instabilities are inherent in removing that connection; all of the mods that remove the drag dependence on part mass add instabilities of some kind, and there is no way around that.\

No expectations here. I understand why flying rockets isn't much easier in NEAR as compared to FAR. I'm just trying to relay what I think people are hoping for when they install NEAR.

I wonder if there is a middle ground, such as reducing dependence on part mass (but not eliminating it) in order to cause slight-to-moderate instabilities.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...