Jump to content

Benache

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by Benache

  1. Well i tried but there must be some kind of mecanism that destroys it in the end because no matter how tough i make it it always disappears after a crash. But i had some fun looking for it with a rover.
  2. Exactly. And I spent a few hours deboging with the config file I have... Good work, thanks.
  3. oops, sorry i'll correct that. and then again, why am i not receiving notifications for new messages anymore ?
  4. Well, that's quite strange, i don't understand. I have to ask this question : did you try to liftoff ? because recording starts at liftoff. I'm using a single stage rocket to test the plugin, so it should work, especially if the file is created...
  5. Well, why not, but i reckon it won't be that easy to code, and frakly i don't see the point. You can get a lot of science quite easilly by going far away from kerbin in a basic ship.
  6. Oh sorry, yes i did. You need Advanced Electrics
  7. I'm a very disapoint. The tech tree is illogical. It's quite easy at the beginning, and very easy then.
  8. OK, so i added : - support for the methods - possibility to add a value from different modules of the ship. - improved the cfg file Downloadable from spaceport as usual.
  9. Thanks guys. I found a way to serialize even more data. Interesting stuff coming, in a few hours.
  10. OK, two afterthoughts : I need your help to improve the part.cfg file. If you find new usefull data, please share here. The goal would be to have a default file with sections and comments. A bit like that : //VESSEL DYNAMICS // Orbital velocity : velocity measured in a geocentric reference obt_velocity : vessel.obt_velocity.magnitude //obt_velocity.x : vessel.obt_velocity.x //obt_velocity.y : vessel.obt_velocity.y //obt_velocity.z : vessel.obt_velocity.z // Surface velocity : velocity measured in a local reference srf_velocity : vessel.srf_velocity.magnitude //srf_velocity.x : vessel.srf_velocity.x //east //srf_velocity.y : vessel.srf_velocity.y //north //srf_velocity.z : vessel.srf_velocity.z //up //ORBITAL VALUES // Basic orbital data orbitalEnergy : vessel.orbit.orbitalEnergy period : vessel.orbit.period inclination : vessel.orbit.inclination //argumentOfPeriapsis : vessel.orbit.argumentOfPeriapsis //semiMajorAxis : vessel.orbit.semiMajorAxis //semiMinorAxis : vessel.orbit.semiMinorAxis //semiLatusRectum : vessel.orbit.semiLatusRectum eccentricity : vessel.orbit.eccentricity In this exemple, i added comment to surface velocity, but it must be false, I don't know anything about that I think it might be quite easy now to had a value to search in all the parts of the vessel. For example : to calculate the total thrust, i look in each part of the ship for a module of type ModuleEngine , and i add the result of the CalculateThrust() Method. I will work on that later.
  11. I already did, but maybe not enough. I tryed a few crashes and had fun looking for the flight recorder with my rover Ok, i'll adjust that. If you don't want to wait, you can change the crashTolerance value in the \FlightRecorder\FlightRecorder\part.cfg file. I already multiplyed it by 10. Try 100 000 !!
  12. Done !! That wasn't easy, i had to learn serialization and it's quite tricky. Config file is such : // FLIGHT RECORDER by Géraud Benazet // License : CC BY SA 3.0 http://creativecommons.org/licenses/by-sa/3.0/deed.en_GB // See forum thread for questions http://forum.kerbalspaceprogram.com/threads/52403-0-21-1-Flight-Recorder // SYNTAX // Header : Value // - Header will be written at the first line of your csv file // - Value must be a member of the PartModule class. For the moment only Properties and Fields are supported. I'll add Methods later // You can add comments at the end of the lines // You can use white spaces, tabulations and blank lines // // LIMITATIONS // Until I take the time to code it properly, the first 4 columns aren't customizable // Date : computer date the line was written // TotalMass : vessel.GetTotalMass() // TotalThrust : total thrust (calculated) // GeeForce : FlightGlobals.getGeeForceAtPosition(this.transform.position).magnitude // Please keep these comments in your config files. It will be easier to share. missionTime : vessel.missionTime situation : vessel.situation currentStage : vessel.currentStage latitude : vessel.latitude longitude : vessel.longitude altitude : vessel.altitude acceleration : vessel.acceleration.magnitude specificAcceleration : vessel.specificAcceleration verticalSpeed : vessel.verticalSpeed orbitVelocity : vessel.obt_velocity.magnitude surfaceVelocity : vessel.srf_velocity.magnitude angularVelocity : vessel.angularVelocity.magnitude atmDensity : vessel.atmDensity terrainAltitude : vessel.terrainAltitude terrainNormal.x : vessel.terrainNormal.x terrainNormal.y : vessel.terrainNormal.y terrainNormal.z : vessel.terrainNormal.z orbitalEnergy : vessel.orbit.orbitalEnergy period : vessel.orbit.period inclination : vessel.orbit.inclination eccentricity : vessel.orbit.eccentricity ApA : vessel.orbit.ApA timeToAp : vessel.orbit.timeToAp PeA : vessel.orbit.PeA timeToPe : vessel.orbit.timeToPe Here is the code that gets the values. Feel free to use but quote me please. USAGE : getValue(this, "vessel.acceleration.magnitude") private String getValue(Object parent, String valueName) { Object o; String value; int period = valueName.IndexOf(@"."); //Parsing value name if (period == -1) value = valueName; else value = valueName.Substring(0, period); //Serializing object try { o = parent.GetType().GetProperty(value).GetValue(parent, null); } catch { o = parent.GetType().GetField(value).GetValue(parent); } //print(@"Created " + o.GetType() + " " + o); //Recursing if (period == -1) return o.ToString(); else return getValue(o, valueName.Substring(period + 1)); }
  13. I'm using excel ftm, but I will be using XnGrace when I need to do Science Thanks, good idea. Though it is part of the nav system... I will add it but not remove it from the flight recorder. I'm currently searching the best way to allow user customization. Maybe the cfg file is the best way. Looking into serialization now... I think i'm gonna allow users to make several cfg file, and add a selection box in the gui. If i can do it, honestly i didn't look much into the GUI and it's kind of obscure to me right now. Well, that's my problem. I use : - the Visual Studio object explorer to view the public interface of the KSP c# assembly (\KSP\KSP_Data\Managed\Assembly-CSharp.dll) - the KSP wiki community API documentation which is really poor for the moment - examples of code on github (mostly Telemachus and MechJeb) or on the wiki But no, i didn't find any comprehensive documentation. Quite annoying. If anyone can help... I added to the zip an excel sheet with macros, in the logs directory. Use the tools window that will pop up. It doesn't handle sensor detectors, but you'll get the idea by right clicking on the graph and looking at the data source. Already thinking about that. Please do. Don't forget to quote me. Again, thanks for all your kind cheerings. Please rate the mod on the SpacePort, the better grade it gets, the more it will be downloaded, and we will have more suggestions / help from kerbonauts. Also it will cheer me up and i will work on it.
  14. I think i'm gonna remove the atmPrssure from the flight recorder, as you can obtain it from the barometer. On the same spirit, I will make a radar altimeter part, and move terrainAltitude and terrainNormal into it. And the same for geeForce based on this design : If you have any other scientific instrument in mind, existing or not, please suggest.
  15. I initially supported only the four basic (squad) instruments. As you asked nicely, I just added support for the KSP interstellar plugin's "Dual Technique Magnetometer".
  16. updated : added toggles, and removed useless data.
  17. I will add a toggle, good idea, i'm mostly using it for optimization of the launch so i didn't think of it. You can use the third column ("situation") as a checkpoint. It says FLYING / SUBORBITAL / ORBITAL etc. But i'll think about a way of manually adding checkpoint without corrupting the file. I posted a new release : i just added totalthrust and totalmass, which are quite usefull... I think i'm gonna remove 80% of the columns though. They are useless to me, so please feel free to ask for a specific data you need.
  18. I wanted to analyze data post-flight, and i stumbled upon crwper's Logomatic. But it didn't work with the new unity format of parts, so i first took on myself to modify the part (as it was CC BY SA). But then i felt the need to add more data to the log file (orbit data like ApA e.g.), so i decided to make my own (first) mod. I only realized afterwards that his source code was available... Anyway, here is FLIGHT RECORDER. I'm quite satisfied with the look of the parts DOWNLOAD SpacePort LICENSE CC BY SA 3.0 Source is in the archive DESCRIPTION There are two parts available, Flight Recorder and Sensor Recorder (as seen on the picture above). Flight Recorder Saves a bunch of data to a log file (see below). The data to save is configurable in the Data.cfg file located in GameData/FlightRecorder/Plugin/PluginData/ Explanations are contained in the file. Basically, you can had any method, property and field of the PartModule class. There are two syntaxes available // SINGLE VALUE // Header : member1[.member2[.member3[...]]] // Will look into the Flight Recorder members for the specified 'member1' (and sub-members) and return its value. // 'member1' must be a member (or an inherited member) of the class PartModule, which is the class of the Flight Recorder. // Don't worry, there are a lot of examples below. // SUM // Header : <moduleType>.member1[.member2[.member3[...]]] // will look in every part of the vessel for a PartModule of the type 'ModuleType', get the value of its specified member // 'member1' (and sub-members) and return the sum of their value (in a float object, so limits are ±1.5E−45 and ±3.4E+38). // In both syntaxes, members can either be Methods, Properties and Fields . // You can't add arguments to a Method. You can had parenthesis to Methods for ease of reading, but they will be ignored. Sensor Recorder Saves the data of a scientific sensor attached to it (in the white hatched zone if you want it to be pretty). If you want to record multiple sensor, use as many Sensor Recorders, a file will be created for each Sensor Recorder. Remember to turn on your sensor !! Currently supported : - [squad] GRAVMAX Negative Gravioli Detector - [squad] PresMat Barometer - [squad] Double-C Accelerometer - [squad] 2HOT Thermometer - [KSP Interstellar] Dual Technique Magnetometer Log Files All log files are located in GameData/FlightRecorder/Plugin/PluginData/FlightRecorder/ The file is created when the ship is loaded on the launchpad, but recording begins at liftoff. Data are saved every 200ms (not editable for the moment, although it would be easy now i added the Data.cfg file...). CHANGELOG 2013/10/21 - added compatibility with Tech Tree (you will need advanced electrics). 2013/10/15 - added support for the methods - added possibility to add a value from different modules of the ship. - improved the cfg file 2013/10/13 - added the ability to choose log values with the Data.cfg file. - increased resistance of the flight recorder to crash 2013/10/12 - added totalThrust and totalMass - removed a lot of useless fields from the FlightRecorder. The log files are much more lighter now ! - added toggle to enable/disable recording. - added support for [KSP Interstellar] Dual Technique Magnetometer TODO - allow user to add checkpoint - allow user to choose recording interval - DONE : allow user to choose what data is recorded - add support for more scientific instrument (tell me which) - OBSOLETE : log RCS usage, engine gimbal angles, throttle setting (not just thrust amounts) and reaction wheels usage - OBSOLETE : remove data that can be obtained by an instrument / Add those instruments. DATA DOCUMENTATION : I need your help !! I didn't find any comprehensive documentation. Quite annoying. If anyone can provide a link or a document, that would be greatly appreciated. For the moment, I use : - the public interface of the KSP c# assembly (\KSP\KSP_Data\Managed\Assembly-CSharp.dll) - the KSP wiki community API documentation which is really poor for the moment - examples of code on github (mostly Telemachus and MechJeb) or on the wiki I need your help to improve the part.cfg file. If you find new usefull data, please share here. The goal would be to have a default file with sections and comments. A bit like that : //VESSEL DYNAMICS // Orbital velocity : velocity measured in a geocentric reference obt_velocity : vessel.obt_velocity.magnitude //obt_velocity.x : vessel.obt_velocity.x //obt_velocity.y : vessel.obt_velocity.y //obt_velocity.z : vessel.obt_velocity.z // Surface velocity : velocity measured in a local reference srf_velocity : vessel.srf_velocity.magnitude //srf_velocity.x : vessel.srf_velocity.x //east //srf_velocity.y : vessel.srf_velocity.y //north //srf_velocity.z : vessel.srf_velocity.z //up //ORBITAL VALUES // Basic orbital data orbitalEnergy : vessel.orbit.orbitalEnergy period : vessel.orbit.period inclination : vessel.orbit.inclination //argumentOfPeriapsis : vessel.orbit.argumentOfPeriapsis //semiMajorAxis : vessel.orbit.semiMajorAxis //semiMinorAxis : vessel.orbit.semiMinorAxis //semiLatusRectum : vessel.orbit.semiLatusRectum eccentricity : vessel.orbit.eccentricity In this exemple, i added comment to surface velocity, but it must be false, I don't know anything about that
×
×
  • Create New...