106 107 Start up fgfs with : 108 109 fgfs -nmea =socket ,out, 0.5 ,atas -host -name, 5500 ,udp 110 111 Start up the Atlas program with : 112 113 Atlas -udp = 5500 -fgroot =path -to -fg -root -glutfonts 114 115 Once both programs are running, the Atlas program should display 116 your current location. Either way will work, but this example 105 demonstrates the use of a socket connection. 102 103 The moving map supports NMEA format input either via network or 104 via serial port. net ) The initial inspiration and much code came 101 from Alexei Novikov. out ,playback ,repeat, 5 95 96 97 Moving Map Example : 98 99 Per Liedman has developed a moving map program called Atlas 100 (atlas. out ,playback ,repeat 92 93 With a numeric argument, FlightGear will exit after that number of repeats. ![]() ![]() fgfs -fdm =external 87 88 You can make the replay from a file loop back to the beginning 89 when it reaches the end of the file with the "repeat" flag : 90 91 -generic =file ,in, 20 ,flight. fgfs 83 84 example to replay your flight 85 86 -native =file ,in, 10 ,flight1. ) 72 73 74 File I /O : 75 76 -garmin =file ,dir ,hz ,filename 77 78 filename = file system file name 79 80 example to record a flight path at 10 hz : 81 82 -native =file ,out, 10 ,flight1. This tells 69 the second copy of fgfs to not run the normal flight model, but 70 instead set the FDM values based on an external source (the 71 network in this case. Note the additional -fdm =external option. 66 67 The second copy of fgfs will accept UDP packets (from anywhere ) on 68 port 5500. 12 13 protocol = 43 44 example to pretend we are a real gps and output to a moving map application : 45 46 -nmea =serial ,out, 0.5 ,COM1, 4800 47 48 Note that for unix variants you might use a device name like "/dev/ttyS0" 49 50 51 Socket Communication : 52 53 -native =socket ,dir ,hz ,machine ,port ,style 54 55 machine = machine name or ip address if client (leave empty if server ) 56 port = port, leave empty to let system choose 57 style = tcp or udp 58 59 example to slave one copy of fgfs to another 60 61 fgfs1 : -native =socket ,out, 30 ,fgfs2, 5500 ,udp 62 fgfs2 : -native =socket ,in, 30, 5500 ,udp -fdm =external 63 64 This instructs the first copy of fgfs to send UDP packets in the 65 native format to a machine called fgfs2 on port 5500. 7 8 9 The general form of the command line option is as follows: 10 11 -protocol=medium,direction,hz,medium_options. ![]() You can 6 specify multiple entries if you like, one per command line option. The IO 5 options are configured at runtime via command line options. 2 3 FlightGear has a fairly flexible generic IO subsystem that allows you 4 to "speak" any supported protocol over any supported medium. As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) IO source code syntax highlighting (style: standard) with prefixed line numbers.Īlternatively you can here view or download the uninterpreted source code file.ġ This document describes how to invoke FlightGear 's generic IO subsystem.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |