Giter Site home page Giter Site logo

atmosphereautopilot's People

Contributors

boris-barboris avatar hebarusan avatar hotel26 avatar hsjasperism avatar krisalyssa avatar lisias avatar radistmorse avatar t2fat2fly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

atmosphereautopilot's Issues

MAS Bridge

Hi Boris, I'm looking to create an autopilot prop using https://github.com/MOARdV/AvionicsSystems/.

What I'd like to do is create a bridge where MAS can send commands to AA and display settings from AA on props. I've tried looking at your code, and I can't really make heads or tails of the different projects. Basically, I'm looking to duplicate the GUI inputs through MAS props inside the IVA:

  • Master On / Off (and tell MAS that it's on or off)
  • Cruise Flight Mode: MAS sets "Level," "Course", or "Waypoint" mode, reads which mode it's in
  • set waypoint, desired course, speed control, altitude hold, vertical speed control
  • Fly By Wire Mode on/off (and tell MAS that it's on or off)

Where would I find these functions in the AA code?

Cant set waypoint on cruise flight

When i try to set a waypoint using cruise flight and press on "Select waypoint" "map: pick" and select a planet using the map i get a popup saying "missed"

image

AoA-hold target set to strange values

When enabling the master switch at high altitude with AoA-hold mode selected, the AoA target is often set to angles that aren't near the current AoA (sometimes 100+ degrees) or even in the direction that the vessel is rotating toward.

Allow save to config to disable angle snap of rotation (default 3deg and not editable in configs)

this is for 0.001deg-level inclination control of SSTO to prepare for precise equitorial orbit around Kerbin (as KSC is not precisely on the equator, 2' south for runway). If it's in somewhere I didn't find in config, you may tell me and I'll appreciate it.
description: craft settings-roll ang vel controller, every time I have to manually set it to 0 before takeoff. reverting to launch, exit and restart KSP, etc. will cause this value to return to 3deg, making me have to set it to 0 every time before takeoff (shrugging.png here)

Question: Bank Angle

I've been trying to find a way to set a max bank angle but can't seem to find anything in the documentation. Is this something that is possible with Atmosphere Autopilot?

cant load saved crafts in SPH

I have found a bug - after installing this autopilot mod i cant load my crafts in SPH(load button in craft selecting menu just not workin) not all but almost all including stock crafts also. all went back to normal when i uninstalled this mod.ย ksp ver 1.10.1

please fix

Neo-GUI not working in 1.8

The way assetBundles are working changed somewhere around unity 2017, and now the "old way" became deprecated. This patch changes things on the loading front.

Also, building the assetBundle is now a real pain, since importing something dependent on UnityEngine.UI in the unity editor is broken in 2019.2.2 which KSP uses. You need to manually put the UnityEngine.UI.dll into the "plugins" folder, open the project, then import the AA.UI.dll, then import the prefab, then remove the UnityEngine.UI.dll, because importing it breaks other stuff, then pray to some unity gods or something... So I decided to just add the already exported bundle as a binary. Hopefully it will last another several years.
diff.txt
I didn't do it as a pull request because I'm lazy :)

Deployed control surfaces behave differently than stock

Deployed surfaces are not movable by the autopilot or manual controls. That might have been intended, but it should be optional or per-surface controllable, and can be done by disabling pitch/yaw/roll for that control surface anyway. Without the mod, the deploy angle is an offset to the user-input angle, not an override.

Additionally, change speed is dependent on deploy angle, see the line below from SyncModuleControlSurface.cs. It's likely that the intention was to only use the sign of deployAngle.

deflection = deflection + deployAngle * Common.Clampf(target - normdeflection, spd_factor);

Locally built code doesn't run

First, an introduction: I have more than 25 years experience in software development, but it's been about 18 years since I've done anything remotely related to Windows development (including C# and Mono). It's entirely possible that there's something I'm not doing that's immediately obvious to someone else.

Since I'm running on Mac OS X, I have installed Xamarin Studio 6.1.1 build 15, Mono 4.6.1, and GTK+ 2.24.23.

I forked the source code repository and cloned it locally. I opened the solution file, set the active configuration to Debug, cleaned, and built the solution (the level above the AtmosphereAutopilot, AtmosphereAutopilot.GUI, and TestingConsole projects). Four errors in TestingConsole, but the other two projects appear to have built okay [1]. I copied the files in bin/Debug to GameData/AtmosphereAutopilot, overwriting what was already there.

When I launch KSP with the code built locally, I get this in KSP.log:

[ERR 19:46:11.924] AssemblyLoader: Exception loading 'AtmosphereAutopilot': System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
  at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0
  at AssemblyLoader.LoadAssemblies () [0x00000] in <filename unknown>:0

Additional information about this exception:

 System.TypeLoadException: Could not load type 'AtmosphereAutopilot.FlightModel' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'AtmosphereAutopilot.DirectorController' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'AtmosphereAutopilot.AngularAccAdaptiveController' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'AtmosphereAutopilot.AngularVelAdaptiveController' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'AtmosphereAutopilot.PitchYawAngularVelocityController' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'AtmosphereAutopilot.PitchAngularVelocityController' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'AtmosphereAutopilot.RollAngularVelocityController' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'AtmosphereAutopilot.YawAngularVelocityController' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'AtmosphereAutopilot.MouseDirector' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'AtmosphereAutopilot.CruiseController' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'AtmosphereAutopilot.ProgradeThrustController' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'AtmosphereAutopilot.AoAController' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'AtmosphereAutopilot.SideslipController' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'AtmosphereAutopilot.PitchAoAController' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'AtmosphereAutopilot.StandardFlyByWire' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'AtmosphereAutopilot.TopModuleManager' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'AtmosphereAutopilot.TopModuleManager+CraftSettingsWindow' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'PartMass' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'EngineMoment' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'AtmosphereAutopilot.AngularAccAdaptiveController' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'AtmosphereAutopilot.PitchYawAngularAccController' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'AtmosphereAutopilot.PitchYawAngularAccController' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'AtmosphereAutopilot.AngularAccAdaptiveController' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'CenterIndicator' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'CruiseMode' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'HeightMode' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

 System.TypeLoadException: Could not load type 'SettingsProfile' from assembly 'AtmosphereAutopilot, Version=1.5.7.0, Culture=neutral, PublicKeyToken=null'.

To make sure this isn't a debug-versus-release thing, I changed the configuration to Release, cleaned, built again [2], and copied the resulting files to GameData/AtmosphereAutopilot. Same results.

Since we appear to be running completely different systems to develop, I'm not going to ask you to diagnose my system. (If you already know why it's not working for me, I wouldn't turn down that answer, however. ๐Ÿ˜„ ) What would help is if you could describe or document how you build the code. Hopefully that will show me if I'm missing some essential step or steps.

I'm happy to document/edit the build instructions in a new section in README.md once this is working.

[1] The first time I built AtmosphereAutopilot, I got an error because the .csproj file has a hardcoded reference to the COPY command, which Mac OS X doesn't have. Until I figure out how to copy README.md in a cross-platform-safe fashion, I've commented it out of the .csproj file. I don't think this should cause my built code to fail.

[2] The first time I built with the Release configuration, I got an error because the output paths in the .csproj file are hardcoded to refer to an installation under Steam, which isn't valid for me (I have the full app from Squad). I edited the .csproj file so the output paths are bin/Release instead. Since my results were the same as when I built with the Debug configuration, I don't think this is the cause of my local code failing either.

Different PID value for different side

When flying at extreme conditions, the control authority for pitching up and pitching down is becoming very different.
When I fly my stock-aero Eve SSTO with stock propeller engines at 10km+ at eve, since pitch-stability tend to roll your craft to AoA=0 but at 16km you need very high AoA - and you need pitch-stability or fuel tank's angular lift will ruin everything, AA will pitch down a lot (10m/s delta-vertical-vel) when you input a down control , but pitch up a little (1m/s delta-vertical-vel) when you input a up control (standard FBW). This is the most severe when you are climbing with barely acceleratable power (counting the thrust of props, only -200L/D, plus L=G means that Acc=G/200, and prop already set to max since I bind prop torque with main throttle) and near-stalling (10deg AoA) at 16.9km of Eve. Increasing the final altitude and velocity is very important for making Eve SSTO to orbit.
screenshot264
Btw, I still want to thank you for making this amazing mod, with the help of AA I can easily climb to 16km without consuming EC (solar bay, with SAS I can only climb to 14.5km before consuming EC), and climb to 140m/s@16900m, with SAS I got best 138m/s@16250m, same craft. (This craft is capable for Eve Orbit@90km with 1 Kerbal+Seat, 20 airlocks, and 150m/s nuclear dv, 1500m/s ion dv that is already enough for making it home.

Improve visibility of mouse director indicator

Default indicator is colored red, but in actual play the indicator's visibility is not so good. Some improvements are requested. Potential improvements may be:

  1. add a white outline to the indicator
  2. use a black bar with white outline or white bar with black outline as the indicator
  3. make it configurable, can be set through dragging images into mod folder and editing the .cfg files

NullReferenceExceptions

[EXC 11:53:01.074] NullReferenceException: Object reference not set to an instance of an object
	VesselAutopilot.SetAutopilotTarget (System.Boolean initialize) (at <9d71e4043e394d78a6cf9193ad011698>:0)
	VesselAutopilot.SetAutopilot (System.Boolean initialize) (at <9d71e4043e394d78a6cf9193ad011698>:0)
	VesselAutopilot.Update () (at <9d71e4043e394d78a6cf9193ad011698>:0)
	Vessel.Update () (at <9d71e4043e394d78a6cf9193ad011698>:0)

Here's the entire log.

KSP.log

Setting in ControlSurface is gone

I know AA uses SyncModuleControlSurface module instead of stock ModuleControlSurface.
But there is a problem like this :

when a plane's ModuleControlSurfacevalue like authoritylimitor or deployAngle is modified in pure stock ksp,
and when I load this plane in AA ksp, that settings value is gone and setting in action group is also gone.

this is stock module value in .craft.

MODULE
{
	name = ModuleControlSurface
	isEnabled = True
	mirrorDeploy = False
	usesMirrorDeploy = True
	ignorePitch = False
	ignoreYaw = True
	ignoreRoll = False
	deploy = False
	deployInvert = False
	partDeployInvert = False
	deployAngle = 0 // <- here
	authorityLimiter = 150 // <- here
	stagingEnabled = True
	EVENTS
	{
	}
	ACTIONS
	{
		ActionToggle
		{
			actionGroup = Brakes // <- here
			wasActiveBeforePartWasAdjusted = False
		}
		ActionExtend
		{
			actionGroup = None
			wasActiveBeforePartWasAdjusted = False
		}
		ActionRetract
		{
			actionGroup = None
			wasActiveBeforePartWasAdjusted = False
		}
	}
	AXISGROUPS
	{
		deployAngle
		{
			axisGroup = None
			axisIncremental = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			axisInverted = None
			overrideIncremental0 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental1 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental2 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental3 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
		}
		authorityLimiter
		{
			axisGroup = None
			axisIncremental = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			axisInverted = None
			overrideIncremental0 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental1 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental2 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental3 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
		}
	}
	UPGRADESAPPLIED
	{
	}
}
}

and this is AA modified .craft's module in .craft file.

MODULE
{
	name = SyncModuleControlSurface
	isEnabled = True
	mirrorDeploy = False
	usesMirrorDeploy = True
	ignorePitch = False
	ignoreYaw = False
	ignoreRoll = False
	deploy = False
	deployInvert = False
	partDeployInvert = False
	deployAngle = 15 // <- here
	authorityLimiter = 100 // <- here
	stagingEnabled = True
	EVENTS
	{
	}
	ACTIONS
	{
		ActionToggle
		{
			actionGroup = None // <- here
			wasActiveBeforePartWasAdjusted = False
		}
		ActionExtend
		{
			actionGroup = None
			wasActiveBeforePartWasAdjusted = False
		}
		ActionRetract
		{
			actionGroup = None
			wasActiveBeforePartWasAdjusted = False
		}
	}
	AXISGROUPS
	{
		deployAngle
		{
			axisGroup = None
			axisIncremental = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			axisInverted = None
			overrideIncremental0 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental1 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental2 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental3 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
		}
		authorityLimiter
		{
			axisGroup = None
			axisIncremental = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			axisInverted = None
			overrideIncremental0 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental1 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental2 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental3 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
		}
	}
	UPGRADESAPPLIED
	{
	}
}
}

It makes a small problem that transfering .craft file from AA modified KSP -> to stock KSP.
Yes. it removes settings of wings. it is a main problem now.

I added .craft file in here.

Skylon.craft.txt
Skylon AA.craft.txt

Serialize Use_breaks

Hello, could we make the Use_breaks field in the thrust controller serializable? I can't save the settings, and every load of the game, I have to manually unset it. Tried adding use_breaks=False to global settings and vessel design, no dice.

I'm not a C# dev, but I think the culprit is that it isn't serializable:

On a related note, could we also fix 2 minor issues: When use_breaks is on (default), I can't manually use the breaks, and when the module is actively breaking, and I press the "master switch" [P], the breaks keep on.

Cheers.

AA-Button disappears when RCSBuildAid is installed

Hi!
For some strange reason, the AA-Button is not present, if the RCSBuildAid plugin is installed

http://forum.kerbalspaceprogram.com/threads/35996-1-0-2-RCS-Build-Aid-v0-7-2
https://github.com/m4v/RCSBuildAid

Removing RCSBuildAid makes the AA-Button appear again.
I could produce this in a clean install, so interaction with a 3rd mod can be excluded.

Update: The offending file is apparently RCSBuildAid/Plugins/RCSBuildAidToolbar.dll
This is the source coude of the file: https://github.com/m4v/RCSBuildAid/blob/master/RCSBuildAidToolbar/Toolbar.cs

Probably-unimportant stuff

AoA is limited to less than the set value when in precision mode with the pitch rate limit enabled.

user_controlled seems to never get reset to false when user input returns to 0. Might be intentional and only used for the sideslip moderation, but it should be renamed if so.

AoA cruise mode

Description:
Create an AoA cruise mode, when you input a W/S control, it just changes desired AoA.
(Still take my Eve SSTO as an example: it is tuned between -0.7deg and 0.2deg at 300-1700m/s.)

Logspam when USI-LS is installed

Hi! Since the Update to 1.0.5, there is a compatibility issue between USI-LS[https://github.com/BobPalmer/USI-LS/releases] and AtmosphereAutopilot. There is a logspam of:

MissingMethodException: Method not found: 'ResourceConverter.ProcessRecipe'.

If either USI-LS is or AtmosphereAutopilot is removed, the logspam goes away.
This happens both in the editor as well as in a flight scene, if a crewed part exists.

http://forum.kerbalspaceprogram.com/threads/116790-1-0-USI-Life-Support-0-1-0-2015-04-27
https://github.com/BobPalmer/USI-LS/releases

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.