Difference between revisions of "Component: Injector (GPS NMEA) (Comms)"

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
(XML import BR)
 
(One intermediate revision by the same user not shown)
Line 21: Line 21:
  
 
==Examples==
 
==Examples==
''<span style="color:red;">No additional examples</span>''
+
GPS Example File
 +
{{Fcfile|GPS_test2.fcfx|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.
  
 +
[[File:GPS.jpg]]
 +
 +
 +
Example data provided by the GPS NMEA injector component
 +
 +
[[File:GPSCon.jpg]]
  
 
==Downloadable macro reference==
 
==Downloadable macro reference==

Latest revision as of 15:46, 16 February 2017


Author Matrix Ltd
Version 1.0 (Release)
Category Comms
This inherits from Data Injector Template


Image Injector (GPS NMEA) component

Comms data injector to allow simulation of NMEA style GPS messages

Examples

GPS Example File FC6 Icon.png 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.

GPS.jpg


Example data provided by the GPS NMEA injector component

GPSCon.jpg

Downloadable macro reference

This component does not contain any downloadable macros

Simulation macro reference

This component inherits simulation macros from Data Injector Template

InitialiseInjector

Sets up the injector ready to receive commands or send data

Parameters

<- STRING InjectorName
Name of the console that will be created
This parameter may be returned back to the caller


Return value

BYTE


RxByteCount

Returns the number of bytes currently sat in the receive buffer.

Parameters

This macro has no parameters


Return value

UINT


TxByte

Transmit a byte out to the Injector

This call is provided by Data Injector Template

Parameters

BYTE Data


Return value

This call does not return a value


RxByte

Attempt to receive a byte back from the injector

0 - 255 = Valid data

256 = RX timeout no data available

Parameters

This macro has no parameters


Return value

UINT


GetTxConsoleHandle

Gets the handle to the console allowing data displaying on the panel etc.

This call is provided by Data Injector Template

Parameters

This macro has no parameters


Return value

HANDLE


ChangeState

Changes the state for I2C or SPI type comms where the data bytes along are not enough to go on.

This call is provided by Data Injector Template

Parameters

BYTE NewState
Assigns new state, 0=default


Return value

This call does not return a value


GetRxConsoleHandle

Gets the handle to the console allowing data displaying on the panel etc.

This call is provided by Data Injector Template

Parameters

This macro has no parameters


Return value

HANDLE


GetConsoleHandle

Gets the handle to the console allowing data displaying on the panel etc.

Parameters

This macro has no parameters


Return value

HANDLE



Property reference

Data Period (ms)

This property is of type Unsigned integer and can be referenced with the variable name DataPeriod.

Amount of time in milliseconds to wait between each GPS NMEA packet is sent.

Default 1000.

Circular Buffer Size

This property is of type Unsigned integer and can be referenced with the variable name CircularBufferSize.

Max number of bytes the receive queue can hold.

Default 1000.

Data Valid

This property is of type True or false and can be referenced with the variable name DataValid.

Injected GPS data validity

Altitude

This property is of type Floating point and can be referenced with the variable name Altitude.

Injected GPS Altitude

Course Over Ground

This property is of type Floating point and can be referenced with the variable name CourseOverGround.

Injected GPS course over ground (COG)

Dilution Of Precision

This property is of type Floating point and can be referenced with the variable name DilutionOfPrecision.

Injected GPS dilution of precision (DOP)

Ground Speed

This property is of type Floating point and can be referenced with the variable name GroundSpeed.

Injected GPS ground speed (Knotts)

HDOP

This property is of type Floating point and can be referenced with the variable name HDOP.

Injected GPS horizontal dilution of precision (HDOP)

Latitude

This property is of type Floating point and can be referenced with the variable name Latitude.

Injected GPS lattitude

Longitude

This property is of type Floating point and can be referenced with the variable name Longitude.

Injected GPS longitude

Number Of Satellites

This property is of type Unsigned integer and can be referenced with the variable name NumSatellites.

Injected GPS number of active satellites

VDOP

This property is of type Floating point and can be referenced with the variable name VDOP.

Injected GPS vertical dilution of precision (VDOP)

Data Source

This property is of type Fixed list of ints and can be referenced with the variable name DataSource.

Injected GPS source for UTC time and date