public static void addGpsLogDataPoint ( Connection connection , OmsGeopaparazziProject3To4Converter . GpsPoint point , long gpslogId ) throws Exception { Date timestamp = ETimeUtilities . INSTANCE . TIME_FORMATTER_LOCAL . parse ( point . utctime ) ; String insertSQL = "INSERT INTO " + TableDescriptions . TABLE_GPSLOG_DATA + "(" + // TableDescriptions . GpsLogsDataTableFields . COLUMN_ID . getFieldName ( ) + ", " + // TableDescriptions . GpsLogsDataTableFields . COLUMN_LOGID . getFieldName ( ) + ", " + // TableDescriptions . GpsLogsDataTableFields . COLUMN_DATA_LON . getFieldName ( ) + ", " + // TableDescriptions . GpsLogsDataTableFields . COLUMN_DATA_LAT . getFieldName ( ) + ", " + // TableDescriptions . GpsLogsDataTableFields . COLUMN_DATA_ALTIM . getFieldName ( ) + ", " + // TableDescriptions . GpsLogsDataTableFields . COLUMN_DATA_TS . getFieldName ( ) + // ") VALUES" + "(?,?,?,?,?,?)" ; try ( PreparedStatement writeStatement = connection . prepareStatement ( insertSQL ) ) { writeStatement . setLong ( 1 , point . id ) ; writeStatement . setLong ( 2 , gpslogId ) ; writeStatement . setDouble ( 3 , point . lon ) ; writeStatement . setDouble ( 4 , point . lat ) ; writeStatement . setDouble ( 5 , point . altim ) ; writeStatement . setLong ( 6 , timestamp . getTime ( ) ) ; writeStatement . executeUpdate ( ) ; } }
Adds a new XY entry to the gps table .