Jump to content

Component: GPS (EB056, Generic NMEA) (Wireless)

From Flowcode Help
Revision as of 10:36, 17 November 2021 by Wiki bot (talk | contribs)
Author Matrix Ltd.
Version 2.1
Category Wireless


GPS (EB056, Generic NMEA) component

Component designed to process incoming NMEA style GPS data and convert into meaningful values such as longitude, lattitude, ground speed, UTC date and time. Also available in the form of the EB056 GPS E-block.

Detailed description

No detailed description exists yet for this component

Examples

GPS Example File GPS Example Example should show the Latitude generated by the GPS injector as well as the system time in simulation or UTC time on hardware.


Example data provided by the GPS NMEA injector component


GPS tracking application using an Arduino and an SD card reader. GPS Tracker

Downloadable macro reference

ReadGroundSpeed
Returns the current ground speed. Only returns correct data if Log Ground Speed property is set to yes. 
[[File:]] - Return


ReadNumberOfSatellites
Returns the current detected number of satellites. Only returns correct data if Log Satellite Count property is set to yes. 
- BYTE Return


ReadDilutionOfPrecision
Returns the current dilution of precision. Only returns correct data if Log Dilution Of Precision property is set to yes. 
[[File:]] - Return


CheckBufferOverflow
Returns the state of the buffer - 0 = OK, 1 = BufferTooShort, 2 = ItemNotFound. Only returns correct data if Log Buffer Overflow Property is set to Yes. 
- BYTE Return


ReadLongitude
Returns the current longitude. Only returns correct data if Log Longitude property is set to yes. 
[[File:]] - Return


ReadUTCTime
Returns a segment of the current UTC Time. Only returns correct data if Log UTC Time property is set to yes. 
- BYTE Unit
Specifies which segment to read - 'h', 'm', 's' 
- BYTE Return


IsDataValid
Returns the state of the incoming data - 0 = NotValid, 1 = Valid 255 = No GPS Data Received. 
- BYTE Return


ReadHorizontalDilutionOfPrecision
Returns the current horizontal dilution of precision. Only returns correct data if Log HDOP property is set to yes. 
[[File:]] - Return


ReadAltitude
Returns the current altitude. Only returns correct data if Log Altitude property is set to yes. 
[[File:]] - Return


ReadCourseOverGround
Returns the current course over ground. Only returns correct data if Log Course Over Ground property is set to yes. 
[[File:]] - Return


ReadUTCDate
Returns a segment of the current UTC Date. Only returns correct data if Log UTC Date property is set to yes. 
- BYTE Unit
Specifies which segment to read - 'd', 'm', 'y' 
- BYTE Return


ReadVerticalDilutionOfPrecision
Returns the current vertical dilution of precision. Only returns correct data if Log VDOP property is set to yes. 
[[File:]] - Return


ReadLatitude
Returns the current latitude. Only returns correct data if Log Latitude property is set to yes. 
[[File:]] - Return


Initialise
Initialises the UART used to communicate with the GPS module. 
- VOID Return


CardPlayback
Plays back a .Wav file audio stream from the card 
- STRING Filename
 
- BYTE Return


ReadMic
Reads the microphone sensor 0 - 4095 
- UINT Return


ReadSwitch
Read the switch value 
- BYTE index
0 (left) or 1 (right) 
- BYTE Return


SampleAccel
Samples the accelerometer 0 = no new data, 1 = new data available 
- BYTE Return


Left
Rotates the robot left - waits for the angle to be traversed before returning 
- UINT Angle
Angle to turn in degrees 
- VOID Return


ReadIR
Reads an IR sensor 0=Left, 1=FrontLeft, 2=Front, 3=FrontRight, 4=Right, 5=RearRight, 6=Rear, 7=RearLeft 
- BYTE index
0=Left, 1=FrontLeft, 2=Front, 3=FrontRight, 4=Right, 5=RearRight, 6=Rear, 7=RearLeft 
- UINT Return


LCDDrawPixel
Allows a single pixel on the LCD to be set or cleared 
- BYTE X
X Pixel 0-127 
- BYTE Y
Y Pixel 0-31 
- BYTE State
0=White (Off), 1=Black (On) 
- VOID Return


ServoSetPosition
Allows one of the servo positions to be assigned 
- BYTE Channel
Range 0-3 
- BYTE Position
Range 0-255 
- VOID Return


CardBitmap
Displays a monochrome bitmap read from the card on the LCD 
- BYTE X
Range 0-127 
- BYTE Y
Range 0-31 
- STRING Filename
 
- BYTE Return


CardRecordMic
Records an audio stream on the card from the microphone 
- BYTE BitDepth
0=8-bit, 1=16-bit 
- BYTE SampleRate
Sample Rate 0=8KHz, 1=16KHz 
- UINT RecordTime
Time to record for in seconds, Range 0-65535 
- STRING Filename
 
- BYTE Return


CardOpen
Attempts to open an existing file on the SD card 255=Error, 1=File not found, 0=Open OK 
- STRING Filename
 
- BYTE Return


Forwards
Drives the robot forwards - waits for the distance to be traversed before returning 
- UINT Distance
Distance in mm 
- VOID Return


ReadBearing
Reads the compass bearing based on the degrees clockwise from magnetic north. 
[[File:]] - Return


GetConsoleHandle
Gets the handle to the console allowing data displaying on the panel etc. 
[[File:]] - Return


LCDDrawLine
Allows a single pixel width line to be drawn on the LCD 
- BYTE X1
X Pixel 0-127 
- BYTE Y1
Y Pixel 0-31 
- BYTE X2
X Pixel 0-127 
- BYTE Y2
Y Pixel 0-31 
- VOID Return


ServoAutoMoveToPosition
Allows one of the servo positions to move gradually to a new position 
- BYTE Channel
Range 0-3 
- BYTE Position
Range 0-255 
- VOID Return


ReadAllValue
Reads a single value stored from the read all command Index dictates which sensor value to read 
- BYTE Index
0=SW, 1-8=IR, 9-10=Line, 11=Light, 12=Mic, 13-15=Accel 
- UINT Return


LCDBacklight
Allows the LCD backlight brighntess to be adjusted 
- BYTE Intensity
Range 0-100, 0=Off, 1=Min Brightness, 100=Max Brightness 
- VOID Return


LCDDrawRect
Allows a rectangle to be drawn on the LCD 
- BYTE X1
X Pixel 0-127 
- BYTE Y1
Y Pixel 0-31 
- BYTE X2
X Pixel 0-127 
- BYTE Y2
Y Pixel 0-31 
- VOID Return


ReadLine
Reads one of the IR line sensors 0-1 0=Left, 1=Right 
- BYTE index
0=Left, 1=Right 
- UINT Return


ServoDisable
Allows one of the servo outputs 0-3 to be disabled 
- BYTE Channel
Range 0-3 
- VOID Return


ServoEnable
Allows one of the servo outputs 0-3 to be enabled 
- BYTE Channel
Range 0-3 
- VOID Return


CardReadByte
Reads a byte from the currently open file. Starts at the beginning of the file and auto increments to the end 
- BYTE Return


CardErase
Attempts to delete an existing file on the SD card 255=Error, 1=File not found, 0=Delete OK 
- STRING Filename
 
- BYTE Return


CardWriteByte
Appends a byte to the end of the currently open file  
- BYTE Data
 
- VOID Return


EncoderRead
Reads one of the motor encoder counters. Approx 0.328296mm of travel per encoder unit. 
- BYTE index
0=Left, 1=Right 
- UINT Return


SetMotors
Sets the motor speeds without feedback Range -100 to 100 
[[File:]] - Left
Range -100 to 100 
[[File:]] - Right
Range -100 to 100 
- VOID Return


Backwards
Drives the robot backwards - waits for the distance to be traversed before returning 
- UINT Distance
Distance in mm 
- VOID Return


EncoderReset
Resets the motor encoder counters 
- VOID Return


LCDVerbose
Allows the LCD to automatically report the API commands as they get processed. Default - verbose on 
- BYTE State
0=Off 1=On 
- VOID Return


SetProp
Allows the COM port property to be set from a parent component. 
- STRING PropName
 
- ULONG PropVal
 
- VOID Return


CardInit
Attempts to startup the SD card 255=No Card, 254=Init Fail, 0=Init OK 
- BYTE Return


GetProp
Allows the property filter for the COM port list to be copied to a parent component. 
- STRING PropName
 
- STRING Return


LCDClear
Clears the LCD 
- VOID Return



Property reference

Properties
Buffer Size
The maximum number of bytes of a NMEA message we can store before processing the message. 
Log Altitude
Adds a variable to store the incoming altitude value Referenced by macro: ReadAltitude 
Log Buffer Overflow
Adds a variable to store if the incoming message buffer overflows Referenced by macro: CheckBufferOverflow 
Log Course Over Ground
Adds a variable to store the incoming course over ground value Referenced by macro: ReadCourseOverGround 
Log Dilution Of Precision
Adds a variable to store the incoming DOP value Referenced by macro: ReadDilutionOfPrecision 
Log Ground Speed
Adds a variable to store the incoming ground speed value Referenced by macro: ReadGroundSpeed 
Log Horizontal DOP
Adds a variable to store the incoming HDOP value Referenced by macro: ReadHorizontalDilutionOfPrecision 
Log Latitude
Adds a variable to store the incoming latitude value Referenced by macro: ReadLatitude 
Log Longitude
Adds a variable to store the incoming longitude value Referenced by macro: Read Longitude 
Log Satellite Count
Adds a variable to store the number of satellites in range Referenced by macro: ReadNumberOfSatellites 
Log UTC Time
Adds a variable to store the incoming UTC Time value Referenced by macro: ReadUTCTime 
Log UTC Date
Adds a variable to store the incoming UTC Date value Referenced by macro: ReadUTCDate 
Log Verticle DOP
Adds a variable to store the incoming VDOP value Referenced by macro: ReadVerticalDilutionOfPrecision 
Connections
Channel
UART Channel selector Software channels are bit banged using generic I/O pins but are not as reliable as hardware channels. Hardware channels use the selected peripheral on-board the target microcontroller. 
RX
Pin to be used for Receive data 
Baud Options
Baud rate option selector 
Baud Rate
 
Simulations
Label
Label used to help identify the component on the panel. 
Show Globe
Allows a graphical globe to be shown on the panel along with a coordinate marker. 
Scope Traces
Selects if the scope traces are automatically added to the data recorder window or not. Simulation - draws an approximation of the UART data onto the scope trace. ICT - sets up the scope trace for incoming data and adds UART packet decoding at the correct BAUD. 
Console Data
Selects if the console data is automatically generated or not 
Console Columns
Number of characters that can be displayed on a single line of the console. 
Data Source
Simulation data source used to allow the component to connect to various remote devices Nothing - Simulation data is ignored COM port - Routes the communication data to and from a physical or virtual COM port Injector - Routes the communication data via a data injector component on the Panel.