Jump to content

[1.3.1] Ferram Aerospace Research: v0.15.9.1 "Liepmann" 4/2/18


ferram4

Recommended Posts

Hmmm, I've tried recompiling, and got it to kinda work, however I still have the issue that drag is nearly zero when re-entering the atmosphere... Any advice?

Edit: Here's the log, if anyone is interested: https://drive.google.com/file/d/1w6HWPIZ8tppoJYAK9BXKB_J-bWJltALa/view?usp=sharing

While there are no lines directly related to the issue, the Flight Data GUI spits out this:
 

OverflowException: Number overflow.
  at System.Decimal.op_Explicit (Decimal value) [0x00000] in <filename unknown>:0
  at StringLeakTest.StringBuilderExtensions.Concat (System.Text.StringBuilder string_builder, Single float_val, UInt32 decimal_places, UInt32 pad_amount, Char pad_char) [0x00000] in <filename unknown>:0
  at StringLeakTest.StringBuilderExtensions.Concat (System.Text.StringBuilder string_builder, Single float_val, UInt32 decimal_places) [0x00000] in <filename unknown>:0
  at FerramAerospaceResearch.FARGUI.FARFlightGUI.FlightDataGUI.CreateDataString () [0x00000] in <filename unknown>:0
  at FerramAerospaceResearch.FARGUI.FARFlightGUI.FlightDataGUI.DataDisplay () [0x00000] in <filename unknown>:0
  at FerramAerospaceResearch.FARGUI.FARFlightGUI.FlightGUI.FlightDataWindow (Int32 windowId) [0x00000] in <filename unknown>:0
  at UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID) [0x00000] in <filename unknown>:0
  at UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, Int32 instanceID, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) [0x00000] in <filename unknown>:0
 
(Filename:  Line: -1)

 

Edited by soulsource
Added log
Link to comment
Share on other sites

You need to pay attention when comes to "just recompile" FAR. You need to change KSP version number in source files, otherwise FAR would disable itself if you attempt to use it on newer version. But, MM only look for FAR folder if exist and by that it "think" that FAR is installed and run properly. Modular flight integrator as well as other mods are not aware that FAR disabled itslef and in attempt to apply MM patches that are made for FAR you got various kind of errors and wierd issues.

Just something you need to be aware of when you recompile source for yourself.

Link to comment
Share on other sites

Ferram Aerospace Research v0.15.9.4 "ferram4.2"
Alright, I'll admit it, I'm just incrementing the build number and ferram number by one

- Compatibility for Kerbal Space Program 1.5.x (hopefully, at least 1.5.1 works)

 

Download

FAR v0.15.9.4 and its source code are available here: https://github.com/asdfCYBER/Ferram-Aerospace-Research/releases/tag/v0.15.9.4_ferram4.2
You can get the icons and shaders (which I am not allowed to redistribute) from the last official release (v0.15.9.1 "Liepmann") or directly from https://github.com/ferram4/Ferram-Aerospace-Research/tree/master/GameData/FerramAerospaceResearch - simply download the 'shaders' and the 'textures' folders and overwrite the ones in your installation.

If you already had a previous version of FAR installed with version number >0.15.9.1, all you have to do is overwrite FerramAerospaceResearch/Plugins with the newer version, and possibly MFI and MM if you don't have the newest versions yet.

If you are still on 1.4.5 or lower and don't want to leave, here is the previous release.

 

Disclaimer
This is a fan-made update to Ferram Aerospace Research v0.15.9.1 "Liepmann" made by @ferram4, as is allowed by the GPL v3 license it is distributed under. This update is also licensed under GPL v3. Icons and textures that did not fall under this license have been removed or replaced by placeholders. I'm not taking over anything, just recompiling from time to time because I need FAR in my game (and so do you).

Can't get it to work? Please don't bother ferram, but post your problem, with logs, in this thread.

All glory to @ss8913 for the solution and to @4x4cheesecake for the recompiling guide!

And yes, I copy pasted the previous post and changed some numbers - don't have enough time to make a fancy newspaper item

edit: to @Cholerix and @JebIsDeadBaby, please make sure to always post (a link to) the source code and the license whenever you are releasing dll files on the forum. I'm sure everyone appreciates your effort but it's kind of illegal to ignore those rules :P

Edited by ExtremeTrader
Link to comment
Share on other sites

I have done a little more than just a recompile. I have addressed a few issues and replaced the icons and asset bundle, licensed under GPL v3.

Ferram Aerospace Research v0.15.9.5 "Lighthill"

Update for KSP 1.5.1
Update to MM 3.1.0 for KSP 1.5.1
Update to MFI 1.2.5

Dealt with NullReferenceException when trying to access part colliders which do not have any (e.g. fuelLine)
Dealt with NullReferenceException when trying to determine if an engine has fairing which can be jettisoned by defaulting to no fairing
Added '[FAR]' tags to all log messages
Replaced farshaders.ksp with farassets.ksp which only contains a single material (source is in Assets)
Fixed curve colors in transonic design defaulting to purple
Moved asset bundle from shaders to Assets
Replaced icons with new ones (source is in icons, feel free to submit better ones)

Removed all All Rights Reserved files

 

Download

https://github.com/dkavolis/Ferram-Aerospace-Research/releases/download/v0.15.9.5_Lighthill/FAR_0_15_9_5_Lighthill.zip

Download the zip and extract to KSP folder.

 

Disclaimer

This is not an official release to FAR by @ferram4 but I'm going to try to continue version naming. I'm not overly familiar with Unity/C# and FAR codebase so any other bugfixes/features would likely take a while to implement. However I'm able to provide recompiles on new KSP versions if FAR functionality doesn't break.

Edited by dkavolis
Link to comment
Share on other sites

On 10/24/2018 at 4:29 AM, dkavolis said:

I have done a little more than just a recompile. I have addressed a few issues and replaced the icons and asset bundle, licensed under GPL v3.

Ferram Aerospace Research v0.15.9.5 "Lighthill"

Update for KSP 1.5.1
Update to MM 3.1.0 for KSP 1.5.1
Update to MFI 1.2.5

Dealt with NullReferenceException when trying to access part colliders which do not have any (e.g. fuelLine)
Dealt with NullReferenceException when trying to determine if an engine has fairing which can be jettisoned by defaulting to no fairing
Added '[FAR]' tags to all log messages
Replaced farshaders.ksp with farassets.ksp which only contains a single material (source is in Assets)
Fixed curve colors in transonic design defaulting to purple
Moved asset bundle from shaders to Assets
Replaced icons with new ones (source is in icons, feel free to submit better ones)

Removed all All Rights Reserved files

 

Download

https://github.com/dkavolis/Ferram-Aerospace-Research/releases/download/v0.15.9.5_Lighthill/FAR_0_15_9_5_Lighthill.zip

Download the zip and extract to KSP folder.

 

Disclaimer

This is not an official release to FAR by @ferram4 but I'm going to try to continue version naming. I'm not overly familiar with Unity/C# and FAR codebase so any other bugfixes/features would likely take a while to implement. However I'm able to provide recompiles on new KSP versions if FAR functionality doesn't break.

I have tried to recompile far to 1.5.1 too. 

May I ask What's the problem of reference and how do you fix it? As I just update a few lines of codes and purple lines dun happen in my poorly made version.

Link to comment
Share on other sites

6 hours ago, Me1_base said:

I have tried to recompile far to 1.5.1 too. 

May I ask What's the problem of reference and how do you fix it? As I just update a few lines of codes and purple lines dun happen in my poorly made version.

NullReferenceException means the code tried accessing methods or attributes of an object that doesn't exist. The collider error happens when trying to get part colliders in

ferram4.FARPartModule.TriggerPartCollidersUpdate()

which calls KSP API

PartModule.part.GetPartColliders()

on specific parts which, I assume, have no colliders (noticed this behaviour on fuel lines). 

The second error is thrown in

FerramAerospaceResearch.FARPartGeometry.GeometryModification.StockJettisonTransformGeoUpdater(ModuleJettison engineFairing, GeometryPartModule geoModule)

when trying to determine if engineFairing is visible

fairingVisible = engineFairing.jettisonTransform.gameObject.activeSelf && !engineFairing.isJettisoned

The error is most likely thrown by jettisonTransform being null (again KSP API) but I haven't tested where the error is thrown from exactly.

 

Fixing these errors can be done by enclosing the offending code in try catch blocks and handling thrown NullReferenceExceptions appropriately, like setting the part colliders to be empty arrays and setting fairingVisible to false.

Edited by dkavolis
Link to comment
Share on other sites

On 10/23/2018 at 4:29 PM, dkavolis said:

I have done a little more than just a recompile. I have addressed a few issues and replaced the icons and asset bundle, licensed under GPL v3.

<snip>

Removed all All Rights Reserved files

If you have truly replaced all of the assets held as "All Rights Reserved" by Ferram, would you consider releasing this as a standalone fork with your own forum thread and CKAN availability?  The lack of a complete FAR package for  KSP 1.4 or higher is (I think) the main blocker for getting Realism Overhaul officially updated past KSP 1.3.1.

Edited by RoboRay
Link to comment
Share on other sites

1 hour ago, RoboRay said:

If you have truly replaced all of the assets held as "All Rights Reserved" by Ferram, would you consider releasing this as a standalone fork with your own forum thread and CKAN availability?  The lack of a complete FAR package for  KSP 1.4 or higher is (I think) the main blocker for getting Realism Overhaul officially updated past KSP 1.3.1.

Sure (RO is great) but don't I need confirmation from @ferram4 to release my fork? If not, any and all help with setting up the forum thread, CKAN indexing and mod maintenance would be greatly appreciated. I have no experience with CKAN apart from installing mods.

Link to comment
Share on other sites

1 hour ago, dkavolis said:

Sure (RO is great) but don't I need confirmation from @ferram4 to release my fork? If not, any and all help with setting up the forum thread, CKAN indexing and mod maintenance would be greatly appreciated. I have no experience with CKAN apart from installing mods.

IIRC no, since everything is GPL v3. Im sure it wouldn't hurt to ask him first though. 

Link to comment
Share on other sites

4 hours ago, RoboRay said:

If you have truly replaced all of the assets held as "All Rights Reserved" by Ferram, would you consider releasing this as a standalone fork with your own forum thread and CKAN availability?  The lack of a complete FAR package for  KSP 1.4 or higher is (I think) the main blocker for getting Realism Overhaul officially updated past KSP 1.3.1. 

@dkavolis, I agree with above. Even if that be a short period of time before ferram respond about future updates, it be much less of confusion regarding bug reports, does it belong to original or forked version of FAR. I assume that it will be easier for ferram to distinct questions that are related to original FAR mod vs forked one.

With replaced ARR content, there is no longer licence restriction too. Just made it clear in thread title and in OP post of new thread that it is forked version.
Once that is done, folks that maintain CKAN, like @politas, @HebaruSan or @linuxgurugamer could help you how to publish it trough CKAN.

Ferram seems to be very busy, it might pass several months and new KSP verion hits sooner than we got any response. Otherwise, I would always advice to a bit longer for proper permission of original mod creator.

Link to comment
Share on other sites

2 hours ago, dkavolis said:

Sure (RO is great) but don't I need confirmation from @ferram4 to release my fork? If not, any and all help with setting up the forum thread, CKAN indexing and mod maintenance would be greatly appreciated. I have no experience with CKAN apart from installing mods.

I'm not speaking of his behalf at all but I guess he will be more than happy that someone is willing to make his great mod compatible with new new versions of KSP so it still alive.

Personally, I doubt you will receive an answer but who knows. My personal story is that we created the fork of BDA more than two years ago and we haven't hear a thing from Bahamuto in this time, nothing for or against our work.

So my opinion on this kind of topic is that when someone is willing to fix a mod ( leaving aside the licensing...)  we (previous mod owners, other modders, and community) should support and embrace new forks and releases that can keep the ball rolling!

Edited by jrodriguez
Link to comment
Share on other sites

@dkavolis well, it works, but still a lot of log spamming with

NullReferenceException: Object reference not set to an instance of an object
  at FerramAerospaceResearch.FARAeroComponents.FARVesselAero.SimulateAeroProperties (UnityEngine.Vector3& aeroForce, UnityEngine.Vector3& aeroTorque, Vector3 velocityWorldVector, Double altitude) [0x00000] in <filename unknown>:0 
  at FerramAerospaceResearch.FARAPI.InstanceCalcVesselAeroForces (.Vessel vessel, UnityEngine.Vector3& aeroForce, UnityEngine.Vector3& aeroTorque, Vector3 velocityWorldVector, Double altitude) [0x00000] in <filename unknown>:0 
  at FerramAerospaceResearch.FARAPI.CalculateVesselAeroForces (.Vessel vessel, UnityEngine.Vector3& aeroForce, UnityEngine.Vector3& aeroTorque, Vector3 velocityWorldVector, Double altitude) [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at Trajectories.FARModel.ComputeForces_Model (Vector3d airVelocity, Double altitude) [0x00000] in <filename unknown>:0 
  at Trajectories.VesselAerodynamicModel.ComputeForces (Double altitude, Vector3d airVelocity, Vector3d vup, Double angleOfAttack) [0x00000] in <filename unknown>:0 
  at Trajectories.VesselAerodynamicModel.ComputeReferenceDrag () [0x00000] in <filename unknown>:0 
  at Trajectories.VesselAerodynamicModel.isValidFor (.Vessel vessel, .CelestialBody body) [0x00000] in <filename unknown>:0 
  at Trajectories.Trajectory+<ComputeTrajectoryIncrement>d__42.MoveNext () [0x00000] in <filename unknown>:0 
  at Trajectories.Trajectory.ComputeTrajectory (.Vessel vessel, Trajectories.DescentProfile profile) [0x00000] in <filename unknown>:0 
 
(Filename:  Line: -1)

 

Link to comment
Share on other sites

38 minutes ago, Gordon Dry said:

@dkavolis well, it works, but still a lot of log spamming with


NullReferenceException: Object reference not set to an instance of an object
  at FerramAerospaceResearch.FARAeroComponents.FARVesselAero.SimulateAeroProperties (UnityEngine.Vector3& aeroForce, UnityEngine.Vector3& aeroTorque, Vector3 velocityWorldVector, Double altitude) [0x00000] in <filename unknown>:0 
  at FerramAerospaceResearch.FARAPI.InstanceCalcVesselAeroForces (.Vessel vessel, UnityEngine.Vector3& aeroForce, UnityEngine.Vector3& aeroTorque, Vector3 velocityWorldVector, Double altitude) [0x00000] in <filename unknown>:0 
  at FerramAerospaceResearch.FARAPI.CalculateVesselAeroForces (.Vessel vessel, UnityEngine.Vector3& aeroForce, UnityEngine.Vector3& aeroTorque, Vector3 velocityWorldVector, Double altitude) [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at Trajectories.FARModel.ComputeForces_Model (Vector3d airVelocity, Double altitude) [0x00000] in <filename unknown>:0 
  at Trajectories.VesselAerodynamicModel.ComputeForces (Double altitude, Vector3d airVelocity, Vector3d vup, Double angleOfAttack) [0x00000] in <filename unknown>:0 
  at Trajectories.VesselAerodynamicModel.ComputeReferenceDrag () [0x00000] in <filename unknown>:0 
  at Trajectories.VesselAerodynamicModel.isValidFor (.Vessel vessel, .CelestialBody body) [0x00000] in <filename unknown>:0 
  at Trajectories.Trajectory+<ComputeTrajectoryIncrement>d__42.MoveNext () [0x00000] in <filename unknown>:0 
  at Trajectories.Trajectory.ComputeTrajectory (.Vessel vessel, Trajectories.DescentProfile profile) [0x00000] in <filename unknown>:0 
 
(Filename:  Line: -1)

 

I'll have a look at it and find the null object when I have time, haven't tested FAR with any mods after I compiled it. Can you create an issue on https://github.com/dkavolis/Ferram-Aerospace-Research/issues?

Created a new topic 

Now just need some help getting it on CKAN so that RO can be udpated.

Edited by dkavolis
Link to comment
Share on other sites

8 hours ago, dkavolis said:

Sure (RO is great) but don't I need confirmation from @ferram4 to release my fork?

If you are only including the portion of Ferram's content that he has released under GPL v3, then no, you don't actually need his permission to fork the project and publish your own version.  He already granted that permission by releasing his work under GPL v3.  However...

It is customary and, more importantly, polite to inform him that you plan to do so.

Edited by RoboRay
Link to comment
Share on other sites

  • 4 weeks later...
On 11/21/2017 at 4:08 AM, SuicidalInsanity said:

2 ways of excluding something from the FAR aero calcs. First way is via the FARPartModuleTransformExceptions.cfg. This is a more selective method, and allows hiding select segments of a part from the Aero calcs - Parachute canopies/firespitter propeller blades/etc, but requires said segment to have a PartModule referencing it.
Second way is the nuclear option, via !MODULE[GeometryPartModule] {}, which completely removes the entire part from all aero calculations.

I would be grateful for anyone's clarification on what "TransformException" actually is/reffers.  I added the following exclusion and it appears to work, however I guessed at the TransformException & maybe I did not even need to include it?:  Thanks!

The exclusion I added to FARPartModuleTransformExceptions.cfg:

Spoiler

    FARPartModuleException
    {
        PartModuleName = ForceIndicatorModule
        TransformException = forceIndicator
    }
 

The actual KerbalEDU Force indicator part.cfg:

Spoiler

PART
{
name = forceIndicator
module = Part
author = NovaSilisko, TeacherGaming

//mesh = model.mu
//rescaleFactor = 1

node_attach = 0.0, 0.0, 0.0, 0.0, -0.5, 0.0

TechRequired = start
entryCost = 0
cost = 0
category = Science
subcategory = 0
title = EDU Force Indicator
manufacturer = TG Llc.
description = This device measures all forces currently acting upon a vessel, and shows them outside as nifty holographic arrows.
attachRules = 0,1,0,0,1

// --- standard part parameters ---
mass = 0.005
dragModelType = none
maximum_drag = 0
minimum_drag = 0
angularDrag = 0
crashTolerance = 8
maxTemp = 3200

MODEL
{
   model = KerbalEdu/Parts/ForceIndicator/model2
   position = 0, 0, 0
   scale = 0.2, 0.2, 0.2  //width - adjust scale, length, thickness, 1.75, 1.1 is delta wing 
   rotation = 0, 0, 0
// parent = anotherModelTransform    <---------Not necessary unless Second or subsequent part.
// texture = model000 , Squad/Parts/Command/probeCoreOcto/model000
// texture = model001 , Squad/Parts/FuelTank/fuelTank2-2/model001
}

MODEL
{
   model = KerbalEdu/Parts/ForceIndicator/model
   position = 0, 0, -1
   scale = 1, 1, 1  //width - adjust scale, length, thickness, 1.75, 1.1 is delta wing 
   rotation = 0, 0, 0
// parent = anotherModelTransform    <---------Not necessary unless Second or subsequent part.
// texture = model000 , Squad/Parts/Command/probeCoreOcto/model000
// texture = model001 , Squad/Parts/FuelTank/fuelTank2-2/model001
}

MODULE
{
    name = ForceIndicatorModule
}

}
 

 

 

Link to comment
Share on other sites

@AloE: All parts of a KSP part - the various parts of the 3D model, things like thrustTransforms, etc - are Unity transforms.
The TransformException is the name of the model transform(s) that are to be exempt the aero calculations; so a FireSpitter propeller, for instance, might have a Unity hierarchy tree with the following transforms:
FSPropellerEngine
     -->EngineBase
     |         -->PropSpinner
     |        |--> PropBlade1
     |        |--> PropBlade2
     |        |--> Rotordisc
     |--> EngineCollider
     |--> thrustTransform
     |--> Intake
Adding PropBlade1,PropBlade2, and Rotordisc to the transformExceptions list would hide their models from voxelization; so for the force indicator, if 'forceIndicator' is the name of the relevant part(s) of the model that is to be hidden, then you've correctly configured the exception.

Link to comment
Share on other sites

1 hour ago, SuicidalInsanity said:

a Unity hierarchy tree....name of the relevant part(s) of the model

@SuicidalInsanity Thank you.  Is the Unity hierarchy tree revealed in a file like part.cfg or other 'end user' file normally included with a part buried inside of the GameData folder or would one need access to the original 3D app files for the model that created the .mu Unity files in order to identify the actual names given to the relevant part of the model?  (I just guessed at the name from the info in the part.cfg which fortunately appears to have worked this time, but would be good to know for the future what file(s) actually carries the hierarchy & names especially if visible to the end user & if not I speculate I would need to find out either from the creator of the model or try a tool like suggested in this post to get into a .mu via blender...please let me know if it sounds like I am understanding sufficiently to write future exclusions)

 

Link to comment
Share on other sites

On 10/21/2018 at 8:04 AM, soulsource said:

Thanks. I think I got it working. My dll files were OK, but I guess I somehow managed to get old config files into my FAR installation, missing the config for the Mk1 pod.

@soulsource I am having the same issue with a RO and RSS install. How exactly were you able to get FAR to work?

Link to comment
Share on other sites

20 hours ago, iXeon said:

@soulsource I am having the same issue with a RO and RSS install. How exactly were you able to get FAR to work?

Phew, that was some time ago... Let's see if I remember correctly...
Somewhere in the last few pages of this thread (sorry, I don't have the link any more) there's a link to a forked github repo with a version of FAR for 1.4.1. I checked out that repo, made the changes to the compatibility checker file, recompiled it, and installed that version to my GameData folder. I think I also copied over the shaders package and icons from the last official release.

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...