GPS internals: Difference between revisions

Jump to navigation Jump to search
m
Line 13: Line 13:
==Concepts==
==Concepts==


The code computes basic positional information, derived from FG's knowledge of the aircraft position (i.e the /position properties). There is no attempt made to accurately simulate GPS position calculation - in the future an error function will be used (optionally) to reduce the accuracy of the GPS indicated position.
The code computes basic positional information, derived from FG's knowledge of the aircraft position (i.e the <tt>/position</tt> properties). There is no attempt made to accurately simulate GPS position calculation - in the future an error function will be used (optionally) to reduce the accuracy of the GPS indicated position.


From the indicated position, many other values are derived - ground track, speed, vertical speed, odometer and so on. All these values can be seen in the basic /gps property tree, and are hopefully self-explanatory.
From the indicated position, many other values are derived - ground track, speed, vertical speed, odometer and so on. All these values can be seen in the basic /gps property tree, and are hopefully self-explanatory.
Line 26: Line 26:


The GPS has a simple command system - it expects the properties under <tt>gps/scratch</tt> to be populated with some parameters, and then a command property to be set. Information is also returned via the <tt>gps/scratch</tt> properties. For example, to go direct to a waypoint, it must be loaded into the scratch, and a 'direct' command executed. To find the nearest VOR, set <tt>scratch/type</tt> to <tt>vor</tt> and execute a <tt>nearest</tt> command. The scratch will be updated with information about the result (if one was found) - and then a 'direct' or 'obs' command can be executed to use the waypoint.
The GPS has a simple command system - it expects the properties under <tt>gps/scratch</tt> to be populated with some parameters, and then a command property to be set. Information is also returned via the <tt>gps/scratch</tt> properties. For example, to go direct to a waypoint, it must be loaded into the scratch, and a 'direct' command executed. To find the nearest VOR, set <tt>scratch/type</tt> to <tt>vor</tt> and execute a <tt>nearest</tt> command. The scratch will be updated with information about the result (if one was found) - and then a 'direct' or 'obs' command can be executed to use the waypoint.


==Command List==
==Command List==
580

edits

Navigation menu