20,741
edits
(The reason for not using the SI system is that US aeronautical engineering textbooks more often uses the Foot–pound–second system) |
m (beginning to clean up/structure the discussion - removing the code, because it is being edited as part of the main article already (see my contributions there)) |
||
| Line 57: | Line 57: | ||
:: correct, but this is not specific to FDMs - all the autopilot/routing logic that people tend to reinvent in Nasal is significantly overlapping with existing, generic, C++ subsystems that are currently not yet exposed to Nasal. Thus, the main thing is using properties analogous to the actual C++ subsystems for interacting with the FDM/AP and RM components, which will ensure that a reusable and generic design is established, while preparing it for future updates. Otherwise, there will be more and more Nasal code doing what the C++ code is known to be very good at already.--[[User:Hooray|Hooray]] ([[User talk:Hooray|talk]]) 18:00, 29 October 2014 (UTC) | :: correct, but this is not specific to FDMs - all the autopilot/routing logic that people tend to reinvent in Nasal is significantly overlapping with existing, generic, C++ subsystems that are currently not yet exposed to Nasal. Thus, the main thing is using properties analogous to the actual C++ subsystems for interacting with the FDM/AP and RM components, which will ensure that a reusable and generic design is established, while preparing it for future updates. Otherwise, there will be more and more Nasal code doing what the C++ code is known to be very good at already.--[[User:Hooray|Hooray]] ([[User talk:Hooray|talk]]) 18:00, 29 October 2014 (UTC) | ||
== Extending geo.Coord using Sub-classing == | |||
A suggestion that I have is to expand geo.Coord to hold orientation values. That would mean we could handle target and have their lat/lon/alt/pitch/roll/heading at our fingertips. | A suggestion that I have is to expand geo.Coord to hold orientation values. That would mean we could handle target and have their lat/lon/alt/pitch/roll/heading at our fingertips. | ||
[[User:Red_Leader|Red Leader]] ([[User_talk:Red_Leader|Talk]] | [[Special:Contributions/Red_Leader|contribs]]) 17:03, 29 October 2014 (UTC) | [[User:Red_Leader|Red Leader]] ([[User_talk:Red_Leader|Talk]] | [[Special:Contributions/Red_Leader|contribs]]) 17:03, 29 October 2014 (UTC) | ||
: like I said, this is trivial to do using sub-classing, so need to touch geo.nas at all - just create your own geo.Coord sub-class and add helpers for getting the corresponding properties via props.nas --[[User:Hooray|Hooray]] ([[User talk:Hooray|talk]]) 17:55, 29 October 2014 (UTC) | : like I said, this is trivial to do using sub-classing, so need to touch geo.nas at all - just create your own geo.Coord sub-class and add helpers for getting the corresponding properties via props.nas --[[User:Hooray|Hooray]] ([[User talk:Hooray|talk]]) 17:55, 29 October 2014 (UTC) | ||
PS Hooary, how do you sub-class an existing Nasal class? | PS Hooary, how do you sub-class an existing Nasal class? | ||
| Line 206: | Line 71: | ||
I'll try to contribute a little but time, sadly is missing here ! | I'll try to contribute a little but time, sadly is missing here ! | ||
—[[User:5H1N0B1|5H1N0B1]] ([[User_talk:5H1N0B1|Talk]] | [[Special:Contributions/5H1N0B1|contribs]]) 22:02, 29 October 2014 (UTC) | —[[User:5H1N0B1|5H1N0B1]] ([[User_talk:5H1N0B1|Talk]] | [[Special:Contributions/5H1N0B1|contribs]]) 22:02, 29 October 2014 (UTC) | ||
== Code Feedback == | |||
* you can probably use forindex/foreach loops in a few places | * you can probably use forindex/foreach loops in a few places | ||
| Line 214: | Line 81: | ||
* reset/re-init listeners should be registered to deal with sim resets/repositioning | * reset/re-init listeners should be registered to deal with sim resets/repositioning | ||
== Things to keep in mind == | |||
Few things, just to be sure, and to remember : | Few things, just to be sure, and to remember : | ||
* a) The missiles object have to be loaded/created only once the fire order have been triggered. | * a) The missiles object have to be loaded/created only once the fire order have been triggered. | ||