Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter SDK
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Orbiter SDK Orbiter software developers post your questions and answers about the SDK, the API interface, LUA, meshing, etc.

Reply
 
Thread Tools
Old 09-02-2019, 01:59 PM   #46
martins
Orbiter Founder
Default

Thanks for volunteering on writing documentation! It's much appreciated.
Maybe a separate .lua document containing only the documentation in ldoc format would be easiest, since I could then just automatically run ldoc over it as part of the build process. The only disadvantage is that for any changes to the interface one would have to remember to also update the documentation, but hopefully that won't happen too often.
martins is offline   Reply With Quote
Thanked by:
Old 09-02-2019, 09:11 PM   #47
kuddel
Donator
Default

Hi Martin,

find attached a proposal for the file-/directory layout for the samples Lua-API-documentation files.
The actual documentation content is not yet full-blown, so no need to look deep into it.

I just wanted you to ask if you could "flesh out" one of that files with the necessary meta data, that might be needed to fit your documentation process.
(DeltaGlider/Doc.lua for example).

I mean: In the top section I guess some @section or @class or @chapter might be needed...

So if you could edit and post just one to fit the process I'll take that as a template.

Regards,
Kuddel

Edit: Oh, and if the layout/names doesn't fit, just drop a note.
Edit2 (2019-09-03): I've added a "LDoc-Syntax corrected" version (I don't know who already downloaded the first pack; which was useless, sorry).
Attached Files
File Type: zip LuaDocProposal(v3).zip (4.4 KB, 1 views)

Last edited by kuddel; 09-05-2019 at 05:55 PM.
kuddel is offline   Reply With Quote
Old 09-04-2019, 12:51 PM   #48
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

I haven't had a chance to look at the code. But would it work for the marscopter? Where it has 2 sets of blades on top on each other?
gattispilot is online now   Reply With Quote
Old 09-04-2019, 01:34 PM   #49
martins
Orbiter Founder
Default

Quote:
Originally Posted by gattispilot View Post
 I haven't had a chance to look at the code. But would it work for the marscopter? Where it has 2 sets of blades on top on each other?
The concept is the same surely. You need to calculate the thrust force as a function of RPM anyway, so you factor the rotor geometry in there. Obviously, arranging two rotors on top of each other provides less than twice the thrust of a single rotor. Also, if the rotors have opposite spin directions (do they?) then you need to figure out how to impart the torque used to rotate the vessel around its vertical axis. It will involve RPM differentials between the rotors in the vertical stacks.

Any reason for the choice of this particular configuration? I would have thought a conventional octocopter configuration would be more efficient than this doubled-up quadcopter setup, and probably at least as failure-tolerant. Is it due to size constraints of the payload package?

Btw. marscopter ?!? I thought this was for use on Titan. Not sure you would get this thing to take off on Mars.
martins is offline   Reply With Quote
Old 09-04-2019, 01:40 PM   #50
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

here is the MArs copter:
https://www.nasa.gov/feature/jpl/nas...ars-2020-rover
gattispilot is online now   Reply With Quote
Old 09-04-2019, 02:02 PM   #51
martins
Orbiter Founder
Default

Fair enough, but this appears to be no quadcopter at all, but a more conventional twin-rotor helicopter. So the control mechanisms coded by my quadcopter sample won't help you much there.
martins is offline   Reply With Quote
Thanked by:
Old 09-04-2019, 02:06 PM   #52
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Sounds good. Hope to get a chance to look it and recode the quad
gattispilot is online now   Reply With Quote
Old 09-05-2019, 05:56 PM   #53
kuddel
Donator
Default

@martins: Just in case you've missed my Lua documentation proposals, they're here

Do you have any markup enabled in your generation, or is it fine to use HTML?
I also noticed that Math formulas are not rendered nicely (see "vessel:get_angularmoment()" from the main lua cpp files for example), is there a plugin/addon that render them more nicely?

HTML5 <math> might work, but I haven't tried if it compiles well into .chm
https://developer.mozilla.org/en-US/...L/Element/math

Last edited by kuddel; 09-05-2019 at 06:14 PM.
kuddel is offline   Reply With Quote
Old 09-05-2019, 09:17 PM   #54
martins
Orbiter Founder
Default

Sorry for the late response. I've been living without internet at home for the last week, and just got reconnected today. It's frightening when you realise how much you rely on it just to do something trivial like looking up ldoc format documentation

Anyway, back in business. I'll have a look at your templates and will prepare the Deltaglider one with everything required to compile it in my build system. Might not get round to it before the weekend though.

I am not sure if it would be worth trying to merge the vessel documentations into the global Lua interface documentation or just leave them as separate files. That would simplify things, but might make it more difficult for users to access the info from within the running simulation.

Thanks for pointing me to the problem with the math format. So ldoc definitely doesn't have the same functionality as doxygen - pity. I'll look at the HTML5 option. I just wish the HTML5 guys had adapted LaTeX format instead of MathML, which I am not familiar with at all. Something new to learn.
martins is offline   Reply With Quote
Old 09-05-2019, 09:49 PM   #55
kuddel
Donator
Default

Take your time!

I'll also take a look around regarding the math...I think I read somewhere about a TeX -> MathML/HTML conversion tool which might make conversion easier
kuddel is offline   Reply With Quote
Old 09-14-2019, 01:30 AM   #56
martins
Orbiter Founder
Default

Ok, I've uploaded a new commit now that incorporates the framework for the documentation of the vessel-specific Lua extensions (DeltaGlider only so far). A few things:

* After some more thought, I have changed my mind about the separate dummy Lua file for documentation. I have added the documentation now directly into the C++ implementation (DGLua.cpp). Since the function name needs to be added manually anyway via the @function tag, it probably doesn't matter if it is read from a Lua or a C++ file, and having the documentation next to the implementation makes it a bit easier to keep in sync and to write the documentation at the same time as the implementation. Would you agree? I hope I haven't caused too much unnecessary work with this change.

* There is now a "config.ld" in the Help subdirectory which contains the parameters for ldoc.

* ldoc is run as part of the custom build steps for the Deltaglider.hpp and DG-S.hpp files. The Lua documentation is merged into the DeltaGlider.chm and DG-S.chm files, which are accessible from within the simulation. The Lua documentation is accessed via an entry in the TOC.

* There is an additional ldoc.props property page that the Deltaglider project now uses. This allows to customise the location of the ldoc executable (by default it is assumed in the search path). I have tried to make sure that compilation doesn't fail if ldoc isn't found. In that case, a dummy page is created saying that the Lua documentation isn't available.

* I also fixed a few problems in the DeltaGlider project file. I hadn't noticed them before because I normally build the Orbitersdk samples from a global solution file within my source directory, rather than separately from the deployed Orbitersdk directory, so some of the directory macros used in the project files have different values.

Please let me know what you think, and if this structure looks sensible.
martins is offline   Reply With Quote
Thanked by:
Old 09-14-2019, 12:31 PM   #57
kuddel
Donator
Default

Quote:
Originally Posted by martins View Post
 * After some more thought, I have changed my mind about the separate dummy Lua file for documentation. I have added the documentation now directly into the C++ implementation (DGLua.cpp). Since the function name needs to be added manually anyway via the @function tag, it probably doesn't matter if it is read from a Lua or a C++ file, and having the documentation next to the implementation makes it a bit easier to keep in sync and to write the documentation at the same time as the implementation. Would you agree? I hope I haven't caused too much unnecessary work with this change.
100% agreement here

Quote:
Originally Posted by martins View Post
 Please let me know what you think, and if this structure looks sensible.
I'll take a look when I find some time (expect a minor delay).
The structure should be sensible for you in the first place, so I guess it will be O.K. for me.

So I'll post a ZIP based on that revision (r90), if that's O.K.

Thanks for the work,
Kuddel
kuddel is offline   Reply With Quote
Thanked by:
Old 09-14-2019, 10:43 PM   #58
kuddel
Donator
Default

Here we go:
Attached you'll find my changes.
  • I took the liberty and added some missing documentation in lua_vessel_mtd.cpp (LuaInterpreter).
  • I am a bit puzzled about how to really use 'markdown' syntax
    (is two leading spaces really the recommended way to force a line-break?!)
    And lists do not work for me as expected (I had to add those 2 trailing spaces...)
  • I couldn't really find out the exact meaning of the parameters for ShuttleA:set_attoffsetmode and ShuttleA:set_atttgtframemode,
    so you might take a short look at those two as my "description" is ...obvious at best .
  • In the ZIP you'll also find a (r90 based) .pach file, which you might find useful, or can be ignored if you like to work with the individual files more

Hope this helps

Edit 2019-09-16:
Grrrrr I hate it when when it happens. Always one file missing whenever you have to edit many other (project-)files, too.
Needed changes in Interpreter.h (copied to include path during build, too) were missing, so 2nd attachment should include those changes, too.
  • replaced LuaDocOrbiter 2019-09-15.zip with LuaDocOrbiter 2019-09-16.zip
Attached Files
File Type: zip LuaDocOrbiter 2019-09-16.zip (76.7 KB, 0 views)

Last edited by kuddel; 09-17-2019 at 01:34 PM.
kuddel is offline   Reply With Quote
Reply

  Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter SDK


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 06:08 PM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.