nmea - Process NMEA data
This package provides a standard interface for writing software which recieves NMEA standard input data. It allows for reading data from COM ports, files, or programmatic input. It also supports the checksumming and logging of incoming data. After parsing, input is dispatched to user defined handler commands for processing. To define a handler, see the event command. There are no GPS specific functions in this package. NMEA data consists of a sentence type, followed by a list of data.
Processes and dispatches the supplied sentence. If sentence contains no commas it is treated as a Tcl list, otherwise it must be standard comma delimited NMEA data, with an optional checksum and leading $.
nmea::input {$GPGSA,A,3,04,05,,09,12,,,24,,,,,2.5,1.3,2.1*39} nmea::input [list GPGSA A 3 04 05 09 12 "" "" 24 "" "" "" 2.5 1.3 2.1]
Open the specified COM port and read NMEA sentences when available. Port speed is set to 4800bps by default or to speed.
Close the com port connection if one is open.
Changes the current port settings. settings has the same format as fconfigure -mode.
Open file file and read NMEA sentences, one per line, at the rate specified by ?rate? in milliseconds. The file format may omit the leading $ and/or the checksum. If rate is <= 0 (the default) then lines will only be processed when a call to do_line is made.
Close the open file if one exists.
If there is a currently open file, this command will read and process a single line from it. Returns the number of lines read.
Sets the rate at which lines are processed from the open file, in milliseconds. The rate remains consistant across files, there does not need to be a file currently open to use this command. Set to 0 to disable automatic line processing.
Starts or stops input logging. If a file name is specified then all NMEA data recieved on the open port will be logged to the ?file? in append mode. If file is an empty string then any logging will be stopped. If no file is specified then returns a boolean value indicating if logging is currently enabled. Data written to the port by write, data read from files, or input made using input, is not logged.
Returns the checksum of the supplied data.
If there is a currently open port, this command will write the specified sentence and data to the port in proper NMEA checksummed format.
Registers a handler proc for a given NMEA sentence. There may be at most one handler per sentence, any existing handler is replaced. If no command is specified, returns the name of the current handler for the given setence or an empty string if none exists. In addition to the incoming sentences there are 2 builtin types, EOF and DEFAULT. The handler for the DEFAULT setence is invoked if there is not a specific handler for that sentence. The EOF handler is invoked when End Of File is reached on the open file or port.
The handler procedures, with the exception of the builtin types,must take exactly one argument, which is a list of the data values. The DEFAULT handler should have two arguments, the sentence type and the data values. The EOF handler has no arguments.
nmea::event gpgsa parse_sat_detail nmea::event default handle_unknown proc parse_sat_detail {data} { puts [lindex $data 1] } proc handle_unknown {name data} { puts "unknown data type $name" }
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category nmea of the Tcllib Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.
When proposing code changes, please provide unified diffs, i.e the output of diff -u.
Note further that attachments are strongly preferred over inlined patches. Attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar.
Networking
Copyright © 2006-2009, Aaron Faupell <afaupell@users.sourceforge.net>


|
Search the using Web Google! |
||
|
Special Searches Stanford SearchLinux Search |
Help! About Google! Company Info! Google Logos |
Get Google! Archive |
Copyright ©1998 Google Inc.


A place to watch your favorite humans lie, laugh, and lounge in the world's most serious social deducation league.
Create or Access your Whodunnit League Fantasy Team
Get more of your new faves on the socials:


Home
About
Projects
Contact
Jolanta Filipiak<EMAIL_ADDRESS>Cracow, Poland
SEND
Find me on...


TRIUMF Gantt Chart
Revision Filter (optional):
Date range:
to
Find Schedule by Date
Schedule Number:
Find Schedule By Number
Preparing Download...


| A prelaunch conference at Cape Kennedy shows no sign of prelaunch tension. Apollo 7 Commander Wally Schirra raises his coffee cup, with Cunningham at his right. Eisele is at the extreme right, in sweater. Al Shepard looks over General Phillips' shoulder. At Phillips' left is George Low; across the table is Rocco Petrone. |
| Lifting off for the first time with men aboard, the Saturn IB and its hydrogen-fueled upper stage carry the Apollo 7 command and service module toward Earth orbit. This was the first trial of the intensively reengineered CSM, and to the relief of NASA it performed beautifully, staying in orbit for 10.8 days, longer than a Moon landing mission would require. |
| An exciting Earthrise greets the Apollo 8 crew as they return from the far side of the Moon. This was the first time men had ever directly seen Earthrise or the far side, though photos had been taken earlier. Potential landing sites were photographed from the 70-mile-high orbit. |
|
Graduated missions led confidently to a landing on the Moon We designed seven types of missions to test the suitability and safety of all equipment in all mission phases. These were designated by letters A through G:
- S. C. P. |


Package metrics
Class ConcreteConfusionMatrix<T extends java.lang.Comparable<T>>
java.lang.Object
metrics.ConcreteConfusionMatrix<T>
- Type Parameters:
T
- a generic type for the class that must extend Comparable
- All Implemented Interfaces:
ConfusionMatrix<T>
public class ConcreteConfusionMatrix<T extends java.lang.Comparable<T>> extends java.lang.Object implements ConfusionMatrix<T>
This class implements the ConfusionMatrix interface. Given a list of predictions and list of actual classifications it
generates a confusion matrix (a 2D matrix of int), a list of labels and an array of double with the percentage of
occurance of each class in the real classification data. This data can be acessed by invoking the methods
getConfusionMatrix, getLabels, getPercentageOfEachClass and getPercentageOfIndividualClass.
THE CONFUSION MATRIX STANDARD USED WAS: LINE ARE THE PREDICTED AND COLUMN ARE THE TRUE CLASSES
- Since:
- 2020-05-03
- Version:
- 1.0.0
- Author:
- Marcelo Jacinto, David Souto, Gonçalo Tomás
- See Also:
ConfusionMatrix
-
Constructor Summary
Constructors Constructor Description ConcreteConfusionMatrix(java.util.List<T> predicted, java.util.List<T> actual)
Constructor of the ConfusionMatrix.ConcreteConfusionMatrix(java.util.List<T> predicted, java.util.List<T> actual, java.util.List<T> possibleLabels)
A constructor of the ConfusionMatrix. -
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object o)
Redefinition of the equals() method.int[][]
getConfusionMatrix()
This method returns the actual confusion matrix (an int[][] matrix) with the lines symbolizing the number of predictions for each class and the columns symbolizing the number of each class real appearance in the data.java.util.List<T>
getLabels()
This method returns a list of generic type with the labels corresponding to each line/col of data in the confusion matrix.double[]
getPercentageOfEachClass()
This method returns the percentage of appearance of each class in the true classification data.double
getPercentageOfIndividualClass(int i)
This method returns the percentage of appearance of a specific class given its index iint
hashCode()
Redefinition of the hashCode() method.java.lang.String
toString()
Redefinition of the toString() function that prints the matrix in the terminal along with the corresponding labels
-
Constructor Details
-
ConcreteConfusionMatrix
Constructor of the ConfusionMatrix. Receives 2 lists of generic type: one with the predictions and another with the real classifications- Parameters:
predicted
- A list of generic predicted dataactual
- A list of generic actual classification data
-
ConcreteConfusionMatrix
public ConcreteConfusionMatrix(java.util.List<T> predicted, java.util.List<T> actual, java.util.List<T> possibleLabels)A constructor of the ConfusionMatrix. Receives 3 lists of generic type: one with the predictions, another with thre real classications and another with labels that the 2 previous lists can contain.- Parameters:
predicted
- A list of generic predicted dataactual
- A list of generic actual classification datapossibleLabels
- A list of generic with the labels that the data can assume
-
-
Method Details
-
getConfusionMatrix
public int[][] getConfusionMatrix()This method returns the actual confusion matrix (an int[][] matrix) with the lines symbolizing the number of predictions for each class and the columns symbolizing the number of each class real appearance in the data.- Specified by:
getConfusionMatrix
in interfaceConfusionMatrix<T extends java.lang.Comparable<T>>
- Returns:
- A int[][] with the confusion matrix
-
getLabels
This method returns a list of generic type with the labels corresponding to each line/col of data in the confusion matrix.- Specified by:
getLabels
in interfaceConfusionMatrix<T extends java.lang.Comparable<T>>
- Returns:
- A List of generic type with labels
-
getPercentageOfEachClass
public double[] getPercentageOfEachClass()This method returns the percentage of appearance of each class in the true classification data.- Specified by:
getPercentageOfEachClass
in interfaceConfusionMatrix<T extends java.lang.Comparable<T>>
- Returns:
- An array of Double with the percentage of appearance of each class
-
getPercentageOfIndividualClass
public double getPercentageOfIndividualClass(int i)This method returns the percentage of appearance of a specific class given its index i- Specified by:
getPercentageOfIndividualClass
in interfaceConfusionMatrix<T extends java.lang.Comparable<T>>
- Parameters:
i
- An int with the index to which you want to get the percentage from- Returns:
- A Double with the percentage of appearance of that class in the real classification data
-
toString
public java.lang.String toString()Redefinition of the toString() function that prints the matrix in the terminal along with the corresponding labels- Overrides:
toString
in classjava.lang.Object
- Returns:
- A String with the labels and the confusion matrix
-
equals
public boolean equals(java.lang.Object o)Redefinition of the equals() method. Uses the matrix of int[][] (the actual confusion matrix), the labels of the matrix and the percentageOfEachclass to make the comparison- Overrides:
equals
in classjava.lang.Object
- Parameters:
o
- Another ConcreteConfusionMatrix object- Returns:
- A boolean with true or false
-
hashCode
public int hashCode()Redefinition of the hashCode() method. Uses the matrix of int[][] (the actual confusion matrix), the labels of the matrix and the percentageOfEachclass- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- An int with the hashcode
-


{%- include head.html -%}
Blog Archive
‐
Imprint
CARGO CULT
PROGRAMMER
{{ content }}
© {{ "now" | date: "%Y" }} Lovis Möller


Tipsy Admin Panel
Prutor
Analyze programs
Save to database
Show first known solution
Find corrections
Select Question ID
Corrections


{% from "layout/errorlist.html" import errorlist %} {# csrf() is contextual, so we need to pass in its output #} {% macro login_form(form, csrf, next_url='', action=None, only_pwreset=False) -%} {{ errorlist(form) }}
{{ _("Password should be at least 8 characters long and contain at least 1 number.") }}
{{ _("Your username will be shown next to your question in our public support forums.") }}
{{ _("Reveal password to check that it's right") }}